Skip to content

Commit 739f8f0

Browse files
committed
Auto merge of rust-lang#87508 - pietroalbini:beta-next, r=Mark-Simulacrum
Prepare beta 1.55.0 Included backports: * rust-lang#86696 * rust-lang#87390 (squashed) Reverted: * rust-lang#86623 cc `@rust-lang/release` `@Mark-Simulacrum`
2 parents d03456d + 87d2c59 commit 739f8f0

File tree

88 files changed

+403
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+403
-280
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ jobs:
263263
env:
264264
IMAGE: x86_64-gnu
265265
RUST_CI_OVERRIDE_RELEASE_CHANNEL: stable
266+
CI_ONLY_WHEN_CHANNEL: nightly
266267
os: ubuntu-latest-xl
267268
- name: x86_64-gnu-aux
268269
os: ubuntu-latest-xl

RELEASES.md

+125-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,127 @@
1+
Version 1.54.0 (2021-07-29)
2+
============================
3+
4+
Language
5+
-----------------------
6+
7+
- [You can now use macros for values in built-in attribute macros.][83366]
8+
While a seemingly minor addition on its own, this enables a lot of
9+
powerful functionality when combined correctly. Most notably you can
10+
now include external documentation in your crate by writing the following.
11+
```rust
12+
#![doc = include_str!("README.md")]
13+
```
14+
You can also use this to include auto-generated modules:
15+
```rust
16+
#[path = concat!(env!("OUT_DIR"), "/generated.rs")]
17+
mod generated;
18+
```
19+
20+
- [You can now cast between unsized slice types (and types which contain
21+
unsized slices) in `const fn`.][85078]
22+
- [You can now use multiple generic lifetimes with `impl Trait` where the
23+
lifetimes don't explicitly outlive another.][84701] In code this means
24+
that you can now have `impl Trait<'a, 'b>` where as before you could
25+
only have `impl Trait<'a, 'b> where 'b: 'a`.
26+
27+
Compiler
28+
-----------------------
29+
30+
- [Rustc will now search for custom JSON targets in
31+
`/lib/rustlib/<target-triple>/target.json` where `/` is the "sysroot"
32+
directory.][83800] You can find your sysroot directory by running
33+
`rustc --print sysroot`.
34+
- [Added `wasm` as a `target_family` for WebAssembly platforms.][84072]
35+
- [You can now use `#[target_feature]` on safe functions when targeting
36+
WebAssembly platforms.][84988]
37+
- [Improved debugger output for enums on Windows MSVC platforms.][85292]
38+
- [Added tier 3\* support for `bpfel-unknown-none`
39+
and `bpfeb-unknown-none`.][79608]
40+
41+
\* Refer to Rust's [platform support page][platform-support-doc] for more
42+
information on Rust's tiered platform support.
43+
44+
Libraries
45+
-----------------------
46+
47+
- [`panic::panic_any` will now `#[track_caller]`.][85745]
48+
- [Added `OutOfMemory` as a variant of `io::ErrorKind`.][84744]
49+
- [ `proc_macro::Literal` now implements `FromStr`.][84717]
50+
- [The implementations of vendor intrinsics in core::arch have been
51+
significantly refactored.][83278] The main user-visible changes are
52+
a 50% reduction in the size of libcore.rlib and stricter validation
53+
of constant operands passed to intrinsics. The latter is technically
54+
a breaking change, but allows Rust to more closely match the C vendor
55+
intrinsics API.
56+
57+
Stabilized APIs
58+
---------------
59+
60+
- [`BTreeMap::into_keys`]
61+
- [`BTreeMap::into_values`]
62+
- [`HashMap::into_keys`]
63+
- [`HashMap::into_values`]
64+
- [`arch::wasm32`]
65+
- [`VecDeque::binary_search`]
66+
- [`VecDeque::binary_search_by`]
67+
- [`VecDeque::binary_search_by_key`]
68+
- [`VecDeque::partition_point`]
69+
70+
Cargo
71+
-----
72+
73+
- [Added the `--prune <spec>` option to `cargo-tree` to remove a package from
74+
the dependency graph.][cargo/9520]
75+
- [Added the `--depth` option to `cargo-tree` to print only to a certain depth
76+
in the tree ][cargo/9499]
77+
- [Added the `no-proc-macro` value to `cargo-tree --edges` to hide procedural
78+
macro dependencies.][cargo/9488]
79+
- [A new environment variable named `CARGO_TARGET_TMPDIR` is available.][cargo/9375]
80+
This variable points to a directory that integration tests and benches
81+
can use as a "scratchpad" for testing filesystem operations.
82+
83+
Compatibility Notes
84+
-------------------
85+
- [Mixing Option and Result via `?` is no longer permitted in closures for inferred types.][86831]
86+
- [Previously unsound code is no longer permitted where different constructors in branches
87+
could require different lifetimes.][85574]
88+
- As previously mentioned the [`std::arch` instrinsics now uses stricter const checking][83278]
89+
than before and may reject some previously accepted code.
90+
- [`i128` multiplication on Cortex M0+ platforms currently unconditionally causes overflow
91+
when compiled with `codegen-units = 1`.][86063]
92+
93+
[85574]: https://github.com/rust-lang/rust/issues/85574
94+
[86831]: https://github.com/rust-lang/rust/issues/86831
95+
[86063]: https://github.com/rust-lang/rust/issues/86063
96+
[86831]: https://github.com/rust-lang/rust/issues/86831
97+
[79608]: https://github.com/rust-lang/rust/pull/79608
98+
[84988]: https://github.com/rust-lang/rust/pull/84988
99+
[84701]: https://github.com/rust-lang/rust/pull/84701
100+
[84072]: https://github.com/rust-lang/rust/pull/84072
101+
[85745]: https://github.com/rust-lang/rust/pull/85745
102+
[84744]: https://github.com/rust-lang/rust/pull/84744
103+
[85078]: https://github.com/rust-lang/rust/pull/85078
104+
[84717]: https://github.com/rust-lang/rust/pull/84717
105+
[83800]: https://github.com/rust-lang/rust/pull/83800
106+
[83366]: https://github.com/rust-lang/rust/pull/83366
107+
[83278]: https://github.com/rust-lang/rust/pull/83278
108+
[85292]: https://github.com/rust-lang/rust/pull/85292
109+
[cargo/9520]: https://github.com/rust-lang/cargo/pull/9520
110+
[cargo/9499]: https://github.com/rust-lang/cargo/pull/9499
111+
[cargo/9488]: https://github.com/rust-lang/cargo/pull/9488
112+
[cargo/9375]: https://github.com/rust-lang/cargo/pull/9375
113+
[`BTreeMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_keys
114+
[`BTreeMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_values
115+
[`HashMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_keys
116+
[`HashMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_values
117+
[`arch::wasm32`]: https://doc.rust-lang.org/core/arch/wasm32/index.html
118+
[`VecDeque::binary_search`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search
119+
[`VecDeque::binary_search_by`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by
120+
121+
[`VecDeque::binary_search_by_key`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by_key
122+
123+
[`VecDeque::partition_point`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.partition_point
124+
1125
Version 1.53.0 (2021-06-17)
2126
============================
3127

@@ -1749,7 +1873,7 @@ Language
17491873
- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning
17501874
that you can create an enum that has the exact layout and ABI of the type
17511875
it contains.
1752-
- [You can now use outer attribute procedural macros on inline modules.][64273]
1876+
- [You can now use outer attribute procedural macros on inline modules.][64273]
17531877
- [There are some *syntax-only* changes:][67131]
17541878
- `default` is syntactically allowed before items in `trait` definitions.
17551879
- Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically

src/ci/channel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly
1+
beta

src/ci/docker/host-x86_64/mingw-check/Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ COPY scripts/sccache.sh /scripts/
2828
RUN sh /scripts/sccache.sh
2929

3030
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
31-
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
3231

3332
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
3433
ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
@@ -38,7 +37,6 @@ ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
3837
python3 ../x.py test --stage 2 src/tools/tidy && \
3938
python3 ../x.py doc --stage 0 library/test && \
4039
/scripts/validate-toolstate.sh && \
41-
/scripts/validate-error-codes.sh && \
4240
# Runs checks to ensure that there are no ES5 issues in our JS code.
4341
es-check es5 ../src/librustdoc/html/static/js/*.js && \
4442
eslint ../src/librustdoc/html/static/js/*.js

src/ci/docker/host-x86_64/mingw-check/validate-error-codes.sh

-20
This file was deleted.

src/ci/docker/run.sh

-9
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,6 @@ else
219219
command="/checkout/src/ci/run.sh"
220220
fi
221221

222-
if [ "$CI" != "" ]; then
223-
# Get some needed information for $BASE_COMMIT
224-
git fetch "https://github.com/$GITHUB_REPOSITORY" "$GITHUB_BASE_REF"
225-
BASE_COMMIT="$(git merge-base FETCH_HEAD HEAD)"
226-
else
227-
BASE_COMMIT=""
228-
fi
229-
230222
docker \
231223
run \
232224
--workdir /checkout/obj \
@@ -245,7 +237,6 @@ docker \
245237
--env TOOLSTATE_PUBLISH \
246238
--env RUST_CI_OVERRIDE_RELEASE_CHANNEL \
247239
--env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
248-
--env BASE_COMMIT="$BASE_COMMIT" \
249240
--init \
250241
--rm \
251242
rust-ci \

src/ci/github-actions/ci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,10 @@ jobs:
416416
env:
417417
IMAGE: x86_64-gnu
418418
RUST_CI_OVERRIDE_RELEASE_CHANNEL: stable
419+
# Only run this job on the nightly channel. Running this on beta
420+
# could cause failures when `dev: 1` in `stage0.txt`, and running
421+
# this on stable is useless.
422+
CI_ONLY_WHEN_CHANNEL: nightly
419423
<<: *job-linux-xl
420424

421425
- name: x86_64-gnu-aux

src/ci/scripts/should-skip-this.sh

+37-25
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,43 @@ IFS=$'\n\t'
88

99
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
1010

11-
if [[ -z "${CI_ONLY_WHEN_SUBMODULES_CHANGED+x}" ]]; then
12-
echo "Executing the job since there is no skip rule in effect"
13-
exit 0
11+
if [[ -n "${CI_ONLY_WHEN_SUBMODULES_CHANGED-}" ]]; then
12+
git fetch "https://github.com/$GITHUB_REPOSITORY" "$GITHUB_BASE_REF"
13+
BASE_COMMIT="$(git merge-base FETCH_HEAD HEAD)"
14+
15+
echo "Searching for toolstate changes between $BASE_COMMIT and $(git rev-parse HEAD)"
16+
17+
if git diff "$BASE_COMMIT" | grep --quiet "^index .* 160000"; then
18+
# Submodules pseudo-files inside git have the 160000 permissions, so when
19+
# those files are present in the diff a submodule was updated.
20+
echo "Submodules were updated"
21+
elif ! git diff --quiet "$BASE_COMMIT" -- src/tools/clippy src/tools/rustfmt; then
22+
# There is not an easy blanket search for subtrees. For now, manually list
23+
# the subtrees.
24+
echo "Clippy or rustfmt subtrees were updated"
25+
elif ! (git diff --quiet "$BASE_COMMIT" -- \
26+
src/test/rustdoc-gui \
27+
src/librustdoc \
28+
src/tools/rustdoc-gui); then
29+
# There was a change in either rustdoc or in its GUI tests.
30+
echo "Rustdoc was updated"
31+
else
32+
echo "Not executing this job since no submodules nor subtrees were updated"
33+
ciCommandSetEnv SKIP_JOB 1
34+
exit 0
35+
fi
1436
fi
1537

16-
git fetch "https://github.com/$GITHUB_REPOSITORY" "$GITHUB_BASE_REF"
17-
BASE_COMMIT="$(git merge-base FETCH_HEAD HEAD)"
18-
19-
echo "Searching for toolstate changes between $BASE_COMMIT and $(git rev-parse HEAD)"
20-
21-
if git diff "$BASE_COMMIT" | grep --quiet "^index .* 160000"; then
22-
# Submodules pseudo-files inside git have the 160000 permissions, so when
23-
# those files are present in the diff a submodule was updated.
24-
echo "Executing the job since submodules are updated"
25-
elif ! git diff --quiet "$BASE_COMMIT" -- src/tools/clippy src/tools/rustfmt; then
26-
# There is not an easy blanket search for subtrees. For now, manually list
27-
# the subtrees.
28-
echo "Executing the job since clippy or rustfmt subtree was updated"
29-
elif ! (git diff --quiet "$BASE_COMMIT" -- \
30-
src/test/rustdoc-gui \
31-
src/librustdoc \
32-
src/tools/rustdoc-gui); then
33-
# There was a change in either rustdoc or in its GUI tests.
34-
echo "Executing the job since rustdoc was updated"
35-
else
36-
echo "Not executing this job since no submodules nor subtrees were updated"
37-
ciCommandSetEnv SKIP_JOB 1
38+
if [[ -n "${CI_ONLY_WHEN_CHANNEL-}" ]]; then
39+
if [[ "${CI_ONLY_WHEN_CHANNEL}" = "$(cat src/ci/channel)" ]]; then
40+
echo "The channel is the expected one"
41+
else
42+
echo "Not executing this job as the channel is not the expected one"
43+
ciCommandSetEnv SKIP_JOB 1
44+
exit 0
45+
fi
3846
fi
47+
48+
49+
echo "Executing the job since there is no skip rule preventing the execution"
50+
exit 0

src/librustdoc/html/render/mod.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ fn notable_traits_decl(decl: &clean::FnDecl, cx: &Context<'_>) -> String {
11941194
if out.is_empty() {
11951195
write!(
11961196
&mut out,
1197-
"<h3 class=\"notable\">Notable traits for {}</h3>\
1197+
"<div class=\"notable\">Notable traits for {}</div>\
11981198
<code class=\"content\">",
11991199
impl_.for_.print(cx)
12001200
);
@@ -1350,15 +1350,15 @@ fn render_impl(
13501350
);
13511351
render_rightside(w, cx, item, containing_item);
13521352
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
1353-
w.write_str("<code>");
1353+
w.write_str("<h4 class=\"code-header\">");
13541354
render_assoc_item(
13551355
w,
13561356
item,
13571357
link.anchor(source_id.as_ref().unwrap_or(&id)),
13581358
ItemType::Impl,
13591359
cx,
13601360
);
1361-
w.write_str("</code>");
1361+
w.write_str("</h4>");
13621362
w.write_str("</div>");
13631363
}
13641364
}
@@ -1371,7 +1371,7 @@ fn render_impl(
13711371
id, item_type, in_trait_class
13721372
);
13731373
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
1374-
w.write_str("<code>");
1374+
w.write_str("<h4 class=\"code-header\">");
13751375
assoc_type(
13761376
w,
13771377
item,
@@ -1381,7 +1381,7 @@ fn render_impl(
13811381
"",
13821382
cx,
13831383
);
1384-
w.write_str("</code>");
1384+
w.write_str("</h4>");
13851385
w.write_str("</div>");
13861386
}
13871387
clean::AssocConstItem(ref ty, ref default) => {
@@ -1394,7 +1394,7 @@ fn render_impl(
13941394
);
13951395
render_rightside(w, cx, item, containing_item);
13961396
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
1397-
w.write_str("<code>");
1397+
w.write_str("<h4 class=\"code-header\">");
13981398
assoc_const(
13991399
w,
14001400
item,
@@ -1404,15 +1404,15 @@ fn render_impl(
14041404
"",
14051405
cx,
14061406
);
1407-
w.write_str("</code>");
1407+
w.write_str("</h4>");
14081408
w.write_str("</div>");
14091409
}
14101410
clean::AssocTypeItem(ref bounds, ref default) => {
14111411
let source_id = format!("{}.{}", item_type, name);
14121412
let id = cx.derive_id(source_id.clone());
14131413
write!(w, "<div id=\"{}\" class=\"{}{}\">", id, item_type, in_trait_class,);
14141414
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
1415-
w.write_str("<code>");
1415+
w.write_str("<h4 class=\"code-header\">");
14161416
assoc_type(
14171417
w,
14181418
item,
@@ -1422,7 +1422,7 @@ fn render_impl(
14221422
"",
14231423
cx,
14241424
);
1425-
w.write_str("</code>");
1425+
w.write_str("</h4>");
14261426
w.write_str("</div>");
14271427
}
14281428
clean::StrippedItem(..) => return,
@@ -1613,7 +1613,7 @@ pub(crate) fn render_impl_summary(
16131613
write!(w, "<div id=\"{}\" class=\"impl has-srclink\"{}>", id, aliases);
16141614
render_rightside(w, cx, &i.impl_item, containing_item);
16151615
write!(w, "<a href=\"#{}\" class=\"anchor\"></a>", id);
1616-
write!(w, "<code class=\"in-band\">");
1616+
write!(w, "<h3 class=\"code-header in-band\">");
16171617

16181618
if let Some(use_absolute) = use_absolute {
16191619
write!(w, "{}", i.inner_impl().print(use_absolute, cx));
@@ -1629,7 +1629,7 @@ pub(crate) fn render_impl_summary(
16291629
} else {
16301630
write!(w, "{}", i.inner_impl().print(false, cx));
16311631
}
1632-
write!(w, "</code>");
1632+
write!(w, "</h3>");
16331633

16341634
let is_trait = i.inner_impl().trait_.is_some();
16351635
if is_trait {

src/librustdoc/html/render/print_item.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,9 @@ fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Tra
621621
render_stability_since(w, m, t, cx.tcx());
622622
write_srclink(cx, m, w);
623623
write!(w, "</div>");
624-
write!(w, "<code>");
624+
write!(w, "<h4 class=\"code-header\">");
625625
render_assoc_item(w, m, AssocItemLink::Anchor(Some(&id)), ItemType::Impl, cx);
626-
w.write_str("</code>");
626+
w.write_str("</h4>");
627627
w.write_str("</div>");
628628
if toggled {
629629
write!(w, "</summary>");

0 commit comments

Comments
 (0)