Skip to content

Commit

Permalink
Auto merge of rust-lang#85443 - RalfJung:rollup-d9gd64t, r=RalfJung
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - rust-lang#84462 (rustdoc: use focus for search navigation)
 - rust-lang#85251 (Make `const_generics_defaults` not an incomplete feature)
 - rust-lang#85404 (Backport 1.52.1 release notes)
 - rust-lang#85407 (Improve display for "copy-path" button, making it more discreet)
 - rust-lang#85423 (Don't require cmake on Windows when LLVM isn't being built)
 - rust-lang#85428 (Add x.py pre-setup instructions)
 - rust-lang#85442 (fix typo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed May 18, 2021
2 parents a5560a6 + 7389843 commit 491cf55
Show file tree
Hide file tree
Showing 21 changed files with 267 additions and 225 deletions.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,28 @@ Read ["Installation"] from [The Book].
## Installing from Source

The Rust build system uses a Python script called `x.py` to build the compiler,
which manages the bootstrapping process. More information about it can be found
by running `./x.py --help` or reading the [rustc dev guide][rustcguidebuild].
which manages the bootstrapping process. It lives in the root of the project.

The `x.py` command can be run directly on most systems in the following format:

```sh
./x.py <subcommand> [flags]
```

This is how the documentation and examples assume you are running `x.py`.

Systems such as Ubuntu 20.04 LTS do not create the necessary `python` command by default when Python is installed that allows `x.py` to be run directly. In that case you can either create a symlink for `python` (Ubuntu provides the `python-is-python3` package for this), or run `x.py` using Python itself:

```sh
# Python 3
python3 x.py <subcommand> [flags]

# Python 2.7
python2.7 x.py <subcommand> [flags]
```

More information about `x.py` can be found
by running it with the `--help` flag or reading the [rustc dev guide][rustcguidebuild].

[gettingstarted]: https://rustc-dev-guide.rust-lang.org/getting-started.html
[rustcguidebuild]: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html
Expand Down
21 changes: 21 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
Version 1.52.1 (2021-05-10)
============================

This release disables incremental compilation, unless the user has explicitly
opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.

This is due to the widespread, and frequently occuring, breakage encountered by
Rust users due to newly enabled incremental verification in 1.52.0. Notably,
Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
newly added incremental verification are still present in past stable versions,
and are not yet fixed on any channel. These bugs can lead to miscompilation of
Rust binaries.

These problems only affect incremental builds, so release builds with Cargo
should not be affected unless the user has explicitly opted into incremental.
Debug and check builds are affected.

See [84970] for more details.

[84970]: https://github.com/rust-lang/rust/issues/84970

Version 1.52.0 (2021-05-06)
============================

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,6 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
sym::repr128,
sym::unsized_locals,
sym::capture_disjoint_fields,
sym::const_generics_defaults,
sym::inherent_associated_types,
sym::type_alias_impl_trait,
sym::native_link_modifiers,
Expand Down
4 changes: 2 additions & 2 deletions library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ pub trait Seek {
///
/// # Errors
///
/// Seeking can fail, for example becaue it might involve flushing a buffer.
/// Seeking can fail, for example because it might involve flushing a buffer.
///
/// Seeking to a negative offset is considered an error.
#[stable(feature = "rust1", since = "1.0.0")]
Expand All @@ -1675,7 +1675,7 @@ pub trait Seek {
///
/// # Errors
///
/// Rewinding can fail, for example becaue it might involve flushing a buffer.
/// Rewinding can fail, for example because it might involve flushing a buffer.
///
/// # Example
///
Expand Down
5 changes: 3 additions & 2 deletions src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ pub fn check(build: &mut Build) {
.unwrap_or(true)
})
.any(|build_llvm_ourselves| build_llvm_ourselves);
if building_llvm || build.config.any_sanitizers_enabled() {
let need_cmake = building_llvm || build.config.any_sanitizers_enabled();
if need_cmake {
cmd_finder.must_have("cmake");
}

Expand Down Expand Up @@ -204,7 +205,7 @@ pub fn check(build: &mut Build) {
}
}

if target.contains("msvc") {
if need_cmake && target.contains("msvc") {
// There are three builds of cmake on windows: MSVC, MinGW, and
// Cygwin. The Cygwin build does not have generators for Visual
// Studio, so detect that here and error.
Expand Down
9 changes: 3 additions & 6 deletions src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ function hideThemeButtonState() {
// 1 for "In Parameters"
// 2 for "In Return Types"
currentTab: 0,
mouseMovedAfterSearch: true,
// tab and back preserves the element that was focused.
focusedByTab: [null, null, null],
clearInputTimeout: function() {
if (searchState.timeout !== null) {
clearTimeout(searchState.timeout);
Expand Down Expand Up @@ -262,10 +263,6 @@ function hideThemeButtonState() {
search_input.placeholder = searchState.input.origPlaceholder;
});

document.addEventListener("mousemove", function() {
searchState.mouseMovedAfterSearch = true;
});

search_input.removeAttribute('disabled');

// `crates{version}.js` should always be loaded before this script, so we can use it
Expand Down Expand Up @@ -1064,7 +1061,7 @@ function hideThemeButtonState() {
["T", "Focus the theme picker menu"],
["↑", "Move up in search results"],
["↓", "Move down in search results"],
["ctrl + ↑ / ↓", "Switch result tab"],
["← / →", "Switch result tab (when results focused)"],
["&#9166;", "Go to active search result"],
["+", "Expand all sections"],
["-", "Collapse all sections"],
Expand Down
37 changes: 21 additions & 16 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ h4.type.trait-impl, h4.associatedconstant.trait-impl, h4.associatedtype.trait-im
}

h1, h2, h3, h4,
.sidebar, a.source, .search-input, .content table td:first-child > a,
.sidebar, a.source, .search-input, .search-results .result-name,
div.item-list .out-of-band,
#source-sidebar, #sidebar-toggle,
details.rustdoc-toggle > summary::before,
Expand Down Expand Up @@ -748,6 +748,15 @@ a {
outline: 0;
}

.search-results {
display: none;
padding-bottom: 2em;
}

.search-results.active {
display: block;
}

.search-results .desc {
white-space: nowrap;
text-overflow: ellipsis;
Expand All @@ -756,22 +765,14 @@ a {
}

.search-results a {
/* A little margin ensures the browser's outlining of focused links has room to display. */
margin-left: 2px;
margin-right: 2px;
display: block;
}

.content .search-results td:first-child {
padding-right: 0;
.result-name {
width: 50%;
}
.content .search-results td:first-child a {
padding-right: 10px;
}
.content .search-results td:first-child a:after {
clear: both;
content: "";
display: block;
}
.content .search-results td:first-child a span {
float: left;
}

Expand Down Expand Up @@ -1134,6 +1135,11 @@ pre.rust {
.search-failed {
text-align: center;
margin-top: 20px;
display: none;
}

.search-failed.active {
display: block;
}

.search-failed > ul {
Expand Down Expand Up @@ -1262,12 +1268,11 @@ h4 > .notable-traits {
}

#copy-path {
background: initial;
margin-left: 10px;
padding: 0;
padding-left: 2px;
}
#copy-path> img {
margin-bottom: 2px;
border: 0;
}

#theme-choices {
Expand Down
Loading

0 comments on commit 491cf55

Please sign in to comment.