From 1bac1b40c8c428c3229a0917d4633fede5032224 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 17 Nov 2020 12:33:49 +0100 Subject: [PATCH 01/21] this is beta 1.49.0 --- src/ci/run.sh | 2 +- src/stage0.txt | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ci/run.sh b/src/ci/run.sh index 181a7fcb73266..8681f84f6ab0a 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -63,7 +63,7 @@ fi # # FIXME: need a scheme for changing this `nightly` value to `beta` and `stable` # either automatically or manually. -export RUST_RELEASE_CHANNEL=nightly +export RUST_RELEASE_CHANNEL=beta # Always set the release channel for bootstrap; this is normally not important (i.e., only dist # builds would seem to matter) but in practice bootstrap wants to know whether we're targeting diff --git a/src/stage0.txt b/src/stage0.txt index 9eaa58dd43869..e5fe11004ab6c 100644 --- a/src/stage0.txt +++ b/src/stage0.txt @@ -12,15 +12,15 @@ # source tarball for a stable release you'll likely see `1.x.0` for rustc and # `0.(x+1).0` for Cargo where they were released on `date`. -date: 2020-10-16 -rustc: beta -cargo: beta +date: 2020-11-16 +rustc: 1.48.0 +cargo: 1.48.0 # We use a nightly rustfmt to format the source because it solves some # bootstrapping issues with use of new syntax in this repo. If you're looking at # the beta/stable branch, this key should be omitted, as we don't want to depend # on rustfmt from nightly there. -rustfmt: nightly-2020-10-12 +#rustfmt: nightly-2020-10-12 # When making a stable release the process currently looks like: # @@ -40,4 +40,4 @@ rustfmt: nightly-2020-10-12 # looking at a beta source tarball and it's uncommented we'll shortly comment it # out. -#dev: 1 +dev: 1 From e881b4e26c7d5b343f91854f8025395109671bb7 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Mon, 16 Nov 2020 14:36:49 +0100 Subject: [PATCH 02/21] build-manifest: strip newline from rustc version --- src/tools/build-manifest/src/versions.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/build-manifest/src/versions.rs b/src/tools/build-manifest/src/versions.rs index f1a42e7145f90..11575139adcf6 100644 --- a/src/tools/build-manifest/src/versions.rs +++ b/src/tools/build-manifest/src/versions.rs @@ -7,7 +7,6 @@ use std::path::{Path, PathBuf}; use tar::Archive; const DEFAULT_TARGET: &str = "x86_64-unknown-linux-gnu"; -const RUSTC_VERSION: &str = include_str!("../../../version"); #[derive(Debug, Hash, Eq, PartialEq, Clone)] pub(crate) enum PkgType { @@ -177,10 +176,10 @@ impl Versions { ) -> Result { let component_name = package.tarball_component_name(); let version = match self.channel.as_str() { - "stable" => RUSTC_VERSION.into(), + "stable" => self.rustc_version().into(), "beta" => "beta".into(), "nightly" => "nightly".into(), - _ => format!("{}-dev", RUSTC_VERSION), + _ => format!("{}-dev", self.rustc_version()), }; if package.target_independent() { @@ -199,6 +198,7 @@ impl Versions { } pub(crate) fn rustc_version(&self) -> &str { - RUSTC_VERSION + const RUSTC_VERSION: &str = include_str!("../../../version"); + RUSTC_VERSION.trim() } } From a01256f4ae18526e11f5d50a584dfac8a445418a Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Thu, 12 Nov 2020 09:49:45 -0500 Subject: [PATCH 03/21] Avoid installing external LLVM dylibs If the LLVM was externally provided, then we don't currently copy artifacts into the sysroot. This is not necessarily the right choice (in particular, it will require the LLVM dylib to be in the linker's load path at runtime), but the common use case for external LLVMs is distribution provided LLVMs, and in that case they're usually in the standard search path (e.g., /usr/lib) and copying them here is going to cause problems as we may end up with the wrong files and isn't what distributions want. This behavior may be revisited in the future though. --- src/bootstrap/dist.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 5ce5737f318c7..514be9e6864ba 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -2357,6 +2357,22 @@ fn maybe_install_llvm(builder: &Builder<'_>, target: TargetSelection, dst_libdir return; } + if let Some(config) = builder.config.target_config.get(&target) { + if config.llvm_config.is_some() { + // If the LLVM was externally provided, then we don't currently copy + // artifacts into the sysroot. This is not necessarily the right + // choice (in particular, it will require the LLVM dylib to be in + // the linker's load path at runtime), but the common use case for + // external LLVMs is distribution provided LLVMs, and in that case + // they're usually in the standard search path (e.g., /usr/lib) and + // copying them here is going to cause problems as we may end up + // with the wrong files and isn't what distributions want. + // + // This behavior may be revisited in the future though. + return; + } + } + // On macOS, rustc (and LLVM tools) link to an unversioned libLLVM.dylib // instead of libLLVM-11-rust-....dylib, as on linux. It's not entirely // clear why this is the case, though. llvm-config will emit the versioned From 2101ecacf8977435ba569d477a1720e898069675 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 15 Nov 2020 08:59:53 -0500 Subject: [PATCH 04/21] Install CI llvm into the library directory --- src/bootstrap/dist.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 514be9e6864ba..9b77e38a8474f 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -2358,7 +2358,7 @@ fn maybe_install_llvm(builder: &Builder<'_>, target: TargetSelection, dst_libdir } if let Some(config) = builder.config.target_config.get(&target) { - if config.llvm_config.is_some() { + if config.llvm_config.is_some() && !builder.config.llvm_from_ci { // If the LLVM was externally provided, then we don't currently copy // artifacts into the sysroot. This is not necessarily the right // choice (in particular, it will require the LLVM dylib to be in @@ -2369,6 +2369,9 @@ fn maybe_install_llvm(builder: &Builder<'_>, target: TargetSelection, dst_libdir // with the wrong files and isn't what distributions want. // // This behavior may be revisited in the future though. + // + // If the LLVM is coming from ourselves (just from CI) though, we + // still want to install it, as it otherwise won't be available. return; } } From a9ace8cac9d9cacc2fbfb3bc649d79db17bcade5 Mon Sep 17 00:00:00 2001 From: Erin Power Date: Sun, 25 Oct 2020 18:09:28 +0100 Subject: [PATCH 05/21] Update RELEASES.md for 1.48.0 --- RELEASES.md | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index c9ff49287637d..744e569ea8441 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,125 @@ +Version 1.48.0 (2020-11-19) +========================== + +Language +-------- + +- [The `unsafe` keyword is now syntactically permitted on modules.][75857] This + is still rejected *semantically*, but can now be parsed by procedural macros. + +Compiler +-------- +- [Stabilised the `-C link=`][76158] Which tells `rustc` whether to link + its own libraries or to rely on a external linker. (supported only on + `windows-gnu`, `linux-musl`, and `wasi` platforms.) +- [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386] +- [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] + +Libraries +--------- +- [`io::Write` is now implemented for `&ChildStdin` `&Sink`, `&Stdout`, + and `&Stderr`.][76275] +- [All arrays now implement `TryFrom>`.][76310] +- [The `matches!` macro now supports having a trailing comma.][74880] +- [`Vec` now implements `PartialEq<[B]>` where `A: PartialEq`.][74194] +- [Nearly all of `Cell`'s panicking functions now use the `#[track_caller]` + attribute.][77055] + +Stabilized APIs +--------------- +- [`slice::as_ptr_range`] +- [`slice::as_mut_ptr_range`] +- [`VecDeque::make_contiguous`] +- [`future::pending`] +- [`future::ready`] + +The following previously stable methods are now `const fn`'s: + +- [`Option::is_some`] +- [`Option::is_none`] +- [`Option::as_ref`] +- [`Result::is_ok`] +- [`Result::is_err`] +- [`Result::as_ref`] +- [`Ordering::reverse`] +- [`Ordering::then`] + +Cargo +----- + +Misc +---- +- [You can now link to different items in `rustdoc` using the intra-doc link + syntax.][74430] E.g. ``/// Uses [`std::future`] `` will automatically generate + a link to `std::future`'s documentation. See ["Linking to items by + name"][intradoc-links] for more information. +- [You can now specify `#[doc(alias = "")]` on items to add search aliases + when searching through `rustdoc`'s UI.][75740] +- [You can now use `rustup install .` to specify installing the + latest availeble patch of that minor version of the toolchain.][76107] E.g. + `rustup install 1.45` would install `1.45.2`, and `1.46` would install `1.46.0`. + +Compatibility Notes +------------------- +- [`const fn`s are now implicitly promoted to `const`.][75502] Meaning that it + will only warn if your code fails `const` evaluation, and not produce an error. +- [Associated type bindings on trait objects are now verified to meet the bounds + declared on the trait when checking that they implement the trait.][27675] +- [When traits bounds on associated types or opaque types are ambiguous the + compiler no longer makes an arbitrary choice on which bound to use.][54121] +- [Fixed recursive nonterminals not being expended in macros during + pretty-print/reparse check.][77153] This may cause errors if your macro wasn't + correctly handling recursive nonterminal tokens. +- [`&mut` references to non zero-sized types are not longer promoted.][75585] +- [`rustc` will now warn if you use attributes like `#[link_name]` or `#[cold]` + in places where they have no effect.][73461] +- [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in + `arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166] + + + +Internal Only +------------- +- [Building `rustc` from source now uses `ninja` by default over `make`.][74922] + You can continue building with `make` by setting `ninja=false` in + your `config.toml`. + +[27675]: https://github.com/rust-lang/rust/issues/27675/ +[54121]: https://github.com/rust-lang/rust/issues/54121/ +[77386]: https://github.com/rust-lang/rust/pull/77386/ +[77153]: https://github.com/rust-lang/rust/pull/77153/ +[77055]: https://github.com/rust-lang/rust/pull/77055/ +[76275]: https://github.com/rust-lang/rust/pull/76275/ +[76310]: https://github.com/rust-lang/rust/pull/76310/ +[76420]: https://github.com/rust-lang/rust/pull/76420/ +[76107]: https://github.com/rust-lang/rust/pull/76107/ +[76158]: https://github.com/rust-lang/rust/pull/76158/ +[75857]: https://github.com/rust-lang/rust/pull/75857/ +[75585]: https://github.com/rust-lang/rust/pull/75585/ +[75740]: https://github.com/rust-lang/rust/pull/75740/ +[75502]: https://github.com/rust-lang/rust/pull/75502/ +[74880]: https://github.com/rust-lang/rust/pull/74880/ +[74922]: https://github.com/rust-lang/rust/pull/74922/ +[74430]: https://github.com/rust-lang/rust/pull/74430/ +[74194]: https://github.com/rust-lang/rust/pull/74194/ +[73461]: https://github.com/rust-lang/rust/pull/73461/ +[73166]: https://github.com/rust-lang/rust/pull/73166/ +[intradoc-links]: https://doc.rust-lang.org/rustdoc/linking-to-items-by-name.html +[`Option::is_some`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some +[`Option::is_none`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_none +[`Option::as_ref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_ref +[`Result::is_ok`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_ok +[`Result::is_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_err +[`Result::as_ref`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.as_ref +[`Ordering::reverse`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.reverse +[`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then +[`slice::as_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr_range +[`slice::as_mut_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_mut_ptr_range +[`VecDeque::make_contiguous`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.make_contiguous +[`future::pending`]: https://doc.rust-lang.org/std/future/fn.pending.html +[`future::ready`]: https://doc.rust-lang.org/std/future/fn.ready.html + + Version 1.47.0 (2020-10-08) ========================== From b77adff6faa47fb80a50777005e1dfc69ff3b3f5 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 25 Oct 2020 18:12:40 +0100 Subject: [PATCH 06/21] Update RELEASES.md --- RELEASES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 744e569ea8441..bfa01f3dd352b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -15,6 +15,9 @@ Compiler - [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386] - [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] +\* Refer to Rust's [platform support page][forge-platform-support] for more +information on Rust's tiered platform support. + Libraries --------- - [`io::Write` is now implemented for `&ChildStdin` `&Sink`, `&Stdout`, From bc410922422aade40be3e7ee3213be7b5c9c294a Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 25 Oct 2020 20:43:00 +0100 Subject: [PATCH 07/21] Update RELEASES.md Co-authored-by: Vadim Petrochenkov --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index bfa01f3dd352b..5e90a27fe4efb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -9,7 +9,7 @@ Language Compiler -------- -- [Stabilised the `-C link=`][76158] Which tells `rustc` whether to link +- [Stabilised the `-C link-self-contained=`][76158] Which tells `rustc` whether to link its own libraries or to rely on a external linker. (supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.) - [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386] From c321d6a9f83d0cb0d932b1f2a22aa55f4c18f4ac Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Sun, 25 Oct 2020 20:43:44 +0100 Subject: [PATCH 08/21] Apply suggestions from code review Co-authored-by: Vadim Petrochenkov Co-authored-by: Jonas Schievink Co-authored-by: Yuki Okushi --- RELEASES.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 5e90a27fe4efb..3a925e4eabad8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -10,10 +10,10 @@ Language Compiler -------- - [Stabilised the `-C link-self-contained=`][76158] Which tells `rustc` whether to link - its own libraries or to rely on a external linker. (supported only on + its own C runtime and libraries or to rely on a external linker to find them. (supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.) - [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386] -- [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] +- [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] \* Refer to Rust's [platform support page][forge-platform-support] for more information on Rust's tiered platform support. @@ -53,13 +53,13 @@ Cargo Misc ---- - [You can now link to different items in `rustdoc` using the intra-doc link - syntax.][74430] E.g. ``/// Uses [`std::future`] `` will automatically generate + syntax.][74430] E.g. ``/// Uses [`std::future`]`` will automatically generate a link to `std::future`'s documentation. See ["Linking to items by name"][intradoc-links] for more information. - [You can now specify `#[doc(alias = "")]` on items to add search aliases when searching through `rustdoc`'s UI.][75740] - [You can now use `rustup install .` to specify installing the - latest availeble patch of that minor version of the toolchain.][76107] E.g. + latest available patch of that minor version of the toolchain.][76107] E.g. `rustup install 1.45` would install `1.45.2`, and `1.46` would install `1.46.0`. Compatibility Notes @@ -68,12 +68,12 @@ Compatibility Notes will only warn if your code fails `const` evaluation, and not produce an error. - [Associated type bindings on trait objects are now verified to meet the bounds declared on the trait when checking that they implement the trait.][27675] -- [When traits bounds on associated types or opaque types are ambiguous the +- [When trait bounds on associated types or opaque types are ambiguous, the compiler no longer makes an arbitrary choice on which bound to use.][54121] - [Fixed recursive nonterminals not being expended in macros during pretty-print/reparse check.][77153] This may cause errors if your macro wasn't correctly handling recursive nonterminal tokens. -- [`&mut` references to non zero-sized types are not longer promoted.][75585] +- [`&mut` references to non zero-sized types are no longer promoted.][75585] - [`rustc` will now warn if you use attributes like `#[link_name]` or `#[cold]` in places where they have no effect.][73461] - [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in From 5921bca28f605badfadb076392c2d903fc7f5254 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Mon, 26 Oct 2020 07:11:03 +0100 Subject: [PATCH 09/21] Apply suggestions from code review Co-authored-by: Camelid Co-authored-by: Mark Rousskov --- RELEASES.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 3a925e4eabad8..9d2347c71e0be 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -9,8 +9,8 @@ Language Compiler -------- -- [Stabilised the `-C link-self-contained=`][76158] Which tells `rustc` whether to link - its own C runtime and libraries or to rely on a external linker to find them. (supported only on +- [Stabilised the `-C link-self-contained=`.][76158] This tells `rustc` whether to link + its own C runtime and libraries or to rely on a external linker to find them. (Supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.) - [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386] - [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] @@ -52,14 +52,14 @@ Cargo Misc ---- -- [You can now link to different items in `rustdoc` using the intra-doc link +- [You can now link to items in `rustdoc` using the intra-doc link syntax.][74430] E.g. ``/// Uses [`std::future`]`` will automatically generate a link to `std::future`'s documentation. See ["Linking to items by name"][intradoc-links] for more information. - [You can now specify `#[doc(alias = "")]` on items to add search aliases when searching through `rustdoc`'s UI.][75740] - [You can now use `rustup install .` to specify installing the - latest available patch of that minor version of the toolchain.][76107] E.g. + latest available patch of the specified minor version of the toolchain.][76107] E.g. `rustup install 1.45` would install `1.45.2`, and `1.46` would install `1.46.0`. Compatibility Notes @@ -70,7 +70,7 @@ Compatibility Notes declared on the trait when checking that they implement the trait.][27675] - [When trait bounds on associated types or opaque types are ambiguous, the compiler no longer makes an arbitrary choice on which bound to use.][54121] -- [Fixed recursive nonterminals not being expended in macros during +- [Fixed recursive nonterminals not being expanded in macros during pretty-print/reparse check.][77153] This may cause errors if your macro wasn't correctly handling recursive nonterminal tokens. - [`&mut` references to non zero-sized types are no longer promoted.][75585] From 51d9591de1cd36d6880d15792ae927e459566371 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Mon, 26 Oct 2020 11:23:54 +0100 Subject: [PATCH 10/21] Update RELEASES.md --- RELEASES.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 9d2347c71e0be..bfcd65d9fa84e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -50,14 +50,17 @@ The following previously stable methods are now `const fn`'s: Cargo ----- -Misc ----- +Rustdoc +------- - [You can now link to items in `rustdoc` using the intra-doc link syntax.][74430] E.g. ``/// Uses [`std::future`]`` will automatically generate a link to `std::future`'s documentation. See ["Linking to items by name"][intradoc-links] for more information. - [You can now specify `#[doc(alias = "")]` on items to add search aliases when searching through `rustdoc`'s UI.][75740] + +Rustup +------ - [You can now use `rustup install .` to specify installing the latest available patch of the specified minor version of the toolchain.][76107] E.g. `rustup install 1.45` would install `1.45.2`, and `1.46` would install `1.46.0`. @@ -78,8 +81,8 @@ Compatibility Notes in places where they have no effect.][73461] - [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in `arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166] - - +- [`mem::uninitialized` will now panic if any inner types inside a struct or enum + disallow zero-initialization].[71274] Internal Only ------------- @@ -88,7 +91,8 @@ Internal Only your `config.toml`. [27675]: https://github.com/rust-lang/rust/issues/27675/ -[54121]: https://github.com/rust-lang/rust/issues/54121/ +[54121]: https://github.com/rust-lang/rust/issues/54121/ +[71274]: https://github.com/rust-lang/rust/pull/71274/ [77386]: https://github.com/rust-lang/rust/pull/77386/ [77153]: https://github.com/rust-lang/rust/pull/77153/ [77055]: https://github.com/rust-lang/rust/pull/77055/ From dc8d2eb60b2fa09cfdd0fe9aa86da134af03cd48 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Mon, 26 Oct 2020 11:24:31 +0100 Subject: [PATCH 11/21] Update RELEASES.md --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index bfcd65d9fa84e..5671a6e65d8f4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -82,7 +82,7 @@ Compatibility Notes - [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in `arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166] - [`mem::uninitialized` will now panic if any inner types inside a struct or enum - disallow zero-initialization].[71274] + disallow zero-initialization.][71274] Internal Only ------------- From 949043e2e9a08e660c11f00434b6cc83e0e1672d Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Mon, 26 Oct 2020 11:30:23 +0100 Subject: [PATCH 12/21] Update RELEASES.md --- RELEASES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 5671a6e65d8f4..8403dfc8157b3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -22,7 +22,7 @@ Libraries --------- - [`io::Write` is now implemented for `&ChildStdin` `&Sink`, `&Stdout`, and `&Stderr`.][76275] -- [All arrays now implement `TryFrom>`.][76310] +- [All arrays of any length now implement `TryFrom>`.][76310] - [The `matches!` macro now supports having a trailing comma.][74880] - [`Vec` now implements `PartialEq<[B]>` where `A: PartialEq`.][74194] - [Nearly all of `Cell`'s panicking functions now use the `#[track_caller]` From 2317b82eb434b62e4083e0aaf791abb6bc3bed2f Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Tue, 27 Oct 2020 11:00:07 +0100 Subject: [PATCH 13/21] Update RELEASES.md --- RELEASES.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index 8403dfc8157b3..d451198831229 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -58,12 +58,6 @@ Rustdoc name"][intradoc-links] for more information. - [You can now specify `#[doc(alias = "")]` on items to add search aliases when searching through `rustdoc`'s UI.][75740] - -Rustup ------- -- [You can now use `rustup install .` to specify installing the - latest available patch of the specified minor version of the toolchain.][76107] E.g. - `rustup install 1.45` would install `1.45.2`, and `1.46` would install `1.46.0`. Compatibility Notes ------------------- @@ -83,6 +77,9 @@ Compatibility Notes `arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166] - [`mem::uninitialized` will now panic if any inner types inside a struct or enum disallow zero-initialization.][71274] +- [`#[target_feature]` will now error if used in a place where it has no effect.][78143] + +[78143]: https://github.com/rust-lang/rust/issues/78143 Internal Only ------------- @@ -99,7 +96,6 @@ Internal Only [76275]: https://github.com/rust-lang/rust/pull/76275/ [76310]: https://github.com/rust-lang/rust/pull/76310/ [76420]: https://github.com/rust-lang/rust/pull/76420/ -[76107]: https://github.com/rust-lang/rust/pull/76107/ [76158]: https://github.com/rust-lang/rust/pull/76158/ [75857]: https://github.com/rust-lang/rust/pull/75857/ [75585]: https://github.com/rust-lang/rust/pull/75585/ From 70d23b15782c44eefa8fc46f918aa06a7f6f4130 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Tue, 27 Oct 2020 13:04:05 +0100 Subject: [PATCH 14/21] Update RELEASES.md --- RELEASES.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index d451198831229..a32a6dd7cd5d9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -25,8 +25,7 @@ Libraries - [All arrays of any length now implement `TryFrom>`.][76310] - [The `matches!` macro now supports having a trailing comma.][74880] - [`Vec` now implements `PartialEq<[B]>` where `A: PartialEq`.][74194] -- [Nearly all of `Cell`'s panicking functions now use the `#[track_caller]` - attribute.][77055] +- [The `RefCell::{replace, replace_with, clone}` methods now all use `#[track_caller]`.][77055] Stabilized APIs --------------- @@ -61,8 +60,9 @@ Rustdoc Compatibility Notes ------------------- -- [`const fn`s are now implicitly promoted to `const`.][75502] Meaning that it - will only warn if your code fails `const` evaluation, and not produce an error. +- [Promotion of references to `'static` lifetime inside `const fn` now follows the + same rules as inside a `fn` body.][75502] In particular, `&foo()` will not be + promoted to `'static` lifetime any more inside `const fn`s. - [Associated type bindings on trait objects are now verified to meet the bounds declared on the trait when checking that they implement the trait.][27675] - [When trait bounds on associated types or opaque types are ambiguous, the From c571271e561c1f0eaca3faae222db3364afaa01e Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Tue, 27 Oct 2020 13:07:14 +0100 Subject: [PATCH 15/21] Update RELEASES.md --- RELEASES.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index a32a6dd7cd5d9..081034288dbb9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -9,9 +9,9 @@ Language Compiler -------- -- [Stabilised the `-C link-self-contained=`.][76158] This tells `rustc` whether to link - its own C runtime and libraries or to rely on a external linker to find them. (Supported only on - `windows-gnu`, `linux-musl`, and `wasi` platforms.) +- [Stabilised the `-C link-self-contained=` compiler flag.][76158] This tells + `rustc` whether to link its own C runtime and libraries or to rely on a external + linker to find them. (Supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.) - [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386] - [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] From 53597c7d62cf58b9916bd3a08517ee1163105a44 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Thu, 29 Oct 2020 16:28:17 +0100 Subject: [PATCH 16/21] Update RELEASES.md --- RELEASES.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/RELEASES.md b/RELEASES.md index 081034288dbb9..385974a5dc7ae 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -78,15 +78,25 @@ Compatibility Notes - [`mem::uninitialized` will now panic if any inner types inside a struct or enum disallow zero-initialization.][71274] - [`#[target_feature]` will now error if used in a place where it has no effect.][78143] +- [Foreign exceptions are now caught by `catch_unwind` and will cause an abort.][70212] [78143]: https://github.com/rust-lang/rust/issues/78143 Internal Only ------------- +These changes provide no direct user facing benefits, but represent significant +improvements to the internals and overall performance of rustc and +related tools. + - [Building `rustc` from source now uses `ninja` by default over `make`.][74922] You can continue building with `make` by setting `ninja=false` in your `config.toml`. +- [cg_llvm: `fewer_names` in `uncached_llvm_type`][76030] +- [Made `ensure_sufficient_stack()` non-generic][76680] +[76680]: https://github.com/rust-lang/rust/pull/76680/ +[76030]: https://github.com/rust-lang/rust/pull/76030/ +[70212]: https://github.com/rust-lang/rust/pull/70212/ [27675]: https://github.com/rust-lang/rust/issues/27675/ [54121]: https://github.com/rust-lang/rust/issues/54121/ [71274]: https://github.com/rust-lang/rust/pull/71274/ @@ -215,6 +225,7 @@ Compatibility Notes Internal Only -------- + - [Improved default settings for bootstrapping in `x.py`.][73964] You can read details about this change in the ["Changes to `x.py` defaults"](https://blog.rust-lang.org/inside-rust/2020/08/30/changes-to-x-py-defaults.html) post on the Inside Rust blog. [1.47.0-cfg]: https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard From 2f3b6e132044ddd7c72553380c5cc0f062d65357 Mon Sep 17 00:00:00 2001 From: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com> Date: Thu, 12 Nov 2020 16:20:22 +0100 Subject: [PATCH 17/21] Update RELEASES.md --- RELEASES.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASES.md b/RELEASES.md index 385974a5dc7ae..9fd796fd775bf 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -13,6 +13,7 @@ Compiler `rustc` whether to link its own C runtime and libraries or to rely on a external linker to find them. (Supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.) - [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386] + Note: If you're using cargo you must explicitly pass the `--target` flag. - [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] \* Refer to Rust's [platform support page][forge-platform-support] for more @@ -79,8 +80,10 @@ Compatibility Notes disallow zero-initialization.][71274] - [`#[target_feature]` will now error if used in a place where it has no effect.][78143] - [Foreign exceptions are now caught by `catch_unwind` and will cause an abort.][70212] + Note: This behaviour is not guaranteed and is still considered undefined behaviour, + see the [`catch_unwind`] documentation for further information. + -[78143]: https://github.com/rust-lang/rust/issues/78143 Internal Only ------------- @@ -94,6 +97,7 @@ related tools. - [cg_llvm: `fewer_names` in `uncached_llvm_type`][76030] - [Made `ensure_sufficient_stack()` non-generic][76680] +[78143]: https://github.com/rust-lang/rust/issues/78143 [76680]: https://github.com/rust-lang/rust/pull/76680/ [76030]: https://github.com/rust-lang/rust/pull/76030/ [70212]: https://github.com/rust-lang/rust/pull/70212/ @@ -118,6 +122,7 @@ related tools. [73461]: https://github.com/rust-lang/rust/pull/73461/ [73166]: https://github.com/rust-lang/rust/pull/73166/ [intradoc-links]: https://doc.rust-lang.org/rustdoc/linking-to-items-by-name.html +[`catch_unwind`]: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html [`Option::is_some`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some [`Option::is_none`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_none [`Option::as_ref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_ref From f7886a62772dc571f8ad266561f267d5f88a819d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 14 Oct 2020 17:02:04 +0200 Subject: [PATCH 18/21] Ensure that the source code display is working with DOS backline --- src/librustdoc/html/highlight.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index 4769edc50ff07..986337336540a 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -21,6 +21,8 @@ pub fn render_with_highlighting( playground_button: Option<&str>, tooltip: Option<(&str, &str)>, ) -> String { + // This replace allows to fix how the code source with DOS backline characters is displayed. + let src = src.replace("\r\n", "\n"); debug!("highlighting: ================\n{}\n==============", src); let mut out = String::with_capacity(src.len()); if let Some((tooltip, class)) = tooltip { From d2df22268c9eb0e900a72157170d2b320daa3099 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 15 Nov 2020 20:51:25 +0100 Subject: [PATCH 19/21] Add test to ensure that no DOS backline (\r\n) doesn't create extra backline in source rendering --- src/librustdoc/html/highlight.rs | 6 ++-- .../html/highlight/fixtures/dos_line.html | 3 ++ src/librustdoc/html/highlight/tests.rs | 32 ++++++++++++------- 3 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 src/librustdoc/html/highlight/fixtures/dos_line.html diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index 986337336540a..b5fe593dc0105 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -21,8 +21,6 @@ pub fn render_with_highlighting( playground_button: Option<&str>, tooltip: Option<(&str, &str)>, ) -> String { - // This replace allows to fix how the code source with DOS backline characters is displayed. - let src = src.replace("\r\n", "\n"); debug!("highlighting: ================\n{}\n==============", src); let mut out = String::with_capacity(src.len()); if let Some((tooltip, class)) = tooltip { @@ -48,7 +46,9 @@ fn write_header(out: &mut String, class: Option<&str>) { } fn write_code(out: &mut String, src: &str) { - Classifier::new(src).highlight(&mut |highlight| { + // This replace allows to fix how the code source with DOS backline characters is displayed. + let src = src.replace("\r\n", "\n"); + Classifier::new(&src).highlight(&mut |highlight| { match highlight { Highlight::Token { text, class } => string(out, Escape(text), class), Highlight::EnterSpan { class } => enter_span(out, class), diff --git a/src/librustdoc/html/highlight/fixtures/dos_line.html b/src/librustdoc/html/highlight/fixtures/dos_line.html new file mode 100644 index 0000000000000..4400f85681d8a --- /dev/null +++ b/src/librustdoc/html/highlight/fixtures/dos_line.html @@ -0,0 +1,3 @@ +pub fn foo() { +println!("foo"); +} diff --git a/src/librustdoc/html/highlight/tests.rs b/src/librustdoc/html/highlight/tests.rs index c79471b1fae6b..f57f52d6f0875 100644 --- a/src/librustdoc/html/highlight/tests.rs +++ b/src/librustdoc/html/highlight/tests.rs @@ -1,17 +1,6 @@ use super::write_code; use expect_test::expect_file; -#[test] -fn test_html_highlighting() { - let src = include_str!("fixtures/sample.rs"); - let html = { - let mut out = String::new(); - write_code(&mut out, src); - format!("{}
{}
\n", STYLE, out) - }; - expect_file!["fixtures/sample.html"].assert_eq(&html); -} - const STYLE: &str = r#" "#; + +#[test] +fn test_html_highlighting() { + let src = include_str!("fixtures/sample.rs"); + let html = { + let mut out = String::new(); + write_code(&mut out, src); + format!("{}
{}
\n", STYLE, out) + }; + expect_file!["fixtures/sample.html"].assert_eq(&html); +} + +#[test] +fn test_dos_backline() { + let src = "pub fn foo() {\r\n\ + println!(\"foo\");\r\n\ +}\r\n"; + let mut html = String::new(); + write_code(&mut html, src); + expect_file!["fixtures/dos_line.html"].assert_eq(&html); +} From 6142bf6bd91cff38e4067e513813705e5e90ceb7 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 6 Oct 2020 22:36:12 -0400 Subject: [PATCH 20/21] Update fulldeps test --- .../ui-fulldeps/session-derive-errors.stderr | 47 +++++++------------ 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/src/test/ui-fulldeps/session-derive-errors.stderr b/src/test/ui-fulldeps/session-derive-errors.stderr index c1be151f1c1ce..303268fae27a1 100644 --- a/src/test/ui-fulldeps/session-derive-errors.stderr +++ b/src/test/ui-fulldeps/session-derive-errors.stderr @@ -1,25 +1,20 @@ error: `#[derive(SessionDiagnostic)]` can only be used on structs --> $DIR/session-derive-errors.rs:28:1 | -LL | / #[error = "E0123"] -LL | | -LL | | enum SessionDiagnosticOnEnum { -LL | | Foo, -LL | | Bar, -LL | | } - | |_^ +LL | #[error = "E0123"] + | ^ error: `#[label = ...]` is not a valid SessionDiagnostic struct attribute --> $DIR/session-derive-errors.rs:37:1 | LL | #[label = "This is in the wrong place"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^ error: `#[suggestion = ...]` is not a valid SessionDiagnostic field attribute --> $DIR/session-derive-errors.rs:44:5 | LL | #[suggestion = "this is the wrong kind of attribute"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^ error: `error` specified multiple times --> $DIR/session-derive-errors.rs:52:11 @@ -37,7 +32,7 @@ error: `code` not specified --> $DIR/session-derive-errors.rs:67:1 | LL | struct ErrorCodeNotProvided {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^ | = help: use the [code = "..."] attribute to set this diagnostic's error code @@ -45,13 +40,13 @@ error: the `#[message = "..."]` attribute can only be applied to fields of type --> $DIR/session-derive-errors.rs:95:5 | LL | #[message = "this message is applied to a String field"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^ error: `name` doesn't refer to a field on this type --> $DIR/session-derive-errors.rs:102:1 | LL | #[message = "This error has a field, and references {name}"] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^ error: invalid format string: expected `'}'` but string was terminated --> $DIR/session-derive-errors.rs:110:1 @@ -77,59 +72,53 @@ error: The `#[label = ...]` attribute can only be applied to fields of type Span --> $DIR/session-derive-errors.rs:138:5 | LL | #[label = "See here"] - | ^^^^^^^^^^^^^^^^^^^^^ + | ^ error: `nonsense` is not a valid key for `#[suggestion(...)]` --> $DIR/session-derive-errors.rs:163:18 | LL | #[suggestion(nonsense = "This is nonsense")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^ error: `msg` is not a valid key for `#[suggestion(...)]` --> $DIR/session-derive-errors.rs:171:18 | LL | #[suggestion(msg = "This is a suggestion")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^ error: missing suggestion message --> $DIR/session-derive-errors.rs:179:7 | LL | #[suggestion(code = "This is suggested code")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^ | = help: provide a suggestion message using #[suggestion(message = "...")] error: wrong field type for suggestion --> $DIR/session-derive-errors.rs:194:5 | -LL | / #[suggestion(message = "This is a message", code = "This is suggested code")] -LL | | -LL | | suggestion: Applicability, - | |_____________________________^ +LL | #[suggestion(message = "This is a message", code = "This is suggested code")] + | ^ | = help: #[suggestion(...)] should be applied to fields of type Span or (Span, Applicability) error: type of field annotated with `#[suggestion(...)]` contains more than one Span --> $DIR/session-derive-errors.rs:209:5 | -LL | / #[suggestion(message = "This is a message", code = "This is suggested code")] -LL | | -LL | | suggestion: (Span, Span, Applicability), - | |___________________________________________^ +LL | #[suggestion(message = "This is a message", code = "This is suggested code")] + | ^ error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability --> $DIR/session-derive-errors.rs:217:5 | -LL | / #[suggestion(message = "This is a message", code = "This is suggested code")] -LL | | -LL | | suggestion: (Applicability, Applicability, Span), - | |____________________________________________________^ +LL | #[suggestion(message = "This is a message", code = "This is suggested code")] + | ^ error: invalid annotation list `#[label(...)]` --> $DIR/session-derive-errors.rs:225:7 | LL | #[label("wrong kind of annotation for label")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^ error: aborting due to 18 previous errors From 7477867b01d5c59a5847633808088f1e53708f9e Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 17 Nov 2020 16:00:41 -0500 Subject: [PATCH 21/21] Ignore failures of RLS on aarch64 Windows --- src/bootstrap/dist.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 9b77e38a8474f..29fccc0533bfe 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -1336,7 +1336,13 @@ impl Step for Rls { let rls = builder .ensure(tool::Rls { compiler, target, extra_features: Vec::new() }) .or_else(|| { - missing_tool("RLS", builder.build.config.missing_tools); + // We ignore failure on aarch64 Windows because RLS currently + // fails to build, due to winapi 0.2 not supporting aarch64. + missing_tool( + "RLS", + builder.build.config.missing_tools + || (target.triple.contains("aarch64") && target.triple.contains("windows")), + ); None })?;