Skip to content

Commit 83cc9da

Browse files
committed
Auto merge of #59737 - pietroalbini:beta-rollup, r=pietroalbini
[beta] Rollup backports Cherry-picked: * #58021: Fix fallout from #57667 * #59599: Updated RELEASES.md for 1.34.0 * #59587: Remove #[doc(hidden)] from Error::type_id * #58994: Hide deprecation warnings inside derive expansions * #58015: Expand docs for `TryFrom` and `TryInto`. * #59770: ci: pin android emulator to 28.0.23 * #59704: ci: Update FreeBSD tarball downloads * #59257: Update CI configuration for building Redox libraries * #59724: Function arguments should never get promoted * #59499: Fix broken download link in the armhf-gnu image * #58330: Add rustdoc JS non-std tests * #58848: Prevent cache issues on version updates r? @ghost
2 parents 4655b72 + d05ef97 commit 83cc9da

Some content is hidden

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

53 files changed

+869
-116
lines changed

RELEASES.md

+149
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,149 @@
1+
Version 1.34.0 (2019-04-11)
2+
==========================
3+
4+
Language
5+
--------
6+
- [You can now use `#[deprecated = "reason"]`][58166] as a shorthand for
7+
`#[deprecated(note = "reason")]`. This was previously allowed by mistake
8+
but had no effect.
9+
- [You can now accept token streams in `#[attr()]`,`#[attr[]]`, and
10+
`#[attr{}]` procedural macros.][57367]
11+
- [You can now write `extern crate self as foo;`][57407] to import your
12+
crate's root into the extern prelude.
13+
14+
15+
Compiler
16+
--------
17+
- [You can now target `riscv64imac-unknown-none-elf` and
18+
`riscv64gc-unknown-none-elf`.][58406]
19+
- [You can now enable linker plugin LTO optimisations with
20+
`-C linker-plugin-lto`.][58057] This allows rustc to compile your Rust code
21+
into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI
22+
boundaries.
23+
- [You can now target `powerpc64-unknown-freebsd`.][57809]
24+
25+
26+
Libraries
27+
---------
28+
- [The trait bounds have been removed on some of `HashMap<K, V, S>`'s and
29+
`HashSet<T, S>`'s basic methods.][58370] Most notably you no longer require
30+
the `Hash` trait to create an iterator.
31+
- [The `Ord` trait bounds have been removed on some of `BinaryHeap<T>`'s basic
32+
methods.][58421] Most notably you no longer require the `Ord` trait to create
33+
an iterator.
34+
- [The methods `overflowing_neg` and `wrapping_neg` are now `const` functions
35+
for all numeric types.][58044]
36+
- [Indexing a `str` is now generic over all types that
37+
implement `SliceIndex<str>`.][57604]
38+
- [`str::trim`, `str::trim_matches`, `str::trim_{start, end}`, and
39+
`str::trim_{start, end}_matches` are now `#[must_use]`][57106] and will
40+
produce a warning if their returning type is unused.
41+
- [The methods `checked_pow`, `saturating_pow`, `wrapping_pow`, and
42+
`overflowing_pow` are now available for all numeric types.][57873] These are
43+
equivalvent to methods such as `wrapping_add` for the `pow` operation.
44+
45+
46+
Stabilized APIs
47+
---------------
48+
49+
#### std & core
50+
* [`Any::type_id`]
51+
* [`Error::type_id`]
52+
* [`atomic::AtomicI16`]
53+
* [`atomic::AtomicI32`]
54+
* [`atomic::AtomicI64`]
55+
* [`atomic::AtomicI8`]
56+
* [`atomic::AtomicU16`]
57+
* [`atomic::AtomicU32`]
58+
* [`atomic::AtomicU64`]
59+
* [`atomic::AtomicU8`]
60+
* [`convert::Infallible`]
61+
* [`convert::TryFrom`]
62+
* [`convert::TryInto`]
63+
* [`iter::from_fn`]
64+
* [`iter::successors`]
65+
* [`num::NonZeroI128`]
66+
* [`num::NonZeroI16`]
67+
* [`num::NonZeroI32`]
68+
* [`num::NonZeroI64`]
69+
* [`num::NonZeroI8`]
70+
* [`num::NonZeroIsize`]
71+
* [`slice::sort_by_cached_key`]
72+
* [`str::escape_debug`]
73+
* [`str::escape_default`]
74+
* [`str::escape_unicode`]
75+
* [`str::split_ascii_whitespace`]
76+
77+
#### std
78+
* [`Instant::checked_add`]
79+
* [`Instant::checked_sub`]
80+
* [`SystemTime::checked_add`]
81+
* [`SystemTime::checked_sub`]
82+
83+
Cargo
84+
-----
85+
- [You can now use alternative registries to crates.io.][cargo/6654]
86+
87+
Misc
88+
----
89+
- [You can now use the `?` operator in your documentation tests without manually
90+
adding `fn main() -> Result<(), _> {}`.][56470]
91+
92+
Compatibility Notes
93+
-------------------
94+
- [`Command::before_exec` is now deprecated in favor of the
95+
unsafe method `Command::pre_exec`.][58059]
96+
- [Use of `ATOMIC_{BOOL, ISIZE, USIZE}_INIT` is now deprecated.][57425] As you
97+
can now use `const` functions in `static` variables.
98+
99+
[58370]: https://github.com/rust-lang/rust/pull/58370/
100+
[58406]: https://github.com/rust-lang/rust/pull/58406/
101+
[58421]: https://github.com/rust-lang/rust/pull/58421/
102+
[58166]: https://github.com/rust-lang/rust/pull/58166/
103+
[58044]: https://github.com/rust-lang/rust/pull/58044/
104+
[58057]: https://github.com/rust-lang/rust/pull/58057/
105+
[58059]: https://github.com/rust-lang/rust/pull/58059/
106+
[57809]: https://github.com/rust-lang/rust/pull/57809/
107+
[57873]: https://github.com/rust-lang/rust/pull/57873/
108+
[57604]: https://github.com/rust-lang/rust/pull/57604/
109+
[57367]: https://github.com/rust-lang/rust/pull/57367/
110+
[57407]: https://github.com/rust-lang/rust/pull/57407/
111+
[57425]: https://github.com/rust-lang/rust/pull/57425/
112+
[57106]: https://github.com/rust-lang/rust/pull/57106/
113+
[56470]: https://github.com/rust-lang/rust/pull/56470/
114+
[cargo/6654]: https://github.com/rust-lang/cargo/pull/6654/
115+
[`Any::type_id`]: https://doc.rust-lang.org/std/any/trait.Any.html#tymethod.type_id
116+
[`Error::type_id`]: https://doc.rust-lang.org/std/error/trait.Error.html#tymethod.type_id
117+
[`atomic::AtomicI16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI16.html
118+
[`atomic::AtomicI32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI32.html
119+
[`atomic::AtomicI64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI64.html
120+
[`atomic::AtomicI8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI8.html
121+
[`atomic::AtomicU16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU16.html
122+
[`atomic::AtomicU32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU32.html
123+
[`atomic::AtomicU64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU64.html
124+
[`atomic::AtomicU8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU8.html
125+
[`convert::Infallible`]: https://doc.rust-lang.org/std/convert/enum.Infallible.html
126+
[`convert::TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html
127+
[`convert::TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html
128+
[`iter::from_fn`]: https://doc.rust-lang.org/std/iter/fn.from_fn.html
129+
[`iter::successors`]: https://doc.rust-lang.org/std/iter/fn.successors.html
130+
[`num::NonZeroI128`]: https://doc.rust-lang.org/std/num/struct.NonZeroI128.html
131+
[`num::NonZeroI16`]: https://doc.rust-lang.org/std/num/struct.NonZeroI16.html
132+
[`num::NonZeroI32`]: https://doc.rust-lang.org/std/num/struct.NonZeroI32.html
133+
[`num::NonZeroI64`]: https://doc.rust-lang.org/std/num/struct.NonZeroI64.html
134+
[`num::NonZeroI8`]: https://doc.rust-lang.org/std/num/struct.NonZeroI8.html
135+
[`num::NonZeroIsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroIsize.html
136+
[`slice::sort_by_cached_key`]: https://doc.rust-lang.org/std/slice/fn.sort_by_cached_key
137+
[`str::escape_debug`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug
138+
[`str::escape_default`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_default
139+
[`str::escape_unicode`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_unicode
140+
[`str::split_ascii_whitespace`]: https://doc.rust-lang.org/std/primitive.str.html#method.split_ascii_whitespace
141+
[`Instant::checked_add`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_add
142+
[`Instant::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_sub
143+
[`SystemTime::checked_add`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_add
144+
[`SystemTime::checked_sub`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_sub
145+
146+
1147
Version 1.33.0 (2019-02-28)
2148
==========================
3149

@@ -99,6 +245,8 @@ Stabilized APIs
99245

100246
Cargo
101247
-----
248+
- [You can now publish crates that require a feature flag to compile with
249+
`cargo publish --features` or `cargo publish --all-features`.][cargo/6453]
102250
- [Cargo should now rebuild a crate if a file was modified during the initial
103251
build.][cargo/6484]
104252

@@ -135,6 +283,7 @@ Compatibility Notes
135283
[57535]: https://github.com/rust-lang/rust/pull/57535/
136284
[57566]: https://github.com/rust-lang/rust/pull/57566/
137285
[57615]: https://github.com/rust-lang/rust/pull/57615/
286+
[cargo/6453]: https://github.com/rust-lang/cargo/pull/6453/
138287
[cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/
139288
[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at
140289
[`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at

src/bootstrap/bin/rustdoc.rs

+11
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ fn main() {
6969
.arg("unstable-options");
7070
}
7171
cmd.arg("--generate-redirect-pages");
72+
has_unstable = true;
73+
}
74+
75+
// Needed to be able to run all rustdoc tests.
76+
if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") {
77+
// This "unstable-options" can be removed when `--resource-suffix` is stabilized
78+
if !has_unstable {
79+
cmd.arg("-Z")
80+
.arg("unstable-options");
81+
}
82+
cmd.arg("--resource-suffix").arg(x);
7283
}
7384

7485
if verbose > 1 {

src/bootstrap/builder.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ impl<'a> Builder<'a> {
405405
test::Miri,
406406
test::Clippy,
407407
test::CompiletestTest,
408-
test::RustdocJS,
408+
test::RustdocJSStd,
409+
test::RustdocJSNotStd,
409410
test::RustdocTheme,
410411
// Run bootstrap close to the end as it's unlikely to fail
411412
test::Bootstrap,

src/bootstrap/doc.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,9 @@ fn invoke_rustdoc(
343343
.arg("--html-before-content").arg(&version_info)
344344
.arg("--html-in-header").arg(&favicon)
345345
.arg("--markdown-no-toc")
346-
.arg("--markdown-playground-url")
347-
.arg("https://play.rust-lang.org/")
348-
.arg("-o").arg(&out)
349-
.arg(&path)
350-
.arg("--markdown-css")
351-
.arg("../rust.css");
346+
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
347+
.arg("-o").arg(&out).arg(&path)
348+
.arg("--markdown-css").arg("../rust.css");
352349

353350
builder.run(&mut cmd);
354351
}
@@ -431,8 +428,7 @@ impl Step for Standalone {
431428
.arg("--html-in-header").arg(&favicon)
432429
.arg("--markdown-no-toc")
433430
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"))
434-
.arg("--markdown-playground-url")
435-
.arg("https://play.rust-lang.org/")
431+
.arg("--markdown-playground-url").arg("https://play.rust-lang.org/")
436432
.arg("-o").arg(&out)
437433
.arg(&path);
438434

@@ -523,6 +519,7 @@ impl Step for Std {
523519
.arg("--markdown-css").arg("rust.css")
524520
.arg("--markdown-no-toc")
525521
.arg("--generate-redirect-pages")
522+
.arg("--resource-suffix").arg(crate::channel::CFG_RELEASE_NUM)
526523
.arg("--index-page").arg(&builder.src.join("src/doc/index.md"));
527524

528525
builder.run(&mut cargo);
@@ -589,6 +586,7 @@ impl Step for Test {
589586

590587
cargo.arg("--no-deps")
591588
.arg("-p").arg("test")
589+
.env("RUSTDOC_RESOURCE_SUFFIX", crate::channel::CFG_RELEASE_NUM)
592590
.env("RUSTDOC_GENERATE_REDIRECT_PAGES", "1");
593591

594592
builder.run(&mut cargo);
@@ -660,6 +658,7 @@ impl Step for WhitelistedRustc {
660658
// for which docs must be built.
661659
for krate in &["proc_macro"] {
662660
cargo.arg("-p").arg(krate)
661+
.env("RUSTDOC_RESOURCE_SUFFIX", crate::channel::CFG_RELEASE_NUM)
663662
.env("RUSTDOC_GENERATE_REDIRECT_PAGES", "1");
664663
}
665664

@@ -886,6 +885,7 @@ impl Step for ErrorIndex {
886885
let mut index = builder.tool_cmd(Tool::ErrorIndex);
887886
index.arg("html");
888887
index.arg(out.join("error-index.html"));
888+
index.arg(crate::channel::CFG_RELEASE_NUM);
889889

890890
// FIXME: shouldn't have to pass this env var
891891
index.env("CFG_BUILD", &builder.config.build)

src/bootstrap/test.rs

+53-9
Original file line numberDiff line numberDiff line change
@@ -574,22 +574,22 @@ impl Step for RustdocTheme {
574574
}
575575

576576
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
577-
pub struct RustdocJS {
577+
pub struct RustdocJSStd {
578578
pub host: Interned<String>,
579579
pub target: Interned<String>,
580580
}
581581

582-
impl Step for RustdocJS {
582+
impl Step for RustdocJSStd {
583583
type Output = ();
584584
const DEFAULT: bool = true;
585585
const ONLY_HOSTS: bool = true;
586586

587587
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
588-
run.path("src/test/rustdoc-js")
588+
run.path("src/test/rustdoc-js-std")
589589
}
590590

591591
fn make_run(run: RunConfig<'_>) {
592-
run.builder.ensure(RustdocJS {
592+
run.builder.ensure(RustdocJSStd {
593593
host: run.host,
594594
target: run.target,
595595
});
@@ -598,12 +598,55 @@ impl Step for RustdocJS {
598598
fn run(self, builder: &Builder<'_>) {
599599
if let Some(ref nodejs) = builder.config.nodejs {
600600
let mut command = Command::new(nodejs);
601-
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
601+
command.args(&["src/tools/rustdoc-js-std/tester.js", &*self.host]);
602602
builder.ensure(crate::doc::Std {
603603
target: self.target,
604604
stage: builder.top_stage,
605605
});
606606
builder.run(&mut command);
607+
} else {
608+
builder.info(
609+
"No nodejs found, skipping \"src/test/rustdoc-js-std\" tests"
610+
);
611+
}
612+
}
613+
}
614+
615+
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
616+
pub struct RustdocJSNotStd {
617+
pub host: Interned<String>,
618+
pub target: Interned<String>,
619+
pub compiler: Compiler,
620+
}
621+
622+
impl Step for RustdocJSNotStd {
623+
type Output = ();
624+
const DEFAULT: bool = true;
625+
const ONLY_HOSTS: bool = true;
626+
627+
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
628+
run.path("src/test/rustdoc-js")
629+
}
630+
631+
fn make_run(run: RunConfig<'_>) {
632+
let compiler = run.builder.compiler(run.builder.top_stage, run.host);
633+
run.builder.ensure(RustdocJSNotStd {
634+
host: run.host,
635+
target: run.target,
636+
compiler,
637+
});
638+
}
639+
640+
fn run(self, builder: &Builder<'_>) {
641+
if builder.config.nodejs.is_some() {
642+
builder.ensure(Compiletest {
643+
compiler: self.compiler,
644+
target: self.target,
645+
mode: "js-doc-test",
646+
suite: "rustdoc-js",
647+
path: None,
648+
compare_mode: None,
649+
});
607650
} else {
608651
builder.info(
609652
"No nodejs found, skipping \"src/test/rustdoc-js\" tests"
@@ -990,12 +1033,13 @@ impl Step for Compiletest {
9901033
.arg(builder.sysroot_libdir(compiler, target));
9911034
cmd.arg("--rustc-path").arg(builder.rustc(compiler));
9921035

993-
let is_rustdoc_ui = suite.ends_with("rustdoc-ui");
1036+
let is_rustdoc = suite.ends_with("rustdoc-ui") || suite.ends_with("rustdoc-js");
9941037

9951038
// Avoid depending on rustdoc when we don't need it.
9961039
if mode == "rustdoc"
9971040
|| (mode == "run-make" && suite.ends_with("fulldeps"))
998-
|| (mode == "ui" && is_rustdoc_ui)
1041+
|| (mode == "ui" && is_rustdoc)
1042+
|| mode == "js-doc-test"
9991043
{
10001044
cmd.arg("--rustdoc-path")
10011045
.arg(builder.rustdoc(compiler.host));
@@ -1029,12 +1073,12 @@ impl Step for Compiletest {
10291073
cmd.arg("--nodejs").arg(nodejs);
10301074
}
10311075

1032-
let mut flags = if is_rustdoc_ui {
1076+
let mut flags = if is_rustdoc {
10331077
Vec::new()
10341078
} else {
10351079
vec!["-Crpath".to_string()]
10361080
};
1037-
if !is_rustdoc_ui {
1081+
if !is_rustdoc {
10381082
if builder.config.rust_optimize_tests {
10391083
flags.push("-O".to_string());
10401084
}

src/ci/docker/arm-android/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN dpkg --add-architecture i386 && \
2323

2424
COPY scripts/android-sdk.sh /scripts/
2525
RUN . /scripts/android-sdk.sh && \
26-
download_and_create_avd 4333796 armeabi-v7a 18
26+
download_and_create_avd 4333796 armeabi-v7a 18 5264690
2727

2828
ENV PATH=$PATH:/android/sdk/emulator
2929
ENV PATH=$PATH:/android/sdk/tools

src/ci/docker/armhf-gnu/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ COPY scripts/qemu-bare-bones-addentropy.c /tmp/addentropy.c
7171
RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
7272

7373
# TODO: What is this?!
74-
RUN curl -O http://ftp.nl.debian.org/debian/dists/jessie/main/installer-armhf/current/images/device-tree/vexpress-v2p-ca15-tc1.dtb
74+
# Source of the file: https://github.com/vfdev-5/qemu-rpi2-vexpress/raw/master/vexpress-v2p-ca15-tc1.dtb
75+
RUN curl -O https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/vexpress-v2p-ca15-tc1.dtb
7576

7677
COPY scripts/sccache.sh /scripts/
7778
RUN sh /scripts/sccache.sh

src/ci/docker/disabled/dist-x86_64-redox/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ COPY scripts/crosstool-ng.sh /scripts/
77
RUN sh /scripts/crosstool-ng.sh
88

99
WORKDIR /tmp
10-
COPY cross/install-x86_64-redox.sh /tmp/
11-
RUN ./install-x86_64-redox.sh
10+
COPY dist-various-1/install-x86_64-redox.sh /scripts/
11+
RUN sh /scripts/install-x86_64-redox.sh
1212

1313
COPY scripts/sccache.sh /scripts/
1414
RUN sh /scripts/sccache.sh

0 commit comments

Comments
 (0)