Skip to content

Commit 491cf55

Browse files
committed
Auto merge of rust-lang#85443 - RalfJung:rollup-d9gd64t, r=RalfJung
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
2 parents a5560a6 + 7389843 commit 491cf55

21 files changed

+267
-225
lines changed

README.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,28 @@ Read ["Installation"] from [The Book].
1919
## Installing from Source
2020

2121
The Rust build system uses a Python script called `x.py` to build the compiler,
22-
which manages the bootstrapping process. More information about it can be found
23-
by running `./x.py --help` or reading the [rustc dev guide][rustcguidebuild].
22+
which manages the bootstrapping process. It lives in the root of the project.
23+
24+
The `x.py` command can be run directly on most systems in the following format:
25+
26+
```sh
27+
./x.py <subcommand> [flags]
28+
```
29+
30+
This is how the documentation and examples assume you are running `x.py`.
31+
32+
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:
33+
34+
```sh
35+
# Python 3
36+
python3 x.py <subcommand> [flags]
37+
38+
# Python 2.7
39+
python2.7 x.py <subcommand> [flags]
40+
```
41+
42+
More information about `x.py` can be found
43+
by running it with the `--help` flag or reading the [rustc dev guide][rustcguidebuild].
2444

2545
[gettingstarted]: https://rustc-dev-guide.rust-lang.org/getting-started.html
2646
[rustcguidebuild]: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html

RELEASES.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
Version 1.52.1 (2021-05-10)
2+
============================
3+
4+
This release disables incremental compilation, unless the user has explicitly
5+
opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
6+
7+
This is due to the widespread, and frequently occuring, breakage encountered by
8+
Rust users due to newly enabled incremental verification in 1.52.0. Notably,
9+
Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
10+
newly added incremental verification are still present in past stable versions,
11+
and are not yet fixed on any channel. These bugs can lead to miscompilation of
12+
Rust binaries.
13+
14+
These problems only affect incremental builds, so release builds with Cargo
15+
should not be affected unless the user has explicitly opted into incremental.
16+
Debug and check builds are affected.
17+
18+
See [84970] for more details.
19+
20+
[84970]: https://github.com/rust-lang/rust/issues/84970
21+
122
Version 1.52.0 (2021-05-06)
223
============================
324

compiler/rustc_feature/src/active.rs

-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,6 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
698698
sym::repr128,
699699
sym::unsized_locals,
700700
sym::capture_disjoint_fields,
701-
sym::const_generics_defaults,
702701
sym::inherent_associated_types,
703702
sym::type_alias_impl_trait,
704703
sym::native_link_modifiers,

library/std/src/io/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ pub trait Seek {
16631663
///
16641664
/// # Errors
16651665
///
1666-
/// Seeking can fail, for example becaue it might involve flushing a buffer.
1666+
/// Seeking can fail, for example because it might involve flushing a buffer.
16671667
///
16681668
/// Seeking to a negative offset is considered an error.
16691669
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1675,7 +1675,7 @@ pub trait Seek {
16751675
///
16761676
/// # Errors
16771677
///
1678-
/// Rewinding can fail, for example becaue it might involve flushing a buffer.
1678+
/// Rewinding can fail, for example because it might involve flushing a buffer.
16791679
///
16801680
/// # Example
16811681
///

src/bootstrap/sanity.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ pub fn check(build: &mut Build) {
9393
.unwrap_or(true)
9494
})
9595
.any(|build_llvm_ourselves| build_llvm_ourselves);
96-
if building_llvm || build.config.any_sanitizers_enabled() {
96+
let need_cmake = building_llvm || build.config.any_sanitizers_enabled();
97+
if need_cmake {
9798
cmd_finder.must_have("cmake");
9899
}
99100

@@ -204,7 +205,7 @@ pub fn check(build: &mut Build) {
204205
}
205206
}
206207

207-
if target.contains("msvc") {
208+
if need_cmake && target.contains("msvc") {
208209
// There are three builds of cmake on windows: MSVC, MinGW, and
209210
// Cygwin. The Cygwin build does not have generators for Visual
210211
// Studio, so detect that here and error.

src/librustdoc/html/static/main.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ function hideThemeButtonState() {
170170
// 1 for "In Parameters"
171171
// 2 for "In Return Types"
172172
currentTab: 0,
173-
mouseMovedAfterSearch: true,
173+
// tab and back preserves the element that was focused.
174+
focusedByTab: [null, null, null],
174175
clearInputTimeout: function() {
175176
if (searchState.timeout !== null) {
176177
clearTimeout(searchState.timeout);
@@ -262,10 +263,6 @@ function hideThemeButtonState() {
262263
search_input.placeholder = searchState.input.origPlaceholder;
263264
});
264265

265-
document.addEventListener("mousemove", function() {
266-
searchState.mouseMovedAfterSearch = true;
267-
});
268-
269266
search_input.removeAttribute('disabled');
270267

271268
// `crates{version}.js` should always be loaded before this script, so we can use it
@@ -1064,7 +1061,7 @@ function hideThemeButtonState() {
10641061
["T", "Focus the theme picker menu"],
10651062
["↑", "Move up in search results"],
10661063
["↓", "Move down in search results"],
1067-
["ctrl + ↑ / ↓", "Switch result tab"],
1064+
["← / →", "Switch result tab (when results focused)"],
10681065
["&#9166;", "Go to active search result"],
10691066
["+", "Expand all sections"],
10701067
["-", "Collapse all sections"],

src/librustdoc/html/static/rustdoc.css

+21-16
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ h4.type.trait-impl, h4.associatedconstant.trait-impl, h4.associatedtype.trait-im
144144
}
145145

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

751+
.search-results {
752+
display: none;
753+
padding-bottom: 2em;
754+
}
755+
756+
.search-results.active {
757+
display: block;
758+
}
759+
751760
.search-results .desc {
752761
white-space: nowrap;
753762
text-overflow: ellipsis;
@@ -756,22 +765,14 @@ a {
756765
}
757766

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

762-
.content .search-results td:first-child {
763-
padding-right: 0;
774+
.result-name {
764775
width: 50%;
765-
}
766-
.content .search-results td:first-child a {
767-
padding-right: 10px;
768-
}
769-
.content .search-results td:first-child a:after {
770-
clear: both;
771-
content: "";
772-
display: block;
773-
}
774-
.content .search-results td:first-child a span {
775776
float: left;
776777
}
777778

@@ -1134,6 +1135,11 @@ pre.rust {
11341135
.search-failed {
11351136
text-align: center;
11361137
margin-top: 20px;
1138+
display: none;
1139+
}
1140+
1141+
.search-failed.active {
1142+
display: block;
11371143
}
11381144

11391145
.search-failed > ul {
@@ -1262,12 +1268,11 @@ h4 > .notable-traits {
12621268
}
12631269

12641270
#copy-path {
1271+
background: initial;
12651272
margin-left: 10px;
12661273
padding: 0;
12671274
padding-left: 2px;
1268-
}
1269-
#copy-path> img {
1270-
margin-bottom: 2px;
1275+
border: 0;
12711276
}
12721277

12731278
#theme-choices {

0 commit comments

Comments
 (0)