diff --git a/.reuse/dep5 b/.reuse/dep5 index e62e3504090a..2c3adf1bfa1b 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -18,6 +18,7 @@ Files: compiler/* configure CONTRIBUTING.md COPYRIGHT + INSTALL.md LICENSE-APACHE LICENSE-MIT README.md @@ -51,7 +52,7 @@ Copyright: 2019 The Crossbeam Project Developers The Rust Project Developers (see https://thanks.rust-lang.org) License: MIT OR Apache-2.0 -Files: library/std/src/sys/unix/locks/fuchsia_mutex.rs +Files: library/std/src/sys/pal/unix/locks/fuchsia_mutex.rs Copyright: 2016 The Fuchsia Authors The Rust Project Developers (see https://thanks.rust-lang.org) License: BSD-2-Clause AND (MIT OR Apache-2.0) diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 000000000000..b872d317e362 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,253 @@ +# Installing from Source + +**Note: This document describes _building_ Rust _from source_. +This is _not recommended_ if you don't know what you're doing. +If you just want to install Rust, check out the [README.md](README.md) instead.** + +The Rust build system uses a Python script called `x.py` to build the compiler, +which manages the bootstrapping process. It lives at the root of the project. +It also uses a file named `config.toml` to determine various configuration +settings for the build. You can see a full list of options in +`config.example.toml`. + +The `x.py` command can be run directly on most Unix systems in the following +format: + +```sh +./x.py [flags] +``` + +This is how the documentation and examples assume you are running `x.py`. +See the [rustc dev guide][rustcguidebuild] if this does not work on your +platform. + +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#what-is-xpy + +## Dependencies + +Make sure you have installed the dependencies: + +* `python` 3 or 2.7 +* `git` +* A C compiler (when building for the host, `cc` is enough; cross-compiling may + need additional compilers) +* `curl` (not needed on Windows) +* `pkg-config` if you are compiling on Linux and targeting Linux +* `libiconv` (already included with glibc on Debian-based distros) + +To build Cargo, you'll also need OpenSSL (`libssl-dev` or `openssl-devel` on +most Unix distros). + +If building LLVM from source, you'll need additional tools: + +* `g++`, `clang++`, or MSVC with versions listed on + [LLVM's documentation](https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library) +* `ninja`, or GNU `make` 3.81 or later (Ninja is recommended, especially on + Windows) +* `cmake` 3.13.4 or later +* `libstdc++-static` may be required on some Linux distributions such as Fedora + and Ubuntu + +On tier 1 or tier 2 with host tools platforms, you can also choose to download +LLVM by setting `llvm.download-ci-llvm = true`. +Otherwise, you'll need LLVM installed and `llvm-config` in your path. +See [the rustc-dev-guide for more info][sysllvm]. + +[sysllvm]: https://rustc-dev-guide.rust-lang.org/building/new-target.html#using-pre-built-llvm + + +## Building on a Unix-like system + +### Build steps + +1. Clone the [source] with `git`: + + ```sh + git clone https://github.com/rust-lang/rust.git + cd rust + ``` + +[source]: https://github.com/rust-lang/rust + +2. Configure the build settings: + + ```sh + ./configure + ``` + + If you plan to use `x.py install` to create an installation, it is + recommended that you set the `prefix` value in the `[install]` section to a + directory: `./configure --set install.prefix=` + +3. Build and install: + + ```sh + ./x.py build && ./x.py install + ``` + + When complete, `./x.py install` will place several programs into + `$PREFIX/bin`: `rustc`, the Rust compiler, and `rustdoc`, the + API-documentation tool. By default, it will also include [Cargo], Rust's + package manager. You can disable this behavior by passing + `--set build.extended=false` to `./configure`. + +[Cargo]: https://github.com/rust-lang/cargo + +### Configure and Make + +This project provides a configure script and makefile (the latter of which just +invokes `x.py`). `./configure` is the recommended way to programmatically +generate a `config.toml`. `make` is not recommended (we suggest using `x.py` +directly), but it is supported and we try not to break it unnecessarily. + +```sh +./configure +make && sudo make install +``` + +`configure` generates a `config.toml` which can also be used with normal `x.py` +invocations. + +## Building on Windows + +On Windows, we suggest using [winget] to install dependencies by running the +following in a terminal: + +```powershell +winget install -e Python.Python.3 +winget install -e Kitware.CMake +winget install -e Git.Git +``` + +Then edit your system's `PATH` variable and add: `C:\Program Files\CMake\bin`. +See +[this guide on editing the system `PATH`](https://www.java.com/en/download/help/path.html) +from the Java documentation. + +[winget]: https://github.com/microsoft/winget-cli + +There are two prominent ABIs in use on Windows: the native (MSVC) ABI used by +Visual Studio and the GNU ABI used by the GCC toolchain. Which version of Rust +you need depends largely on what C/C++ libraries you want to interoperate with. +Use the MSVC build of Rust to interop with software produced by Visual Studio +and the GNU build to interop with GNU software built using the MinGW/MSYS2 +toolchain. + +### MinGW + +[MSYS2][msys2] can be used to easily build Rust on Windows: + +[msys2]: https://www.msys2.org/ + +1. Download the latest [MSYS2 installer][msys2] and go through the installer. + +2. Run `mingw32_shell.bat` or `mingw64_shell.bat` from the MSYS2 installation + directory (e.g. `C:\msys64`), depending on whether you want 32-bit or 64-bit + Rust. (As of the latest version of MSYS2 you have to run `msys2_shell.cmd + -mingw32` or `msys2_shell.cmd -mingw64` from the command line instead.) + +3. From this terminal, install the required tools: + + ```sh + # Update package mirrors (may be needed if you have a fresh install of MSYS2) + pacman -Sy pacman-mirrors + + # Install build tools needed for Rust. If you're building a 32-bit compiler, + # then replace "x86_64" below with "i686". If you've already got Git, Python, + # or CMake installed and in PATH you can remove them from this list. + # Note that it is important that you do **not** use the 'python2', 'cmake', + # and 'ninja' packages from the 'msys2' subsystem. + # The build has historically been known to fail with these packages. + pacman -S git \ + make \ + diffutils \ + tar \ + mingw-w64-x86_64-python \ + mingw-w64-x86_64-cmake \ + mingw-w64-x86_64-gcc \ + mingw-w64-x86_64-ninja + ``` + +4. Navigate to Rust's source code (or clone it), then build it: + + ```sh + python x.py setup user && python x.py build && python x.py install + ``` + +### MSVC + +MSVC builds of Rust additionally require an installation of Visual Studio 2017 +(or later) so `rustc` can use its linker. The simplest way is to get +[Visual Studio], check the "C++ build tools" and "Windows 10 SDK" workload. + +[Visual Studio]: https://visualstudio.microsoft.com/downloads/ + +(If you're installing CMake yourself, be careful that "C++ CMake tools for +Windows" doesn't get included under "Individual components".) + +With these dependencies installed, you can build the compiler in a `cmd.exe` +shell with: + +```sh +python x.py setup user +python x.py build +``` + +Right now, building Rust only works with some known versions of Visual Studio. +If you have a more recent version installed and the build system doesn't +understand, you may need to force rustbuild to use an older version. +This can be done by manually calling the appropriate vcvars file before running +the bootstrap. + +```batch +CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" +python x.py build +``` + +### Specifying an ABI + +Each specific ABI can also be used from either environment (for example, using +the GNU ABI in PowerShell) by using an explicit build triple. The available +Windows build triples are: +- GNU ABI (using GCC) + - `i686-pc-windows-gnu` + - `x86_64-pc-windows-gnu` +- The MSVC ABI + - `i686-pc-windows-msvc` + - `x86_64-pc-windows-msvc` + +The build triple can be specified by either specifying `--build=` when +invoking `x.py` commands, or by creating a `config.toml` file (as described in +[Building on a Unix-like system](#building-on-a-unix-like-system)), and passing +`--set build.build=` to `./configure`. + +## Building Documentation + +If you'd like to build the documentation, it's almost the same: + +```sh +./x.py doc +``` + +The generated documentation will appear under `doc` in the `build` directory for +the ABI used. That is, if the ABI was `x86_64-pc-windows-msvc`, the directory +will be `build\x86_64-pc-windows-msvc\doc`. + +## Notes + +Since the Rust compiler is written in Rust, it must be built by a precompiled +"snapshot" version of itself (made in an earlier stage of development). +As such, source builds require an Internet connection to fetch snapshots, and an +OS that can execute the available snapshot binaries. + +See https://doc.rust-lang.org/nightly/rustc/platform-support.html for a list of +supported platforms. +Only "host tools" platforms have a pre-compiled snapshot binary available; to +compile for a platform without host tools you must cross-compile. + +You may find that other platforms work, but these are our officially supported +build environments that are most likely to work. diff --git a/README.md b/README.md index 5d5beaf1b7a2..da9e3556b4ca 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,6 @@ If you wish to _contribute_ to the compiler, you should read Table of Contents - [Quick Start](#quick-start) -- [Installing from Source](#installing-from-source) -- [Building Documentation](#building-documentation) -- [Notes](#notes) - [Getting Help](#getting-help) - [Contributing](#contributing) - [License](#license) @@ -32,255 +29,9 @@ Read ["Installation"] from [The Book]. ["Installation"]: https://doc.rust-lang.org/book/ch01-01-installation.html [The Book]: https://doc.rust-lang.org/book/index.html -## Installing from Source +## Installing from source -The Rust build system uses a Python script called `x.py` to build the compiler, -which manages the bootstrapping process. It lives at the root of the project. -It also uses a file named `config.toml` to determine various configuration -settings for the build. You can see a full list of options in -`config.example.toml`. - -The `x.py` command can be run directly on most Unix systems in the following -format: - -```sh -./x.py [flags] -``` - -This is how the documentation and examples assume you are running `x.py`. -See the [rustc dev guide][rustcguidebuild] if this does not work on your -platform. - -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#what-is-xpy - -### Dependencies - -Make sure you have installed the dependencies: - -* `python` 3 or 2.7 -* `git` -* A C compiler (when building for the host, `cc` is enough; cross-compiling may - need additional compilers) -* `curl` (not needed on Windows) -* `pkg-config` if you are compiling on Linux and targeting Linux -* `libiconv` (already included with glibc on Debian-based distros) - -To build Cargo, you'll also need OpenSSL (`libssl-dev` or `openssl-devel` on -most Unix distros). - -If building LLVM from source, you'll need additional tools: - -* `g++`, `clang++`, or MSVC with versions listed on - [LLVM's documentation](https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library) -* `ninja`, or GNU `make` 3.81 or later (Ninja is recommended, especially on - Windows) -* `cmake` 3.13.4 or later -* `libstdc++-static` may be required on some Linux distributions such as Fedora - and Ubuntu - -On tier 1 or tier 2 with host tools platforms, you can also choose to download -LLVM by setting `llvm.download-ci-llvm = true`. -Otherwise, you'll need LLVM installed and `llvm-config` in your path. -See [the rustc-dev-guide for more info][sysllvm]. - -[sysllvm]: https://rustc-dev-guide.rust-lang.org/building/new-target.html#using-pre-built-llvm - - -### Building on a Unix-like system - -#### Build steps - -1. Clone the [source] with `git`: - - ```sh - git clone https://github.com/rust-lang/rust.git - cd rust - ``` - -[source]: https://github.com/rust-lang/rust - -2. Configure the build settings: - - ```sh - ./configure - ``` - - If you plan to use `x.py install` to create an installation, it is - recommended that you set the `prefix` value in the `[install]` section to a - directory: `./configure --set install.prefix=` - -3. Build and install: - - ```sh - ./x.py build && ./x.py install - ``` - - When complete, `./x.py install` will place several programs into - `$PREFIX/bin`: `rustc`, the Rust compiler, and `rustdoc`, the - API-documentation tool. By default, it will also include [Cargo], Rust's - package manager. You can disable this behavior by passing - `--set build.extended=false` to `./configure`. - -[Cargo]: https://github.com/rust-lang/cargo - -#### Configure and Make - -This project provides a configure script and makefile (the latter of which just -invokes `x.py`). `./configure` is the recommended way to programmatically -generate a `config.toml`. `make` is not recommended (we suggest using `x.py` -directly), but it is supported and we try not to break it unnecessarily. - -```sh -./configure -make && sudo make install -``` - -`configure` generates a `config.toml` which can also be used with normal `x.py` -invocations. - -### Building on Windows - -On Windows, we suggest using [winget] to install dependencies by running the -following in a terminal: - -```powershell -winget install -e Python.Python.3 -winget install -e Kitware.CMake -winget install -e Git.Git -``` - -Then edit your system's `PATH` variable and add: `C:\Program Files\CMake\bin`. -See -[this guide on editing the system `PATH`](https://www.java.com/en/download/help/path.html) -from the Java documentation. - -[winget]: https://github.com/microsoft/winget-cli - -There are two prominent ABIs in use on Windows: the native (MSVC) ABI used by -Visual Studio and the GNU ABI used by the GCC toolchain. Which version of Rust -you need depends largely on what C/C++ libraries you want to interoperate with. -Use the MSVC build of Rust to interop with software produced by Visual Studio -and the GNU build to interop with GNU software built using the MinGW/MSYS2 -toolchain. - -#### MinGW - -[MSYS2][msys2] can be used to easily build Rust on Windows: - -[msys2]: https://www.msys2.org/ - -1. Download the latest [MSYS2 installer][msys2] and go through the installer. - -2. Run `mingw32_shell.bat` or `mingw64_shell.bat` from the MSYS2 installation - directory (e.g. `C:\msys64`), depending on whether you want 32-bit or 64-bit - Rust. (As of the latest version of MSYS2 you have to run `msys2_shell.cmd - -mingw32` or `msys2_shell.cmd -mingw64` from the command line instead.) - -3. From this terminal, install the required tools: - - ```sh - # Update package mirrors (may be needed if you have a fresh install of MSYS2) - pacman -Sy pacman-mirrors - - # Install build tools needed for Rust. If you're building a 32-bit compiler, - # then replace "x86_64" below with "i686". If you've already got Git, Python, - # or CMake installed and in PATH you can remove them from this list. - # Note that it is important that you do **not** use the 'python2', 'cmake', - # and 'ninja' packages from the 'msys2' subsystem. - # The build has historically been known to fail with these packages. - pacman -S git \ - make \ - diffutils \ - tar \ - mingw-w64-x86_64-python \ - mingw-w64-x86_64-cmake \ - mingw-w64-x86_64-gcc \ - mingw-w64-x86_64-ninja - ``` - -4. Navigate to Rust's source code (or clone it), then build it: - - ```sh - python x.py setup user && python x.py build && python x.py install - ``` - -#### MSVC - -MSVC builds of Rust additionally require an installation of Visual Studio 2017 -(or later) so `rustc` can use its linker. The simplest way is to get -[Visual Studio], check the "C++ build tools" and "Windows 10 SDK" workload. - -[Visual Studio]: https://visualstudio.microsoft.com/downloads/ - -(If you're installing CMake yourself, be careful that "C++ CMake tools for -Windows" doesn't get included under "Individual components".) - -With these dependencies installed, you can build the compiler in a `cmd.exe` -shell with: - -```sh -python x.py setup user -python x.py build -``` - -Right now, building Rust only works with some known versions of Visual Studio. -If you have a more recent version installed and the build system doesn't -understand, you may need to force rustbuild to use an older version. -This can be done by manually calling the appropriate vcvars file before running -the bootstrap. - -```batch -CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" -python x.py build -``` - -#### Specifying an ABI - -Each specific ABI can also be used from either environment (for example, using -the GNU ABI in PowerShell) by using an explicit build triple. The available -Windows build triples are: -- GNU ABI (using GCC) - - `i686-pc-windows-gnu` - - `x86_64-pc-windows-gnu` -- The MSVC ABI - - `i686-pc-windows-msvc` - - `x86_64-pc-windows-msvc` - -The build triple can be specified by either specifying `--build=` when -invoking `x.py` commands, or by creating a `config.toml` file (as described in -[Building on a Unix-like system](#building-on-a-unix-like-system)), and passing -`--set build.build=` to `./configure`. - -## Building Documentation - -If you'd like to build the documentation, it's almost the same: - -```sh -./x.py doc -``` - -The generated documentation will appear under `doc` in the `build` directory for -the ABI used. That is, if the ABI was `x86_64-pc-windows-msvc`, the directory -will be `build\x86_64-pc-windows-msvc\doc`. - -## Notes - -Since the Rust compiler is written in Rust, it must be built by a precompiled -"snapshot" version of itself (made in an earlier stage of development). -As such, source builds require an Internet connection to fetch snapshots, and an -OS that can execute the available snapshot binaries. - -See https://doc.rust-lang.org/nightly/rustc/platform-support.html for a list of -supported platforms. -Only "host tools" platforms have a pre-compiled snapshot binary available; to -compile for a platform without host tools you must cross-compile. - -You may find that other platforms work, but these are our officially supported -build environments that are most likely to work. +If you really want to install from source (though this is not recommended), see [INSTALL.md](INSTALL.md). ## Getting Help diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index e1e4e5fc5675..21077c312bdc 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -2873,6 +2873,7 @@ impl Item { | ItemKind::ForeignMod(_) | ItemKind::GlobalAsm(_) | ItemKind::MacCall(_) + | ItemKind::Delegation(_) | ItemKind::MacroDef(_) => None, ItemKind::Static(_) => None, ItemKind::Const(i) => Some(&i.generics), @@ -3019,6 +3020,15 @@ pub struct Fn { pub body: Option>, } +#[derive(Clone, Encodable, Decodable, Debug)] +pub struct Delegation { + /// Path resolution id. + pub id: NodeId, + pub qself: Option>, + pub path: Path, + pub body: Option>, +} + #[derive(Clone, Encodable, Decodable, Debug)] pub struct StaticItem { pub ty: P, @@ -3104,6 +3114,11 @@ pub enum ItemKind { /// A macro definition. MacroDef(MacroDef), + + /// A delegation item (`reuse`). + /// + /// E.g. `reuse ::name { target_expr_template }`. + Delegation(Box), } impl ItemKind { @@ -3111,7 +3126,8 @@ impl ItemKind { use ItemKind::*; match self { Use(..) | Static(..) | Const(..) | Fn(..) | Mod(..) | GlobalAsm(..) | TyAlias(..) - | Struct(..) | Union(..) | Trait(..) | TraitAlias(..) | MacroDef(..) => "a", + | Struct(..) | Union(..) | Trait(..) | TraitAlias(..) | MacroDef(..) + | Delegation(..) => "a", ExternCrate(..) | ForeignMod(..) | MacCall(..) | Enum(..) | Impl { .. } => "an", } } @@ -3135,6 +3151,7 @@ impl ItemKind { ItemKind::MacCall(..) => "item macro invocation", ItemKind::MacroDef(..) => "macro definition", ItemKind::Impl { .. } => "implementation", + ItemKind::Delegation(..) => "delegated function", } } @@ -3176,6 +3193,8 @@ pub enum AssocItemKind { Type(Box), /// A macro expanding to associated items. MacCall(P), + /// An associated delegation item. + Delegation(Box), } impl AssocItemKind { @@ -3184,7 +3203,7 @@ impl AssocItemKind { Self::Const(box ConstItem { defaultness, .. }) | Self::Fn(box Fn { defaultness, .. }) | Self::Type(box TyAlias { defaultness, .. }) => defaultness, - Self::MacCall(..) => Defaultness::Final, + Self::MacCall(..) | Self::Delegation(..) => Defaultness::Final, } } } @@ -3196,6 +3215,7 @@ impl From for ItemKind { AssocItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind), AssocItemKind::Type(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind), AssocItemKind::MacCall(a) => ItemKind::MacCall(a), + AssocItemKind::Delegation(delegation) => ItemKind::Delegation(delegation), } } } @@ -3209,6 +3229,7 @@ impl TryFrom for AssocItemKind { ItemKind::Fn(fn_kind) => AssocItemKind::Fn(fn_kind), ItemKind::TyAlias(ty_kind) => AssocItemKind::Type(ty_kind), ItemKind::MacCall(a) => AssocItemKind::MacCall(a), + ItemKind::Delegation(d) => AssocItemKind::Delegation(d), _ => return Err(item_kind), }) } diff --git a/compiler/rustc_ast/src/mut_visit.rs b/compiler/rustc_ast/src/mut_visit.rs index 82f28143630d..450555d0cb56 100644 --- a/compiler/rustc_ast/src/mut_visit.rs +++ b/compiler/rustc_ast/src/mut_visit.rs @@ -1117,6 +1117,14 @@ pub fn noop_visit_item_kind(kind: &mut ItemKind, vis: &mut T) { } ItemKind::MacCall(m) => vis.visit_mac_call(m), ItemKind::MacroDef(def) => vis.visit_macro_def(def), + ItemKind::Delegation(box Delegation { id, qself, path, body }) => { + vis.visit_id(id); + vis.visit_qself(qself); + vis.visit_path(path); + if let Some(body) = body { + vis.visit_block(body); + } + } } } @@ -1155,6 +1163,14 @@ pub fn noop_flat_map_assoc_item( visit_opt(ty, |ty| visitor.visit_ty(ty)); } AssocItemKind::MacCall(mac) => visitor.visit_mac_call(mac), + AssocItemKind::Delegation(box Delegation { id, qself, path, body }) => { + visitor.visit_id(id); + visitor.visit_qself(qself); + visitor.visit_path(path); + if let Some(body) = body { + visitor.visit_block(body); + } + } } visitor.visit_span(span); visit_lazy_tts(tokens, visitor); diff --git a/compiler/rustc_ast/src/visit.rs b/compiler/rustc_ast/src/visit.rs index 45261ca48fc2..3617df931e2a 100644 --- a/compiler/rustc_ast/src/visit.rs +++ b/compiler/rustc_ast/src/visit.rs @@ -375,6 +375,15 @@ pub fn walk_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a Item) { } ItemKind::MacCall(mac) => visitor.visit_mac_call(mac), ItemKind::MacroDef(ts) => visitor.visit_mac_def(ts, item.id), + ItemKind::Delegation(box Delegation { id: _, qself, path, body }) => { + if let Some(qself) = qself { + visitor.visit_ty(&qself.ty); + } + walk_path(visitor, path); + if let Some(body) = body { + visitor.visit_block(body); + } + } } walk_list!(visitor, visit_attribute, &item.attrs); } @@ -704,6 +713,15 @@ pub fn walk_assoc_item<'a, V: Visitor<'a>>(visitor: &mut V, item: &'a AssocItem, AssocItemKind::MacCall(mac) => { visitor.visit_mac_call(mac); } + AssocItemKind::Delegation(box Delegation { id: _, qself, path, body }) => { + if let Some(qself) = qself { + visitor.visit_ty(&qself.ty); + } + walk_path(visitor, path); + if let Some(body) = body { + visitor.visit_block(body); + } + } } } diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index a5986f2bba57..3742cf9d881d 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -48,7 +48,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { ); if !is_stable && !self.tcx.features().asm_experimental_arch { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::asm_experimental_arch, sp, "inline assembly is not stable yet on this architecture", @@ -63,13 +63,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { self.dcx().emit_err(AttSyntaxOnlyX86 { span: sp }); } if asm.options.contains(InlineAsmOptions::MAY_UNWIND) && !self.tcx.features().asm_unwind { - feature_err( - &self.tcx.sess.parse_sess, - sym::asm_unwind, - sp, - "the `may_unwind` option is unstable", - ) - .emit(); + feature_err(&self.tcx.sess, sym::asm_unwind, sp, "the `may_unwind` option is unstable") + .emit(); } let mut clobber_abis = FxIndexMap::default(); @@ -183,7 +178,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { InlineAsmOperand::Const { anon_const } => { if !self.tcx.features().asm_const { feature_err( - &sess.parse_sess, + sess, sym::asm_const, *op_sp, "const operands for inline assembly are unstable", diff --git a/compiler/rustc_ast_lowering/src/delegation.rs b/compiler/rustc_ast_lowering/src/delegation.rs new file mode 100644 index 000000000000..6ccf39b0cb16 --- /dev/null +++ b/compiler/rustc_ast_lowering/src/delegation.rs @@ -0,0 +1,348 @@ +//! This module implements expansion of delegation items with early resolved paths. +//! It includes a delegation to a free functions: +//! +//! ```ignore (illustrative) +//! reuse module::name { target_expr_template } +//! ``` +//! +//! And delegation to a trait methods: +//! +//! ```ignore (illustrative) +//! reuse ::name { target_expr_template } +//! ``` +//! +//! After expansion for both cases we get: +//! +//! ```ignore (illustrative) +//! fn name( +//! arg0: InferDelegation(sig_id, Input(0)), +//! arg1: InferDelegation(sig_id, Input(1)), +//! ..., +//! argN: InferDelegation(sig_id, Input(N)), +//! ) -> InferDelegation(sig_id, Output) { +//! callee_path(target_expr_template(arg0), arg1, ..., argN) +//! } +//! ``` +//! +//! Where `callee_path` is a path in delegation item e.g. `::name`. +//! `sig_id` is a id of item from which the signature is inherited. It may be a delegation +//! item id (`item_id`) in case of impl trait or path resolution id (`path_id`) otherwise. +//! +//! Since we do not have a proper way to obtain function type information by path resolution +//! in AST, we mark each function parameter type as `InferDelegation` and inherit it in `AstConv`. +//! +//! Similarly generics, predicates and header are set to the "default" values. +//! In case of discrepancy with callee function the `NotSupportedDelegation` error will +//! also be emitted in `AstConv`. + +use crate::{ImplTraitPosition, ResolverAstLoweringExt}; + +use super::{ImplTraitContext, LoweringContext, ParamMode}; + +use ast::visit::Visitor; +use hir::def::{DefKind, PartialRes, Res}; +use hir::{BodyId, HirId}; +use rustc_ast as ast; +use rustc_ast::*; +use rustc_errors::ErrorGuaranteed; +use rustc_hir as hir; +use rustc_hir::def_id::DefId; +use rustc_middle::span_bug; +use rustc_middle::ty::ResolverAstLowering; +use rustc_span::{symbol::Ident, Span}; +use rustc_target::spec::abi; +use std::iter; + +pub(crate) struct DelegationResults<'hir> { + pub body_id: hir::BodyId, + pub sig: hir::FnSig<'hir>, + pub generics: &'hir hir::Generics<'hir>, +} + +impl<'hir> LoweringContext<'_, 'hir> { + pub(crate) fn delegation_has_self(&self, item_id: NodeId, path_id: NodeId, span: Span) -> bool { + let sig_id = self.get_delegation_sig_id(item_id, path_id, span); + let Ok(sig_id) = sig_id else { + return false; + }; + if let Some(local_sig_id) = sig_id.as_local() { + self.resolver.has_self.contains(&local_sig_id) + } else { + match self.tcx.def_kind(sig_id) { + DefKind::Fn => false, + DefKind::AssocFn => self.tcx.associated_item(sig_id).fn_has_self_parameter, + _ => span_bug!(span, "unexpected DefKind for delegation item"), + } + } + } + + pub(crate) fn lower_delegation( + &mut self, + delegation: &Delegation, + item_id: NodeId, + ) -> DelegationResults<'hir> { + let span = delegation.path.segments.last().unwrap().ident.span; + let sig_id = self.get_delegation_sig_id(item_id, delegation.id, span); + match sig_id { + Ok(sig_id) => { + let decl = self.lower_delegation_decl(sig_id, span); + let sig = self.lower_delegation_sig(span, decl); + let body_id = self.lower_delegation_body(sig.decl, delegation); + + let generics = self.lower_delegation_generics(span); + DelegationResults { body_id, sig, generics } + } + Err(err) => self.generate_delegation_error(err, span), + } + } + + fn get_delegation_sig_id( + &self, + item_id: NodeId, + path_id: NodeId, + span: Span, + ) -> Result { + let sig_id = if self.is_in_trait_impl { item_id } else { path_id }; + let sig_id = self + .resolver + .get_partial_res(sig_id) + .map(|r| r.expect_full_res().opt_def_id()) + .unwrap_or(None); + + sig_id.ok_or_else(|| { + self.tcx + .dcx() + .span_delayed_bug(span, "LoweringContext: couldn't resolve delegation item") + }) + } + + fn lower_delegation_generics(&mut self, span: Span) -> &'hir hir::Generics<'hir> { + self.arena.alloc(hir::Generics { + params: &[], + predicates: &[], + has_where_clause_predicates: false, + where_clause_span: span, + span: span, + }) + } + + fn lower_delegation_decl( + &mut self, + sig_id: DefId, + param_span: Span, + ) -> &'hir hir::FnDecl<'hir> { + let args_count = if let Some(local_sig_id) = sig_id.as_local() { + // Map may be filled incorrectly due to recursive delegation. + // Error will be emmited later in astconv. + self.resolver.fn_parameter_counts.get(&local_sig_id).cloned().unwrap_or_default() + } else { + self.tcx.fn_arg_names(sig_id).len() + }; + let inputs = self.arena.alloc_from_iter((0..args_count).into_iter().map(|arg| hir::Ty { + hir_id: self.next_id(), + kind: hir::TyKind::InferDelegation(sig_id, hir::InferDelegationKind::Input(arg)), + span: self.lower_span(param_span), + })); + + let output = self.arena.alloc(hir::Ty { + hir_id: self.next_id(), + kind: hir::TyKind::InferDelegation(sig_id, hir::InferDelegationKind::Output), + span: self.lower_span(param_span), + }); + + self.arena.alloc(hir::FnDecl { + inputs, + output: hir::FnRetTy::Return(output), + c_variadic: false, + lifetime_elision_allowed: true, + implicit_self: hir::ImplicitSelfKind::None, + }) + } + + fn lower_delegation_sig( + &mut self, + span: Span, + decl: &'hir hir::FnDecl<'hir>, + ) -> hir::FnSig<'hir> { + hir::FnSig { + decl, + header: hir::FnHeader { + unsafety: hir::Unsafety::Normal, + constness: hir::Constness::NotConst, + asyncness: hir::IsAsync::NotAsync, + abi: abi::Abi::Rust, + }, + span: self.lower_span(span), + } + } + + fn generate_param(&mut self, ty: &'hir hir::Ty<'hir>) -> (hir::Param<'hir>, NodeId) { + let pat_node_id = self.next_node_id(); + let pat_id = self.lower_node_id(pat_node_id); + let pat = self.arena.alloc(hir::Pat { + hir_id: pat_id, + kind: hir::PatKind::Binding(hir::BindingAnnotation::NONE, pat_id, Ident::empty(), None), + span: ty.span, + default_binding_modes: false, + }); + + (hir::Param { hir_id: self.next_id(), pat, ty_span: ty.span, span: ty.span }, pat_node_id) + } + + fn generate_arg(&mut self, ty: &'hir hir::Ty<'hir>, param_id: HirId) -> hir::Expr<'hir> { + let segments = self.arena.alloc_from_iter(iter::once(hir::PathSegment { + ident: Ident::empty(), + hir_id: self.next_id(), + res: Res::Local(param_id), + args: None, + infer_args: false, + })); + + let path = + self.arena.alloc(hir::Path { span: ty.span, res: Res::Local(param_id), segments }); + + hir::Expr { + hir_id: self.next_id(), + kind: hir::ExprKind::Path(hir::QPath::Resolved(None, path)), + span: ty.span, + } + } + + fn lower_delegation_body( + &mut self, + decl: &'hir hir::FnDecl<'hir>, + delegation: &Delegation, + ) -> BodyId { + let path = self.lower_qpath( + delegation.id, + &delegation.qself, + &delegation.path, + ParamMode::Optional, + &ImplTraitContext::Disallowed(ImplTraitPosition::Path), + None, + ); + let block = delegation.body.as_deref(); + + self.lower_body(|this| { + let mut parameters: Vec> = Vec::new(); + let mut args: Vec> = Vec::new(); + + for (idx, param_ty) in decl.inputs.iter().enumerate() { + let (param, pat_node_id) = this.generate_param(param_ty); + parameters.push(param); + + let arg = if let Some(block) = block + && idx == 0 + { + let mut self_resolver = SelfResolver { + resolver: this.resolver, + path_id: delegation.id, + self_param_id: pat_node_id, + }; + self_resolver.visit_block(block); + let block = this.lower_block(block, false); + hir::Expr { + hir_id: this.next_id(), + kind: hir::ExprKind::Block(block, None), + span: block.span, + } + } else { + let pat_hir_id = this.lower_node_id(pat_node_id); + this.generate_arg(param_ty, pat_hir_id) + }; + args.push(arg); + } + + let args = self.arena.alloc_from_iter(args); + let final_expr = this.generate_call(path, args); + (this.arena.alloc_from_iter(parameters), final_expr) + }) + } + + fn generate_call( + &mut self, + path: hir::QPath<'hir>, + args: &'hir [hir::Expr<'hir>], + ) -> hir::Expr<'hir> { + let callee = self.arena.alloc(hir::Expr { + hir_id: self.next_id(), + kind: hir::ExprKind::Path(path), + span: path.span(), + }); + + let expr = self.arena.alloc(hir::Expr { + hir_id: self.next_id(), + kind: hir::ExprKind::Call(callee, args), + span: path.span(), + }); + + let block = self.arena.alloc(hir::Block { + stmts: &[], + expr: Some(expr), + hir_id: self.next_id(), + rules: hir::BlockCheckMode::DefaultBlock, + span: path.span(), + targeted_by_break: false, + }); + + hir::Expr { + hir_id: self.next_id(), + kind: hir::ExprKind::Block(block, None), + span: path.span(), + } + } + + fn generate_delegation_error( + &mut self, + err: ErrorGuaranteed, + span: Span, + ) -> DelegationResults<'hir> { + let generics = self.lower_delegation_generics(span); + + let decl = self.arena.alloc(hir::FnDecl { + inputs: &[], + output: hir::FnRetTy::DefaultReturn(span), + c_variadic: false, + lifetime_elision_allowed: true, + implicit_self: hir::ImplicitSelfKind::None, + }); + + let sig = self.lower_delegation_sig(span, decl); + let body_id = self.lower_body(|this| { + let expr = + hir::Expr { hir_id: this.next_id(), kind: hir::ExprKind::Err(err), span: span }; + (&[], expr) + }); + DelegationResults { generics, body_id, sig } + } +} + +struct SelfResolver<'a> { + resolver: &'a mut ResolverAstLowering, + path_id: NodeId, + self_param_id: NodeId, +} + +impl<'a> SelfResolver<'a> { + fn try_replace_id(&mut self, id: NodeId) { + if let Some(res) = self.resolver.partial_res_map.get(&id) + && let Some(Res::Local(sig_id)) = res.full_res() + && sig_id == self.path_id + { + let new_res = PartialRes::new(Res::Local(self.self_param_id)); + self.resolver.partial_res_map.insert(id, new_res); + } + } +} + +impl<'ast, 'a> Visitor<'ast> for SelfResolver<'a> { + fn visit_path(&mut self, path: &'ast Path, id: NodeId) { + self.try_replace_id(id); + visit::walk_path(self, path); + } + + fn visit_path_segment(&mut self, seg: &'ast PathSegment) { + self.try_replace_id(seg.id); + visit::walk_path_segment(self, seg); + } +} diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index 69704de105cb..e0b1a10c82e7 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -1512,7 +1512,7 @@ impl<'hir> LoweringContext<'_, 'hir> { Some(hir::CoroutineKind::Coroutine(_)) => { if !self.tcx.features().coroutines { rustc_session::parse::feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::coroutines, span, "yield syntax is experimental", @@ -1524,7 +1524,7 @@ impl<'hir> LoweringContext<'_, 'hir> { None => { if !self.tcx.features().coroutines { rustc_session::parse::feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::coroutines, span, "yield syntax is experimental", diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index d8de447e5b4c..a3ff02f5f695 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -441,6 +441,14 @@ impl<'hir> LoweringContext<'_, 'hir> { let macro_def = self.arena.alloc(ast::MacroDef { body, macro_rules: *macro_rules }); hir::ItemKind::Macro(macro_def, macro_kind) } + ItemKind::Delegation(box delegation) => { + let delegation_results = self.lower_delegation(delegation, id); + hir::ItemKind::Fn( + delegation_results.sig, + delegation_results.generics, + delegation_results.body_id, + ) + } ItemKind::MacCall(..) => { panic!("`TyMac` should have been expanded by now") } @@ -805,6 +813,14 @@ impl<'hir> LoweringContext<'_, 'hir> { ); (generics, kind, ty.is_some()) } + AssocItemKind::Delegation(box delegation) => { + let delegation_results = self.lower_delegation(delegation, i.id); + let item_kind = hir::TraitItemKind::Fn( + delegation_results.sig, + hir::TraitFn::Provided(delegation_results.body_id), + ); + (delegation_results.generics, item_kind, true) + } AssocItemKind::MacCall(..) => panic!("macro item shouldn't exist at this point"), }; @@ -826,6 +842,9 @@ impl<'hir> LoweringContext<'_, 'hir> { AssocItemKind::Fn(box Fn { sig, .. }) => { hir::AssocItemKind::Fn { has_self: sig.decl.has_self() } } + AssocItemKind::Delegation(box delegation) => hir::AssocItemKind::Fn { + has_self: self.delegation_has_self(i.id, delegation.id, i.span), + }, AssocItemKind::MacCall(..) => unimplemented!(), }; let id = hir::TraitItemId { owner_id: hir::OwnerId { def_id: self.local_def_id(i.id) } }; @@ -908,6 +927,13 @@ impl<'hir> LoweringContext<'_, 'hir> { }, ) } + AssocItemKind::Delegation(box delegation) => { + let delegation_results = self.lower_delegation(delegation, i.id); + ( + delegation_results.generics, + hir::ImplItemKind::Fn(delegation_results.sig, delegation_results.body_id), + ) + } AssocItemKind::MacCall(..) => panic!("`TyMac` should have been expanded by now"), }; @@ -924,6 +950,13 @@ impl<'hir> LoweringContext<'_, 'hir> { } fn lower_impl_item_ref(&mut self, i: &AssocItem) -> hir::ImplItemRef { + let trait_item_def_id = self + .resolver + .get_partial_res(i.id) + .map(|r| r.expect_full_res().opt_def_id()) + .unwrap_or(None); + self.is_in_trait_impl = trait_item_def_id.is_some(); + hir::ImplItemRef { id: hir::ImplItemId { owner_id: hir::OwnerId { def_id: self.local_def_id(i.id) } }, ident: self.lower_ident(i.ident), @@ -934,12 +967,12 @@ impl<'hir> LoweringContext<'_, 'hir> { AssocItemKind::Fn(box Fn { sig, .. }) => { hir::AssocItemKind::Fn { has_self: sig.decl.has_self() } } + AssocItemKind::Delegation(box delegation) => hir::AssocItemKind::Fn { + has_self: self.delegation_has_self(i.id, delegation.id, i.span), + }, AssocItemKind::MacCall(..) => unimplemented!(), }, - trait_item_def_id: self - .resolver - .get_partial_res(i.id) - .map(|r| r.expect_full_res().def_id()), + trait_item_def_id, } } diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index dc23b1dce7bf..5387880b6e62 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -77,6 +77,7 @@ macro_rules! arena_vec { mod asm; mod block; +mod delegation; mod errors; mod expr; mod format; @@ -1042,7 +1043,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { { add_feature_diagnostics( &mut err, - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::return_type_notation, ); } @@ -2309,7 +2310,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { hir::ArrayLen::Infer(self.lower_node_id(c.id), self.lower_span(c.value.span)) } else { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::generic_arg_infer, c.value.span, "using `_` for array lengths is unstable", diff --git a/compiler/rustc_ast_passes/messages.ftl b/compiler/rustc_ast_passes/messages.ftl index a10797626f1b..6586ca5d36f8 100644 --- a/compiler/rustc_ast_passes/messages.ftl +++ b/compiler/rustc_ast_passes/messages.ftl @@ -232,6 +232,9 @@ ast_passes_tilde_const_disallowed = `~const` is not allowed here .trait = this trait is not a `#[const_trait]`, so it cannot have `~const` trait bounds .trait_impl = this impl is not `const`, so it cannot have `~const` trait bounds .impl = inherent impls cannot have `~const` trait bounds + .trait_assoc_ty = associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds + .trait_impl_assoc_ty = associated types in non-const impls cannot have `~const` trait bounds + .inherent_assoc_ty = inherent associated types cannot have `~const` trait bounds .object = trait objects cannot have `~const` trait bounds .item = this item cannot have `~const` trait bounds diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index 7f78f6870552..9ea5d1ed5fa2 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -37,12 +37,17 @@ enum SelfSemantic { } /// What is the context that prevents using `~const`? +// FIXME(effects): Consider getting rid of this in favor of `errors::TildeConstReason`, they're +// almost identical. This gets rid of an abstraction layer which might be considered bad. enum DisallowTildeConstContext<'a> { TraitObject, Fn(FnKind<'a>), Trait(Span), TraitImpl(Span), Impl(Span), + TraitAssocTy(Span), + TraitImplAssocTy(Span), + InherentAssocTy(Span), Item, } @@ -316,6 +321,7 @@ impl<'a> AstValidator<'a> { constness: Const::No, polarity: ImplPolarity::Positive, trait_ref, + .. } = parent { Some(trait_ref.path.span.shrink_to_lo()) @@ -1286,6 +1292,15 @@ impl<'a> Visitor<'a> for AstValidator<'a> { // suggestion for moving such bounds to the assoc const fns if available. errors::TildeConstReason::Impl { span } } + &DisallowTildeConstContext::TraitAssocTy(span) => { + errors::TildeConstReason::TraitAssocTy { span } + } + &DisallowTildeConstContext::TraitImplAssocTy(span) => { + errors::TildeConstReason::TraitImplAssocTy { span } + } + &DisallowTildeConstContext::InherentAssocTy(span) => { + errors::TildeConstReason::InherentAssocTy { span } + } DisallowTildeConstContext::TraitObject => { errors::TildeConstReason::TraitObject } @@ -1483,13 +1498,12 @@ impl<'a> Visitor<'a> for AstValidator<'a> { self.check_item_named(item.ident, "const"); } + let parent_is_const = + self.outer_trait_or_trait_impl.as_ref().and_then(TraitOrTraitImpl::constness).is_some(); + match &item.kind { AssocItemKind::Fn(box Fn { sig, generics, body, .. }) - if self - .outer_trait_or_trait_impl - .as_ref() - .and_then(TraitOrTraitImpl::constness) - .is_some() + if parent_is_const || ctxt == AssocCtxt::Trait || matches!(sig.header.constness, Const::Yes(_)) => { @@ -1505,6 +1519,20 @@ impl<'a> Visitor<'a> for AstValidator<'a> { ); self.visit_fn(kind, item.span, item.id); } + AssocItemKind::Type(_) => { + let disallowed = (!parent_is_const).then(|| match self.outer_trait_or_trait_impl { + Some(TraitOrTraitImpl::Trait { .. }) => { + DisallowTildeConstContext::TraitAssocTy(item.span) + } + Some(TraitOrTraitImpl::TraitImpl { .. }) => { + DisallowTildeConstContext::TraitImplAssocTy(item.span) + } + None => DisallowTildeConstContext::InherentAssocTy(item.span), + }); + self.with_tilde_const(disallowed, |this| { + this.with_in_trait_impl(None, |this| visit::walk_assoc_item(this, item, ctxt)) + }) + } _ => self.with_in_trait_impl(None, |this| visit::walk_assoc_item(this, item, ctxt)), } } diff --git a/compiler/rustc_ast_passes/src/errors.rs b/compiler/rustc_ast_passes/src/errors.rs index fcf19ce52ec6..e2b8e64b115e 100644 --- a/compiler/rustc_ast_passes/src/errors.rs +++ b/compiler/rustc_ast_passes/src/errors.rs @@ -565,6 +565,8 @@ pub struct ConstBoundTraitObject { pub span: Span, } +// FIXME(effects): Consider making the note/reason the message of the diagnostic. +// FIXME(effects): Provide structured suggestions (e.g., add `const` / `#[const_trait]` here). #[derive(Diagnostic)] #[diag(ast_passes_tilde_const_disallowed)] pub struct TildeConstDisallowed { @@ -598,6 +600,21 @@ pub enum TildeConstReason { #[primary_span] span: Span, }, + #[note(ast_passes_trait_assoc_ty)] + TraitAssocTy { + #[primary_span] + span: Span, + }, + #[note(ast_passes_trait_impl_assoc_ty)] + TraitImplAssocTy { + #[primary_span] + span: Span, + }, + #[note(ast_passes_inherent_assoc_ty)] + InherentAssocTy { + #[primary_span] + span: Span, + }, #[note(ast_passes_object)] TraitObject, #[note(ast_passes_item)] diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 737e81eb6ecc..192e458775a9 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -17,14 +17,12 @@ use crate::errors; macro_rules! gate { ($visitor:expr, $feature:ident, $span:expr, $explain:expr) => {{ if !$visitor.features.$feature && !$span.allows_unstable(sym::$feature) { - feature_err(&$visitor.sess.parse_sess, sym::$feature, $span, $explain).emit(); + feature_err(&$visitor.sess, sym::$feature, $span, $explain).emit(); } }}; ($visitor:expr, $feature:ident, $span:expr, $explain:expr, $help:expr) => {{ if !$visitor.features.$feature && !$span.allows_unstable(sym::$feature) { - feature_err(&$visitor.sess.parse_sess, sym::$feature, $span, $explain) - .with_help($help) - .emit(); + feature_err(&$visitor.sess, sym::$feature, $span, $explain).with_help($help).emit(); } }}; } @@ -33,7 +31,7 @@ macro_rules! gate { macro_rules! gate_alt { ($visitor:expr, $has_feature:expr, $name:expr, $span:expr, $explain:expr) => {{ if !$has_feature && !$span.allows_unstable($name) { - feature_err(&$visitor.sess.parse_sess, $name, $span, $explain).emit(); + feature_err(&$visitor.sess, $name, $span, $explain).emit(); } }}; } @@ -45,7 +43,7 @@ macro_rules! gate_multi { let spans: Vec<_> = $spans.filter(|span| !span.allows_unstable(sym::$feature)).collect(); if !spans.is_empty() { - feature_err(&$visitor.sess.parse_sess, sym::$feature, spans, $explain).emit(); + feature_err(&$visitor.sess, sym::$feature, spans, $explain).emit(); } } }}; @@ -55,7 +53,7 @@ macro_rules! gate_multi { macro_rules! gate_legacy { ($visitor:expr, $feature:ident, $span:expr, $explain:expr) => {{ if !$visitor.features.$feature && !$span.allows_unstable(sym::$feature) { - feature_warn(&$visitor.sess.parse_sess, sym::$feature, $span, $explain); + feature_warn(&$visitor.sess, sym::$feature, $span, $explain); } }}; } @@ -91,14 +89,7 @@ impl<'a> PostExpansionVisitor<'a> { match abi::is_enabled(self.features, span, symbol_unescaped.as_str()) { Ok(()) => (), Err(abi::AbiDisabled::Unstable { feature, explain }) => { - feature_err_issue( - &self.sess.parse_sess, - feature, - span, - GateIssue::Language, - explain, - ) - .emit(); + feature_err_issue(&self.sess, feature, span, GateIssue::Language, explain).emit(); } Err(abi::AbiDisabled::Unrecognized) => { if self.sess.opts.pretty.map_or(true, |ppm| ppm.needs_hir()) { @@ -556,6 +547,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { gate_all!(explicit_tail_calls, "`become` expression is experimental"); gate_all!(generic_const_items, "generic const items are experimental"); gate_all!(unnamed_fields, "unnamed fields are not yet fully implemented"); + gate_all!(fn_delegation, "functions delegation is not yet fully implemented"); if !visitor.features.never_patterns { if let Some(spans) = spans.get(&sym::never_patterns) { @@ -570,13 +562,8 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { if let Ok(snippet) = sm.span_to_snippet(span) && snippet == "!" { - feature_err( - &sess.parse_sess, - sym::never_patterns, - span, - "`!` patterns are experimental", - ) - .emit(); + feature_err(sess, sym::never_patterns, span, "`!` patterns are experimental") + .emit(); } else { let suggestion = span.shrink_to_hi(); sess.dcx().emit_err(errors::MatchArmWithNoBody { span, suggestion }); diff --git a/compiler/rustc_ast_pretty/src/pprust/state/item.rs b/compiler/rustc_ast_pretty/src/pprust/state/item.rs index 43561a1c0209..584f01e16c2c 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state/item.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state/item.rs @@ -376,6 +376,9 @@ impl<'a> State<'a> { state.print_visibility(&item.vis) }); } + ast::ItemKind::Delegation(box delegation) => { + self.print_delegation(delegation, &item.vis, &item.attrs) + } } self.ann.post(self, AnnNode::Item(item)) } @@ -554,10 +557,38 @@ impl<'a> State<'a> { self.word(";"); } } + ast::AssocItemKind::Delegation(box delegation) => { + self.print_delegation(delegation, vis, &item.attrs) + } } self.ann.post(self, AnnNode::SubItem(id)) } + pub(crate) fn print_delegation( + &mut self, + delegation: &ast::Delegation, + vis: &ast::Visibility, + attrs: &[ast::Attribute], + ) { + if delegation.body.is_some() { + self.head(""); + } + self.print_visibility(vis); + self.word_space("reuse"); + + if let Some(qself) = &delegation.qself { + self.print_qpath(&delegation.path, qself, false); + } else { + self.print_path(&delegation.path, false, 0); + } + if let Some(body) = &delegation.body { + self.nbsp(); + self.print_block_with_attrs(body, attrs); + } else { + self.word(";"); + } + } + fn print_fn_full( &mut self, sig: &ast::FnSig, diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index b3f601b75956..6b903be6e5ee 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -9,7 +9,7 @@ use rustc_macros::HashStable_Generic; use rustc_session::config::ExpectedValues; use rustc_session::lint::builtin::UNEXPECTED_CFGS; use rustc_session::lint::BuiltinLintDiagnostics; -use rustc_session::parse::{feature_err, ParseSess}; +use rustc_session::parse::feature_err; use rustc_session::{RustcVersion, Session}; use rustc_span::hygiene::Transparency; use rustc_span::{symbol::sym, symbol::Symbol, Span}; @@ -518,15 +518,15 @@ pub struct Condition { /// Tests if a cfg-pattern matches the cfg set pub fn cfg_matches( cfg: &ast::MetaItem, - sess: &ParseSess, + sess: &Session, lint_node_id: NodeId, features: Option<&Features>, ) -> bool { eval_condition(cfg, sess, features, &mut |cfg| { try_gate_cfg(cfg.name, cfg.span, sess, features); - match sess.check_config.expecteds.get(&cfg.name) { + match sess.parse_sess.check_config.expecteds.get(&cfg.name) { Some(ExpectedValues::Some(values)) if !values.contains(&cfg.value) => { - sess.buffer_lint_with_diagnostic( + sess.parse_sess.buffer_lint_with_diagnostic( UNEXPECTED_CFGS, cfg.span, lint_node_id, @@ -541,8 +541,8 @@ pub fn cfg_matches( ), ); } - None if sess.check_config.exhaustive_names => { - sess.buffer_lint_with_diagnostic( + None if sess.parse_sess.check_config.exhaustive_names => { + sess.parse_sess.buffer_lint_with_diagnostic( UNEXPECTED_CFGS, cfg.span, lint_node_id, @@ -555,18 +555,18 @@ pub fn cfg_matches( } _ => { /* not unexpected */ } } - sess.config.contains(&(cfg.name, cfg.value)) + sess.parse_sess.config.contains(&(cfg.name, cfg.value)) }) } -fn try_gate_cfg(name: Symbol, span: Span, sess: &ParseSess, features: Option<&Features>) { +fn try_gate_cfg(name: Symbol, span: Span, sess: &Session, features: Option<&Features>) { let gate = find_gated_cfg(|sym| sym == name); if let (Some(feats), Some(gated_cfg)) = (features, gate) { gate_cfg(gated_cfg, span, sess, feats); } } -fn gate_cfg(gated_cfg: &GatedCfg, cfg_span: Span, sess: &ParseSess, features: &Features) { +fn gate_cfg(gated_cfg: &GatedCfg, cfg_span: Span, sess: &Session, features: &Features) { let (cfg, feature, has_feature) = gated_cfg; if !has_feature(features) && !cfg_span.allows_unstable(*feature) { let explain = format!("`cfg({cfg})` is experimental and subject to change"); @@ -594,11 +594,11 @@ fn parse_version(s: Symbol) -> Option { /// evaluate individual items. pub fn eval_condition( cfg: &ast::MetaItem, - sess: &ParseSess, + sess: &Session, features: Option<&Features>, eval: &mut impl FnMut(Condition) -> bool, ) -> bool { - let dcx = &sess.dcx; + let dcx = &sess.parse_sess.dcx; match &cfg.kind { ast::MetaItemKind::List(mis) if cfg.name_or_empty() == sym::version => { try_gate_cfg(sym::version, cfg.span, sess, features); @@ -626,7 +626,7 @@ pub fn eval_condition( }; // See https://github.com/rust-lang/rust/issues/64796#issuecomment-640851454 for details - if sess.assume_incomplete_release { + if sess.parse_sess.assume_incomplete_release { RustcVersion::CURRENT > min_version } else { RustcVersion::CURRENT >= min_version diff --git a/compiler/rustc_builtin_macros/src/cfg.rs b/compiler/rustc_builtin_macros/src/cfg.rs index 1bc2512a7b05..581d390992ad 100644 --- a/compiler/rustc_builtin_macros/src/cfg.rs +++ b/compiler/rustc_builtin_macros/src/cfg.rs @@ -22,7 +22,7 @@ pub fn expand_cfg( Ok(cfg) => { let matches_cfg = attr::cfg_matches( &cfg, - &cx.sess.parse_sess, + &cx.sess, cx.current_expansion.lint_node_id, Some(cx.ecfg.features), ); diff --git a/compiler/rustc_builtin_macros/src/source_util.rs b/compiler/rustc_builtin_macros/src/source_util.rs index e7d7b4a70122..43d13569d1ee 100644 --- a/compiler/rustc_builtin_macros/src/source_util.rs +++ b/compiler/rustc_builtin_macros/src/source_util.rs @@ -107,7 +107,7 @@ pub fn expand_include<'cx>( return DummyResult::any(sp); }; // The file will be added to the code map by the parser - let file = match resolve_path(&cx.sess.parse_sess, file.as_str(), sp) { + let file = match resolve_path(&cx.sess, file.as_str(), sp) { Ok(f) => f, Err(err) => { err.emit(); @@ -179,7 +179,7 @@ pub fn expand_include_str( let Some(file) = get_single_str_from_tts(cx, sp, tts, "include_str!") else { return DummyResult::any(sp); }; - let file = match resolve_path(&cx.sess.parse_sess, file.as_str(), sp) { + let file = match resolve_path(&cx.sess, file.as_str(), sp) { Ok(f) => f, Err(err) => { err.emit(); @@ -213,7 +213,7 @@ pub fn expand_include_bytes( let Some(file) = get_single_str_from_tts(cx, sp, tts, "include_bytes!") else { return DummyResult::any(sp); }; - let file = match resolve_path(&cx.sess.parse_sess, file.as_str(), sp) { + let file = match resolve_path(&cx.sess, file.as_str(), sp) { Ok(f) => f, Err(err) => { err.emit(); diff --git a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs index 094a61d6e0df..a1daadce958e 100644 --- a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs +++ b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs @@ -267,9 +267,12 @@ impl CguReuseTracker { fn check_expected_reuse(&self, sess: &Session) { if let Some(ref data) = self.data { - for (cgu_name, &(ref cgu_user_name, ref error_span, expected_reuse, comparison_kind)) in - &data.expected_reuse - { + let mut keys = data.expected_reuse.keys().collect::>(); + keys.sort_unstable(); + for cgu_name in keys { + let &(ref cgu_user_name, ref error_span, expected_reuse, comparison_kind) = + data.expected_reuse.get(cgu_name).unwrap(); + if let Some(&actual_reuse) = data.actual_reuse.get(cgu_name) { let (error, at_least) = match comparison_kind { ComparisonKind::Exact => (expected_reuse != actual_reuse, false), diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index ace356ab1533..959653c93265 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -554,6 +554,11 @@ fn link_staticlib<'a>( archive_builder_builder .extract_bundled_libs(path, tempdir.as_ref(), &relevant_libs) .unwrap_or_else(|e| sess.dcx().emit_fatal(e)); + + // We sort the libraries below + #[allow(rustc::potential_query_instability)] + let mut relevant_libs: Vec = relevant_libs.into_iter().collect(); + relevant_libs.sort_unstable(); for filename in relevant_libs { let joined = tempdir.as_ref().join(filename.as_str()); let path = joined.as_path(); @@ -2201,14 +2206,19 @@ fn linker_with_args<'a>( .iter() .find(|(ty, _)| *ty == crate_type) .expect("failed to find crate type in dependency format list"); - let native_libraries_from_nonstatics = codegen_results + + // We sort the libraries below + #[allow(rustc::potential_query_instability)] + let mut native_libraries_from_nonstatics = codegen_results .crate_info .native_libraries .iter() .filter_map(|(cnum, libraries)| { (dependency_linkage[cnum.as_usize() - 1] != Linkage::Static).then_some(libraries) }) - .flatten(); + .flatten() + .collect::>(); + native_libraries_from_nonstatics.sort_unstable_by(|a, b| a.name.as_str().cmp(b.name.as_str())); for (raw_dylib_name, raw_dylib_imports) in collate_raw_dylibs(sess, native_libraries_from_nonstatics)? { @@ -2860,7 +2870,7 @@ fn add_dynamic_crate(cmd: &mut dyn Linker, sess: &Session, cratepath: &Path) { fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool { match lib.cfg { - Some(ref cfg) => rustc_attr::cfg_matches(cfg, &sess.parse_sess, CRATE_NODE_ID, None), + Some(ref cfg) => rustc_attr::cfg_matches(cfg, sess, CRATE_NODE_ID, None), None => true, } } diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs index cae7c40c5ad1..2dba04e0bb71 100644 --- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs +++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs @@ -319,6 +319,8 @@ fn exported_symbols_provider_local( let (_, cgus) = tcx.collect_and_partition_mono_items(()); + // The symbols created in this loop are sorted below it + #[allow(rustc::potential_query_instability)] for (mono_item, data) in cgus.iter().flat_map(|cgu| cgu.items().iter()) { if data.linkage != Linkage::External { // We can only re-use things with external linkage, otherwise diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs index 0ad4af968dbf..098ea1b793cc 100644 --- a/compiler/rustc_codegen_ssa/src/base.rs +++ b/compiler/rustc_codegen_ssa/src/base.rs @@ -912,17 +912,22 @@ impl CrateInfo { }) .collect(); let prefix = if target.is_like_windows && target.arch == "x86" { "_" } else { "" }; + + // This loop only adds new items to values of the hash map, so the order in which we + // iterate over the values is not important. + #[allow(rustc::potential_query_instability)] info.linked_symbols .iter_mut() .filter(|(crate_type, _)| { !matches!(crate_type, CrateType::Rlib | CrateType::Staticlib) }) .for_each(|(_, linked_symbols)| { - linked_symbols.extend( - missing_weak_lang_items - .iter() - .map(|item| (format!("{prefix}{item}"), SymbolExportKind::Text)), - ); + let mut symbols = missing_weak_lang_items + .iter() + .map(|item| (format!("{prefix}{item}"), SymbolExportKind::Text)) + .collect::>(); + symbols.sort_unstable_by(|a, b| a.0.cmp(&b.0)); + linked_symbols.extend(symbols); if tcx.allocator_kind(()).is_some() { // At least one crate needs a global allocator. This crate may be placed // after the crate that defines it in the linker order, in which case some diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs index 36d7234a6ea9..198b7ac41707 100644 --- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs +++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs @@ -155,7 +155,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { Some([item]) if item.has_name(sym::linker) => { if !tcx.features().used_with_arg { feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::used_with_arg, attr.span, "`#[used(linker)]` is currently unstable", @@ -167,7 +167,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { Some([item]) if item.has_name(sym::compiler) => { if !tcx.features().used_with_arg { feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::used_with_arg, attr.span, "`#[used(compiler)]` is currently unstable", @@ -251,7 +251,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { && !attr.span.allows_unstable(sym::closure_track_caller) { feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::closure_track_caller, attr.span, "`#[track_caller]` on closures is currently unstable", @@ -304,7 +304,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { // `#[target_feature]` on `main` and `start`. } else if !tcx.features().target_feature_11 { feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::target_feature_11, attr.span, "`#[target_feature(..)]` can only be applied to `unsafe` functions", diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs index 99280fdba7ce..8f5421823a38 100644 --- a/compiler/rustc_codegen_ssa/src/lib.rs +++ b/compiler/rustc_codegen_ssa/src/lib.rs @@ -11,7 +11,6 @@ #![feature(strict_provenance)] #![feature(try_blocks)] #![recursion_limit = "256"] -#![allow(rustc::potential_query_instability)] //! This crate contains codegen code that is used by all codegen backends (LLVM and others). //! The backend-agnostic functions of this crate use functions defined in various traits that diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 0fef6bc110e1..3694e41a0e08 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -82,7 +82,7 @@ pub fn from_target_feature( }; if !allowed { feature_err( - &tcx.sess.parse_sess, + &tcx.sess, feature_gate.unwrap(), item.span(), format!("the target feature `{feature}` is currently unstable"), diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index 02952872a938..327c91731bf5 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -64,7 +64,7 @@ impl<'tcx> NonConstOp<'tcx> for FloatingPointOp { fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx> { feature_err( - &ccx.tcx.sess.parse_sess, + &ccx.tcx.sess, sym::const_fn_floating_point_arithmetic, span, format!("floating point arithmetic is not allowed in {}s", ccx.const_kind()), @@ -553,7 +553,7 @@ impl<'tcx> NonConstOp<'tcx> for RawMutPtrDeref { fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx> { feature_err( - &ccx.tcx.sess.parse_sess, + &ccx.tcx.sess, sym::const_mut_refs, span, format!("dereferencing raw mutable pointers in {}s is unstable", ccx.const_kind(),), @@ -624,7 +624,7 @@ pub mod ty { fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx> { feature_err( - &ccx.tcx.sess.parse_sess, + &ccx.tcx.sess, sym::const_mut_refs, span, format!("mutable references are not allowed in {}s", ccx.const_kind()), diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 8c2752af6597..63391a0faa6b 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -865,10 +865,6 @@ impl DiagCtxt { /// directly). #[track_caller] pub fn delayed_bug(&self, msg: impl Into) -> ErrorGuaranteed { - let treat_next_err_as_bug = self.inner.borrow().treat_next_err_as_bug(); - if treat_next_err_as_bug { - self.bug(msg); - } DiagnosticBuilder::::new(self, DelayedBug(DelayedBugKind::Normal), msg) .emit() } @@ -883,10 +879,6 @@ impl DiagCtxt { sp: impl Into, msg: impl Into, ) -> ErrorGuaranteed { - let treat_next_err_as_bug = self.inner.borrow().treat_next_err_as_bug(); - if treat_next_err_as_bug { - self.span_bug(sp, msg); - } DiagnosticBuilder::::new(self, DelayedBug(DelayedBugKind::Normal), msg) .with_span(sp) .emit() @@ -1259,10 +1251,6 @@ impl DiagCtxtInner { } fn emit_diagnostic(&mut self, mut diagnostic: Diagnostic) -> Option { - if matches!(diagnostic.level, Error | Fatal) && self.treat_next_err_as_bug() { - diagnostic.level = Bug; - } - // The `LintExpectationId` can be stable or unstable depending on when it was created. // Diagnostics created before the definition of `HirId`s are unstable and can not yet // be stored. Instead, they are buffered until the `LintExpectationId` is replaced by @@ -1298,6 +1286,12 @@ impl DiagCtxtInner { _ => {} } + // This must come after the possible promotion of `DelayedBug` to + // `Error` above. + if matches!(diagnostic.level, Error | Fatal) && self.treat_next_err_as_bug() { + diagnostic.level = Bug; + } + if diagnostic.has_future_breakage() { // Future breakages aren't emitted if they're Level::Allow, // but they still need to be constructed and stashed below, @@ -1387,20 +1381,14 @@ impl DiagCtxtInner { } fn treat_err_as_bug(&self) -> bool { - self.flags.treat_err_as_bug.is_some_and(|c| { - self.err_count + self.lint_err_count + self.delayed_bug_count() >= c.get() - }) + self.flags.treat_err_as_bug.is_some_and(|c| self.err_count + self.lint_err_count >= c.get()) } // Use this one before incrementing `err_count`. fn treat_next_err_as_bug(&self) -> bool { - self.flags.treat_err_as_bug.is_some_and(|c| { - self.err_count + self.lint_err_count + self.delayed_bug_count() + 1 >= c.get() - }) - } - - fn delayed_bug_count(&self) -> usize { - self.span_delayed_bugs.len() + self.good_path_delayed_bugs.len() + self.flags + .treat_err_as_bug + .is_some_and(|c| self.err_count + self.lint_err_count + 1 >= c.get()) } fn has_errors(&self) -> bool { @@ -1412,7 +1400,7 @@ impl DiagCtxtInner { } fn flush_delayed(&mut self, kind: DelayedBugKind) { - let (bugs, explanation) = match kind { + let (bugs, note1) = match kind { DelayedBugKind::Normal => ( std::mem::take(&mut self.span_delayed_bugs), "no errors encountered even though `span_delayed_bug` issued", @@ -1422,6 +1410,7 @@ impl DiagCtxtInner { "no warnings or errors encountered even though `good_path_delayed_bugs` issued", ), }; + let note2 = "those delayed bugs will now be shown as internal compiler errors"; if bugs.is_empty() { return; @@ -1447,8 +1436,11 @@ impl DiagCtxtInner { if i == 0 { // Put the overall explanation before the `DelayedBug`s, to - // frame them better (e.g. separate warnings from them). - self.emit_diagnostic(Diagnostic::new(Bug, explanation)); + // frame them better (e.g. separate warnings from them). Also, + // make it a note so it doesn't count as an error, because that + // could trigger `-Ztreat-err-as-bug`, which we don't want. + self.emit_diagnostic(Diagnostic::new(Note, note1)); + self.emit_diagnostic(Diagnostic::new(Note, note2)); } let mut bug = @@ -1474,22 +1466,12 @@ impl DiagCtxtInner { fn panic_if_treat_err_as_bug(&self) { if self.treat_err_as_bug() { - match ( - self.err_count + self.lint_err_count, - self.delayed_bug_count(), - self.flags.treat_err_as_bug.map(|c| c.get()).unwrap(), - ) { - (1, 0, 1) => panic!("aborting due to `-Z treat-err-as-bug=1`"), - (0, 1, 1) => panic!("aborting due delayed bug with `-Z treat-err-as-bug=1`"), - (count, delayed_count, val) => { - if delayed_count > 0 { - panic!( - "aborting after {count} errors and {delayed_count} delayed bugs due to `-Z treat-err-as-bug={val}`", - ) - } else { - panic!("aborting after {count} errors due to `-Z treat-err-as-bug={val}`") - } - } + let n = self.flags.treat_err_as_bug.map(|c| c.get()).unwrap(); + assert_eq!(n, self.err_count + self.lint_err_count); + if n == 1 { + panic!("aborting due to `-Z treat-err-as-bug=1`"); + } else { + panic!("aborting after {n} errors due to `-Z treat-err-as-bug={n}`"); } } } diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index e87f2306bc70..0a1c44303970 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -1150,7 +1150,7 @@ impl<'a> ExtCtxt<'a> { /// /// This unifies the logic used for resolving `include_X!`. pub fn resolve_path( - parse_sess: &ParseSess, + parse_sess: &Session, path: impl Into, span: Span, ) -> PResult<'_, PathBuf> { @@ -1166,7 +1166,7 @@ pub fn resolve_path( .expect("attempting to resolve a file path in an external file"), FileName::DocTest(path, _) => path, other => { - return Err(parse_sess.dcx.create_err(errors::ResolveRelativePath { + return Err(parse_sess.dcx().create_err(errors::ResolveRelativePath { span, path: parse_sess.source_map().filename_for_diagnostics(&other).to_string(), })); @@ -1390,7 +1390,7 @@ pub fn parse_macro_name_and_helper_attrs( /// asserts in old versions of those crates and their wide use in the ecosystem. /// See issue #73345 for more details. /// FIXME(#73933): Remove this eventually. -fn pretty_printing_compatibility_hack(item: &Item, sess: &ParseSess) -> bool { +fn pretty_printing_compatibility_hack(item: &Item, sess: &Session) -> bool { let name = item.ident.name; if name == sym::ProceduralMasqueradeDummyType { if let ast::ItemKind::Enum(enum_def, _) = &item.kind { @@ -1418,7 +1418,7 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &ParseSess) -> bool { }; if crate_matches { - sess.buffer_lint_with_diagnostic( + sess.parse_sess.buffer_lint_with_diagnostic( PROC_MACRO_BACK_COMPAT, item.ident.span, ast::CRATE_NODE_ID, @@ -1439,7 +1439,7 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &ParseSess) -> bool { false } -pub(crate) fn ann_pretty_printing_compatibility_hack(ann: &Annotatable, sess: &ParseSess) -> bool { +pub(crate) fn ann_pretty_printing_compatibility_hack(ann: &Annotatable, sess: &Session) -> bool { let item = match ann { Annotatable::Item(item) => item, Annotatable::Stmt(stmt) => match &stmt.kind { @@ -1451,7 +1451,7 @@ pub(crate) fn ann_pretty_printing_compatibility_hack(ann: &Annotatable, sess: &P pretty_printing_compatibility_hack(item, sess) } -pub(crate) fn nt_pretty_printing_compatibility_hack(nt: &Nonterminal, sess: &ParseSess) -> bool { +pub(crate) fn nt_pretty_printing_compatibility_hack(nt: &Nonterminal, sess: &Session) -> bool { let item = match nt { Nonterminal::NtItem(item) => item, Nonterminal::NtStmt(stmt) => match &stmt.kind { diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index d015d7799632..f574e81e9051 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -256,12 +256,7 @@ impl<'a> StripUnconfigured<'a> { ); } - if !attr::cfg_matches( - &cfg_predicate, - &self.sess.parse_sess, - self.lint_node_id, - self.features, - ) { + if !attr::cfg_matches(&cfg_predicate, &self.sess, self.lint_node_id, self.features) { return vec![]; } @@ -369,12 +364,7 @@ impl<'a> StripUnconfigured<'a> { }; ( parse_cfg(&meta_item, self.sess).map_or(true, |meta_item| { - attr::cfg_matches( - meta_item, - &self.sess.parse_sess, - self.lint_node_id, - self.features, - ) + attr::cfg_matches(meta_item, &self.sess, self.lint_node_id, self.features) }), Some(meta_item), ) @@ -385,7 +375,7 @@ impl<'a> StripUnconfigured<'a> { pub(crate) fn maybe_emit_expr_attr_err(&self, attr: &Attribute) { if self.features.is_some_and(|features| !features.stmt_expr_attributes) { let mut err = feature_err( - &self.sess.parse_sess, + &self.sess, sym::stmt_expr_attributes, attr.span, "attributes on expressions are experimental", diff --git a/compiler/rustc_expand/src/expand.rs b/compiler/rustc_expand/src/expand.rs index c39a3dce34e4..9c411be9ff93 100644 --- a/compiler/rustc_expand/src/expand.rs +++ b/compiler/rustc_expand/src/expand.rs @@ -30,8 +30,8 @@ use rustc_parse::parser::{ use rustc_parse::validate_attr; use rustc_session::lint::builtin::{UNUSED_ATTRIBUTES, UNUSED_DOC_COMMENTS}; use rustc_session::lint::BuiltinLintDiagnostics; -use rustc_session::parse::{feature_err, ParseSess}; -use rustc_session::Limit; +use rustc_session::parse::feature_err; +use rustc_session::{Limit, Session}; use rustc_span::symbol::{sym, Ident}; use rustc_span::{FileName, LocalExpnId, Span}; @@ -800,7 +800,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { return; } feature_err( - &self.cx.sess.parse_sess, + &self.cx.sess, sym::proc_macro_hygiene, span, format!("custom attributes cannot be applied to {kind}"), @@ -810,7 +810,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { fn gate_proc_macro_input(&self, annotatable: &Annotatable) { struct GateProcMacroInput<'a> { - parse_sess: &'a ParseSess, + sess: &'a Session, } impl<'ast, 'a> Visitor<'ast> for GateProcMacroInput<'a> { @@ -820,7 +820,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { if !matches!(mod_kind, ModKind::Loaded(_, Inline::Yes, _)) => { feature_err( - self.parse_sess, + self.sess, sym::proc_macro_hygiene, item.span, "non-inline modules in proc macro input are unstable", @@ -835,8 +835,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> { } if !self.cx.ecfg.features.proc_macro_hygiene { - annotatable - .visit_with(&mut GateProcMacroInput { parse_sess: &self.cx.sess.parse_sess }); + annotatable.visit_with(&mut GateProcMacroInput { sess: &self.cx.sess }); } } diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index a56c980791af..363b52aef8a7 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -477,14 +477,14 @@ pub fn compile_declarative_macro( let tt = mbe::quoted::parse( &TokenStream::new(vec![tt.clone()]), true, - &sess.parse_sess, + sess, def.id, features, edition, ) .pop() .unwrap(); - valid &= check_lhs_nt_follows(&sess.parse_sess, def, &tt); + valid &= check_lhs_nt_follows(sess, def, &tt); return tt; } sess.dcx().span_bug(def.span, "wrong-structured lhs") @@ -501,7 +501,7 @@ pub fn compile_declarative_macro( return mbe::quoted::parse( &TokenStream::new(vec![tt.clone()]), false, - &sess.parse_sess, + sess, def.id, features, edition, @@ -516,12 +516,12 @@ pub fn compile_declarative_macro( }; for rhs in &rhses { - valid &= check_rhs(&sess.parse_sess, rhs); + valid &= check_rhs(sess, rhs); } // don't abort iteration early, so that errors for multiple lhses can be reported for lhs in &lhses { - valid &= check_lhs_no_empty_seq(&sess.parse_sess, slice::from_ref(lhs)); + valid &= check_lhs_no_empty_seq(sess, slice::from_ref(lhs)); } valid &= macro_check::check_meta_variables(&sess.parse_sess, def.id, def.span, &lhses, &rhses); @@ -588,21 +588,21 @@ pub fn compile_declarative_macro( (mk_syn_ext(expander), rule_spans) } -fn check_lhs_nt_follows(sess: &ParseSess, def: &ast::Item, lhs: &mbe::TokenTree) -> bool { +fn check_lhs_nt_follows(sess: &Session, def: &ast::Item, lhs: &mbe::TokenTree) -> bool { // lhs is going to be like TokenTree::Delimited(...), where the // entire lhs is those tts. Or, it can be a "bare sequence", not wrapped in parens. if let mbe::TokenTree::Delimited(.., delimited) = lhs { check_matcher(sess, def, &delimited.tts) } else { let msg = "invalid macro matcher; matchers must be contained in balanced delimiters"; - sess.dcx.span_err(lhs.span(), msg); + sess.dcx().span_err(lhs.span(), msg); false } // we don't abort on errors on rejection, the driver will do that for us // after parsing/expansion. we can report every error in every macro this way. } -fn is_empty_token_tree(sess: &ParseSess, seq: &mbe::SequenceRepetition) -> bool { +fn is_empty_token_tree(sess: &Session, seq: &mbe::SequenceRepetition) -> bool { if seq.separator.is_some() { false } else { @@ -621,7 +621,7 @@ fn is_empty_token_tree(sess: &ParseSess, seq: &mbe::SequenceRepetition) -> bool iter.next(); } let span = t.span.to(now.span); - sess.dcx.span_note(span, "doc comments are ignored in matcher position"); + sess.dcx().span_note(span, "doc comments are ignored in matcher position"); } mbe::TokenTree::Sequence(_, sub_seq) if (sub_seq.kleene.op == mbe::KleeneOp::ZeroOrMore @@ -635,7 +635,7 @@ fn is_empty_token_tree(sess: &ParseSess, seq: &mbe::SequenceRepetition) -> bool /// Checks that the lhs contains no repetition which could match an empty token /// tree, because then the matcher would hang indefinitely. -fn check_lhs_no_empty_seq(sess: &ParseSess, tts: &[mbe::TokenTree]) -> bool { +fn check_lhs_no_empty_seq(sess: &Session, tts: &[mbe::TokenTree]) -> bool { use mbe::TokenTree; for tt in tts { match tt { @@ -651,7 +651,7 @@ fn check_lhs_no_empty_seq(sess: &ParseSess, tts: &[mbe::TokenTree]) -> bool { TokenTree::Sequence(span, seq) => { if is_empty_token_tree(sess, seq) { let sp = span.entire(); - sess.dcx.span_err(sp, "repetition matches empty token tree"); + sess.dcx().span_err(sp, "repetition matches empty token tree"); return false; } if !check_lhs_no_empty_seq(sess, &seq.tts) { @@ -664,22 +664,22 @@ fn check_lhs_no_empty_seq(sess: &ParseSess, tts: &[mbe::TokenTree]) -> bool { true } -fn check_rhs(sess: &ParseSess, rhs: &mbe::TokenTree) -> bool { +fn check_rhs(sess: &Session, rhs: &mbe::TokenTree) -> bool { match *rhs { mbe::TokenTree::Delimited(..) => return true, _ => { - sess.dcx.span_err(rhs.span(), "macro rhs must be delimited"); + sess.dcx().span_err(rhs.span(), "macro rhs must be delimited"); } } false } -fn check_matcher(sess: &ParseSess, def: &ast::Item, matcher: &[mbe::TokenTree]) -> bool { +fn check_matcher(sess: &Session, def: &ast::Item, matcher: &[mbe::TokenTree]) -> bool { let first_sets = FirstSets::new(matcher); let empty_suffix = TokenSet::empty(); - let err = sess.dcx.err_count(); + let err = sess.dcx().err_count(); check_matcher_core(sess, def, &first_sets, matcher, &empty_suffix); - err == sess.dcx.err_count() + err == sess.dcx().err_count() } fn has_compile_error_macro(rhs: &mbe::TokenTree) -> bool { @@ -1014,7 +1014,7 @@ impl<'tt> TokenSet<'tt> { // Requires that `first_sets` is pre-computed for `matcher`; // see `FirstSets::new`. fn check_matcher_core<'tt>( - sess: &ParseSess, + sess: &Session, def: &ast::Item, first_sets: &FirstSets<'tt>, matcher: &'tt [mbe::TokenTree], @@ -1139,7 +1139,7 @@ fn check_matcher_core<'tt>( name, Some(NonterminalKind::PatParam { inferred: false }), )); - sess.buffer_lint_with_diagnostic( + sess.parse_sess.buffer_lint_with_diagnostic( RUST_2021_INCOMPATIBLE_OR_PATTERNS, span, ast::CRATE_NODE_ID, @@ -1158,7 +1158,7 @@ fn check_matcher_core<'tt>( }; let sp = next_token.span(); - let mut err = sess.dcx.struct_span_err( + let mut err = sess.dcx().struct_span_err( sp, format!( "`${name}:{frag}` {may_be} followed by `{next}`, which \ @@ -1172,7 +1172,7 @@ fn check_matcher_core<'tt>( err.span_label(sp, format!("not allowed after `{kind}` fragments")); if kind == NonterminalKind::PatWithOr - && sess.edition.at_least_rust_2021() + && sess.parse_sess.edition.at_least_rust_2021() && next_token.is_token(&BinOp(token::BinOpToken::Or)) { let suggestion = quoted_tt_to_string(&TokenTree::MetaVarDecl( diff --git a/compiler/rustc_expand/src/mbe/quoted.rs b/compiler/rustc_expand/src/mbe/quoted.rs index 889f43ed2032..4824b67d2778 100644 --- a/compiler/rustc_expand/src/mbe/quoted.rs +++ b/compiler/rustc_expand/src/mbe/quoted.rs @@ -5,7 +5,8 @@ use rustc_ast::token::{self, Delimiter, Token}; use rustc_ast::{tokenstream, NodeId}; use rustc_ast_pretty::pprust; use rustc_feature::Features; -use rustc_session::parse::{feature_err, ParseSess}; +use rustc_session::parse::feature_err; +use rustc_session::Session; use rustc_span::symbol::{kw, sym, Ident}; use rustc_span::edition::Edition; @@ -38,7 +39,7 @@ const VALID_FRAGMENT_NAMES_MSG: &str = "valid fragment specifiers are \ pub(super) fn parse( input: &tokenstream::TokenStream, parsing_patterns: bool, - sess: &ParseSess, + sess: &Session, node_id: NodeId, features: &Features, edition: Edition, @@ -84,7 +85,7 @@ pub(super) fn parse( "invalid fragment specifier `{}`", frag.name ); - sess.dcx + sess.dcx() .struct_span_err(span, msg) .with_help(VALID_FRAGMENT_NAMES_MSG) .emit(); @@ -113,7 +114,7 @@ pub(super) fn parse( } /// Asks for the `macro_metavar_expr` feature if it is not already declared -fn maybe_emit_macro_metavar_expr_feature(features: &Features, sess: &ParseSess, span: Span) { +fn maybe_emit_macro_metavar_expr_feature(features: &Features, sess: &Session, span: Span) { if !features.macro_metavar_expr { let msg = "meta-variable expressions are unstable"; feature_err(sess, sym::macro_metavar_expr, span, msg).emit(); @@ -138,7 +139,7 @@ fn parse_tree<'a>( tree: &'a tokenstream::TokenTree, outer_trees: &mut impl Iterator, parsing_patterns: bool, - sess: &ParseSess, + sess: &Session, node_id: NodeId, features: &Features, edition: Edition, @@ -174,7 +175,8 @@ fn parse_tree<'a>( // The delimiter is `{`. This indicates the beginning // of a meta-variable expression (e.g. `${count(ident)}`). // Try to parse the meta-variable expression. - match MetaVarExpr::parse(tts, delim_span.entire(), sess) { + match MetaVarExpr::parse(tts, delim_span.entire(), &sess.parse_sess) + { Err(err) => { err.emit(); // Returns early the same read `$` to avoid spanning @@ -195,7 +197,7 @@ fn parse_tree<'a>( _ => { let tok = pprust::token_kind_to_string(&token::OpenDelim(delim)); let msg = format!("expected `(` or `{{`, found `{tok}`"); - sess.dcx.span_err(delim_span.entire(), msg); + sess.dcx().span_err(delim_span.entire(), msg); } } } @@ -244,7 +246,7 @@ fn parse_tree<'a>( Some(tokenstream::TokenTree::Token(token, _)) => { let msg = format!("expected identifier, found `{}`", pprust::token_to_string(token),); - sess.dcx.span_err(token.span, msg); + sess.dcx().span_err(token.span, msg); TokenTree::MetaVar(token.span, Ident::empty()) } @@ -313,7 +315,7 @@ fn parse_kleene_op<'a>( fn parse_sep_and_kleene_op<'a>( input: &mut impl Iterator, span: Span, - sess: &ParseSess, + sess: &Session, ) -> (Option, KleeneToken) { // We basically look at two token trees here, denoted as #1 and #2 below let span = match parse_kleene_op(input, span) { @@ -325,7 +327,7 @@ fn parse_sep_and_kleene_op<'a>( // #2 is the `?` Kleene op, which does not take a separator (error) Ok(Ok((KleeneOp::ZeroOrOne, span))) => { // Error! - sess.dcx.span_err( + sess.dcx().span_err( token.span, "the `?` macro repetition operator does not take a separator", ); @@ -346,7 +348,7 @@ fn parse_sep_and_kleene_op<'a>( }; // If we ever get to this point, we have experienced an "unexpected token" error - sess.dcx.span_err(span, "expected one of: `*`, `+`, or `?`"); + sess.dcx().span_err(span, "expected one of: `*`, `+`, or `?`"); // Return a dummy (None, KleeneToken::new(KleeneOp::ZeroOrMore, span)) @@ -355,9 +357,10 @@ fn parse_sep_and_kleene_op<'a>( // `$$` or a meta-variable is the lhs of a macro but shouldn't. // // For example, `macro_rules! foo { ( ${length()} ) => {} }` -fn span_dollar_dollar_or_metavar_in_the_lhs_err(sess: &ParseSess, token: &Token) { - sess.dcx.span_err(token.span, format!("unexpected token: {}", pprust::token_to_string(token))); - sess.dcx.span_note( +fn span_dollar_dollar_or_metavar_in_the_lhs_err(sess: &Session, token: &Token) { + sess.dcx() + .span_err(token.span, format!("unexpected token: {}", pprust::token_to_string(token))); + sess.dcx().span_note( token.span, "`$$` and meta-variable expressions are not allowed inside macro parameter definitions", ); diff --git a/compiler/rustc_expand/src/proc_macro.rs b/compiler/rustc_expand/src/proc_macro.rs index a1d213619571..2233cad2e63a 100644 --- a/compiler/rustc_expand/src/proc_macro.rs +++ b/compiler/rustc_expand/src/proc_macro.rs @@ -119,7 +119,7 @@ impl MultiItemModifier for DeriveProcMacro { // We need special handling for statement items // (e.g. `fn foo() { #[derive(Debug)] struct Bar; }`) let is_stmt = matches!(item, Annotatable::Stmt(..)); - let hack = crate::base::ann_pretty_printing_compatibility_hack(&item, &ecx.sess.parse_sess); + let hack = crate::base::ann_pretty_printing_compatibility_hack(&item, &ecx.sess); let input = if hack { let nt = match item { Annotatable::Item(item) => token::NtItem(item), diff --git a/compiler/rustc_expand/src/proc_macro_server.rs b/compiler/rustc_expand/src/proc_macro_server.rs index 6392894fea2a..3a78bd945057 100644 --- a/compiler/rustc_expand/src/proc_macro_server.rs +++ b/compiler/rustc_expand/src/proc_macro_server.rs @@ -258,7 +258,7 @@ impl FromInternal<(TokenStream, &mut Rustc<'_, '_>)> for Vec { + /// Actual type should be inherited from `DefId` signature + InferDelegation(DefId, InferDelegationKind), /// A variable length slice (i.e., `[T]`). Slice(&'hir Ty<'hir>), /// A fixed length array (i.e., `[T; n]`). diff --git a/compiler/rustc_hir/src/intravisit.rs b/compiler/rustc_hir/src/intravisit.rs index dd3633b6b4f7..adc090258093 100644 --- a/compiler/rustc_hir/src/intravisit.rs +++ b/compiler/rustc_hir/src/intravisit.rs @@ -856,7 +856,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty<'v>) { visitor.visit_lifetime(lifetime); } TyKind::Typeof(ref expression) => visitor.visit_anon_const(expression), - TyKind::Infer | TyKind::Err(_) => {} + TyKind::Infer | TyKind::InferDelegation(..) | TyKind::Err(_) => {} } } diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl index 6a17668ad17f..432c9c12cbfb 100644 --- a/compiler/rustc_hir_analysis/messages.ftl +++ b/compiler/rustc_hir_analysis/messages.ftl @@ -263,6 +263,10 @@ hir_analysis_must_implement_not_function_span_note = required by this annotation hir_analysis_must_implement_one_of_attribute = the `#[rustc_must_implement_one_of]` attribute must be used with at least 2 args +hir_analysis_not_supported_delegation = + {$descr} is not supported yet + .label = callee defined here + hir_analysis_only_current_traits_arbitrary = only traits defined in the current crate can be implemented for arbitrary types hir_analysis_only_current_traits_foreign = this is not defined in the current crate because this is a foreign trait diff --git a/compiler/rustc_hir_analysis/src/astconv/errors.rs b/compiler/rustc_hir_analysis/src/astconv/errors.rs index 7b23b74f8292..bfe88df4e1a5 100644 --- a/compiler/rustc_hir_analysis/src/astconv/errors.rs +++ b/compiler/rustc_hir_analysis/src/astconv/errors.rs @@ -59,7 +59,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { if trait_segment.args().parenthesized == hir::GenericArgsParentheses::ParenSugar { // For now, require that parenthetical notation be used only with `Fn()` etc. feature_err( - &self.tcx().sess.parse_sess, + &self.tcx().sess, sym::unboxed_closures, span, "parenthetical notation is only stable when used with `Fn`-family traits", @@ -75,7 +75,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { if trait_segment.args().parenthesized != hir::GenericArgsParentheses::ParenSugar { // For now, require that parenthetical notation be used only with `Fn()` etc. let mut err = feature_err( - &sess.parse_sess, + sess, sym::unboxed_closures, span, "the precise format of `Fn`-family traits' type parameters is subject to change", diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index 2886ec213201..9f4f1413650f 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -29,10 +29,9 @@ use rustc_hir::{GenericArg, GenericArgs, OpaqueTyOrigin}; use rustc_infer::infer::{InferCtxt, TyCtxtInferExt}; use rustc_infer::traits::ObligationCause; use rustc_middle::middle::stability::AllowUnstable; -use rustc_middle::ty::GenericParamDefKind; use rustc_middle::ty::{ - self, Const, GenericArgKind, GenericArgsRef, IsSuggestable, ParamEnv, Ty, TyCtxt, - TypeVisitableExt, + self, Const, GenericArgKind, GenericArgsRef, GenericParamDefKind, IsSuggestable, ParamEnv, Ty, + TyCtxt, TypeVisitableExt, }; use rustc_session::lint::builtin::AMBIGUOUS_ASSOCIATED_ITEMS; use rustc_span::edit_distance::find_best_match_for_name; @@ -2322,6 +2321,114 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { self.ast_ty_to_ty_inner(ast_ty, false, true) } + fn check_delegation_constraints(&self, sig_id: DefId, span: Span, emit: bool) -> bool { + let mut error_occured = false; + let sig_span = self.tcx().def_span(sig_id); + let mut try_emit = |descr| { + if emit { + self.tcx().dcx().emit_err(crate::errors::NotSupportedDelegation { + span, + descr, + callee_span: sig_span, + }); + } + error_occured = true; + }; + + if let Some(node) = self.tcx().hir().get_if_local(sig_id) + && let Some(decl) = node.fn_decl() + && let hir::FnRetTy::Return(ty) = decl.output + && let hir::TyKind::InferDelegation(_, _) = ty.kind + { + try_emit("recursive delegation"); + } + + let sig = self.tcx().fn_sig(sig_id).instantiate_identity(); + if sig.output().has_opaque_types() { + try_emit("delegation to a function with opaque type"); + } + + let sig_generics = self.tcx().generics_of(sig_id); + let parent = self.tcx().parent(self.item_def_id()); + let parent_generics = self.tcx().generics_of(parent); + + let parent_is_trait = (self.tcx().def_kind(parent) == DefKind::Trait) as usize; + let sig_has_self = sig_generics.has_self as usize; + + if sig_generics.count() > sig_has_self || parent_generics.count() > parent_is_trait { + try_emit("delegation with early bound generics"); + } + + if self.tcx().asyncness(sig_id) == ty::Asyncness::Yes { + try_emit("delegation to async functions"); + } + + if self.tcx().constness(sig_id) == hir::Constness::Const { + try_emit("delegation to const functions"); + } + + if sig.c_variadic() { + try_emit("delegation to variadic functions"); + // variadic functions are also `unsafe` and `extern "C"`. + // Do not emit same error multiple times. + return error_occured; + } + + if let hir::Unsafety::Unsafe = sig.unsafety() { + try_emit("delegation to unsafe functions"); + } + + if abi::Abi::Rust != sig.abi() { + try_emit("delegation to non Rust ABI functions"); + } + + error_occured + } + + fn ty_from_delegation( + &self, + sig_id: DefId, + idx: hir::InferDelegationKind, + span: Span, + ) -> Ty<'tcx> { + if self.check_delegation_constraints(sig_id, span, idx == hir::InferDelegationKind::Output) + { + let e = self.tcx().dcx().span_delayed_bug(span, "not supported delegation case"); + self.set_tainted_by_errors(e); + return Ty::new_error(self.tcx(), e); + }; + let sig = self.tcx().fn_sig(sig_id); + let sig_generics = self.tcx().generics_of(sig_id); + + let parent = self.tcx().parent(self.item_def_id()); + let parent_def_kind = self.tcx().def_kind(parent); + + let sig = if let DefKind::Impl { .. } = parent_def_kind + && sig_generics.has_self + { + // Generic params can't be here except the trait self type. + // They are not supported yet. + assert_eq!(sig_generics.count(), 1); + assert_eq!(self.tcx().generics_of(parent).count(), 0); + + let self_ty = self.tcx().type_of(parent).instantiate_identity(); + let generic_self_ty = ty::GenericArg::from(self_ty); + let substs = self.tcx().mk_args_from_iter(std::iter::once(generic_self_ty)); + sig.instantiate(self.tcx(), substs) + } else { + sig.instantiate_identity() + }; + + // Bound vars are also inherited from `sig_id`. They will be + // rebinded later in `ty_of_fn`. + let sig = sig.skip_binder(); + + match idx { + hir::InferDelegationKind::Input(id) => sig.inputs()[id], + hir::InferDelegationKind::Output => sig.output(), + } + } + /// Turns a `hir::Ty` into a `Ty`. For diagnostics' purposes we keep track of whether trait /// objects are borrowed like `&dyn Trait` to avoid emitting redundant errors. #[instrument(level = "debug", skip(self), ret)] @@ -2329,6 +2436,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { let tcx = self.tcx(); let result_ty = match &ast_ty.kind { + hir::TyKind::InferDelegation(sig_id, idx) => { + self.ty_from_delegation(*sig_id, *idx, ast_ty.span) + } hir::TyKind::Slice(ty) => Ty::new_slice(tcx, self.ast_ty_to_ty(ty)), hir::TyKind::Ptr(mt) => { Ty::new_ptr(tcx, ty::TypeAndMut { ty: self.ast_ty_to_ty(mt.ty), mutbl: mt.mutbl }) @@ -2520,7 +2630,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { hir_ty: Option<&hir::Ty<'_>>, ) -> ty::PolyFnSig<'tcx> { let tcx = self.tcx(); - let bound_vars = tcx.late_bound_vars(hir_id); + let bound_vars = if let hir::FnRetTy::Return(ret_ty) = decl.output + && let hir::TyKind::InferDelegation(sig_id, _) = ret_ty.kind + { + tcx.fn_sig(sig_id).skip_binder().bound_vars() + } else { + tcx.late_bound_vars(hir_id) + }; debug!(?bound_vars); // We proactively collect all the inferred type params to emit a single error per fn def. @@ -2543,7 +2659,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { self.suggest_trait_fn_ty_for_impl_fn_infer(hir_id, Some(i)) { infer_replacements.push((a.span, suggested_ty.to_string())); - return suggested_ty; + return Ty::new_error_with_message( + self.tcx(), + a.span, + suggested_ty.to_string(), + ); } } @@ -2561,7 +2681,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { self.suggest_trait_fn_ty_for_impl_fn_infer(hir_id, None) { infer_replacements.push((output.span, suggested_ty.to_string())); - suggested_ty + Ty::new_error_with_message(self.tcx(), output.span, suggested_ty.to_string()) } else { visitor.visit_ty(output); self.ast_ty_to_ty(output) diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs index 6265ddafef05..77914802bf77 100644 --- a/compiler/rustc_hir_analysis/src/check/check.rs +++ b/compiler/rustc_hir_analysis/src/check/check.rs @@ -996,7 +996,7 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>) if adt.is_union() && !tcx.features().transparent_unions { feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::transparent_unions, tcx.def_span(adt.did()), "transparent unions are unstable", @@ -1128,7 +1128,7 @@ fn check_enum(tcx: TyCtxt<'_>, def_id: LocalDefId) { if repr_type_ty == tcx.types.i128 || repr_type_ty == tcx.types.u128 { if !tcx.features().repr128 { feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::repr128, tcx.def_span(def_id), "repr with 128-bit type is unstable", diff --git a/compiler/rustc_hir_analysis/src/check/mod.rs b/compiler/rustc_hir_analysis/src/check/mod.rs index 3b05eaedf342..28c8f846c23a 100644 --- a/compiler/rustc_hir_analysis/src/check/mod.rs +++ b/compiler/rustc_hir_analysis/src/check/mod.rs @@ -293,7 +293,7 @@ fn default_body_is_unstable( rustc_session::parse::add_feature_diagnostics_for_issue( &mut err, - &tcx.sess.parse_sess, + &tcx.sess, feature, rustc_feature::GateIssue::Library(issue), false, diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 59c722271440..4772bae58c47 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1591,7 +1591,7 @@ fn check_method_receiver<'tcx>( return Err(if receiver_is_valid(wfcx, span, receiver_ty, self_ty, true) { // Report error; would have worked with `arbitrary_self_types`. feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::arbitrary_self_types, span, format!( diff --git a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs index 3d8390d1946e..4f049f699e6c 100644 --- a/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs +++ b/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs @@ -1189,12 +1189,13 @@ impl<'a, 'tcx> BoundVarContext<'a, 'tcx> { && !self.tcx.asyncness(lifetime_ref.hir_id.owner.def_id).is_async() && !self.tcx.features().anonymous_lifetime_in_impl_trait { - let mut diag = rustc_session::parse::feature_err( - &self.tcx.sess.parse_sess, - sym::anonymous_lifetime_in_impl_trait, - lifetime_ref.ident.span, - "anonymous lifetimes in `impl Trait` are unstable", - ); + let mut diag: rustc_errors::DiagnosticBuilder<'_> = + rustc_session::parse::feature_err( + &self.tcx.sess, + sym::anonymous_lifetime_in_impl_trait, + lifetime_ref.ident.span, + "anonymous lifetimes in `impl Trait` are unstable", + ); if let Some(generics) = self.tcx.hir().get_generics(lifetime_ref.hir_id.owner.def_id) diff --git a/compiler/rustc_hir_analysis/src/collect/type_of.rs b/compiler/rustc_hir_analysis/src/collect/type_of.rs index b936b0c08054..bfa9dc42422c 100644 --- a/compiler/rustc_hir_analysis/src/collect/type_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/type_of.rs @@ -639,7 +639,7 @@ fn check_feature_inherent_assoc_ty(tcx: TyCtxt<'_>, span: Span) { use rustc_session::parse::feature_err; use rustc_span::symbol::sym; feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::inherent_associated_types, span, "inherent associated types are unstable", diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index 4f22da4ba3b9..f14390b77c6e 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -1501,3 +1501,13 @@ pub enum RefOfMutStaticSugg { var: String, }, } + +#[derive(Diagnostic)] +#[diag(hir_analysis_not_supported_delegation)] +pub struct NotSupportedDelegation<'a> { + #[primary_span] + pub span: Span, + pub descr: &'a str, + #[label] + pub callee_span: Span, +} diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index dfc54ac5b23b..f5abb7261c00 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -116,7 +116,8 @@ use rustc_hir::def::DefKind; rustc_fluent_macro::fluent_messages! { "../messages.ftl" } fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi, span: Span) { - const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `aapcs`, `win64`, `sysv64` or `efiapi`"; + const CONVENTIONS_UNSTABLE: &str = + "`C`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi`"; const CONVENTIONS_STABLE: &str = "`C` or `cdecl`"; const UNSTABLE_EXPLAIN: &str = "using calling conventions other than `C` or `cdecl` for varargs functions is unstable"; @@ -133,13 +134,8 @@ fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi // Using this ABI would be ok, if the feature for additional ABI support was enabled. // Return CONVENTIONS_STABLE, because we want the other error to look the same. (false, true) => { - feature_err( - &tcx.sess.parse_sess, - sym::extended_varargs_abi_support, - span, - UNSTABLE_EXPLAIN, - ) - .emit(); + feature_err(&tcx.sess, sym::extended_varargs_abi_support, span, UNSTABLE_EXPLAIN) + .emit(); CONVENTIONS_STABLE } diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index 1eaec9970537..d36e0892d19d 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -320,7 +320,7 @@ impl<'a> State<'a> { self.word("/*ERROR*/"); self.pclose(); } - hir::TyKind::Infer => { + hir::TyKind::Infer | hir::TyKind::InferDelegation(..) => { self.word("_"); } } diff --git a/compiler/rustc_hir_typeck/src/coercion.rs b/compiler/rustc_hir_typeck/src/coercion.rs index 0b266202b267..e9d373119fa4 100644 --- a/compiler/rustc_hir_typeck/src/coercion.rs +++ b/compiler/rustc_hir_typeck/src/coercion.rs @@ -704,7 +704,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { if has_unsized_tuple_coercion && !self.tcx.features().unsized_tuple_coercion { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::unsized_tuple_coercion, self.cause.span, "unsized tuple coercion is not stable enough for use and is subject to change", diff --git a/compiler/rustc_hir_typeck/src/expr.rs b/compiler/rustc_hir_typeck/src/expr.rs index fdad998c451f..af47455c16df 100644 --- a/compiler/rustc_hir_typeck/src/expr.rs +++ b/compiler/rustc_hir_typeck/src/expr.rs @@ -1865,7 +1865,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { (ty::Adt(adt, _), ty::Adt(base_adt, _)) if adt == base_adt); if self.tcx.sess.is_nightly_build() && same_adt { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::type_changing_struct_update, base_expr.span, "type changing struct updating is experimental", @@ -3262,7 +3262,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { if !self.tcx.features().offset_of_enum { rustc_session::parse::feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::offset_of_enum, ident.span, "using enums in offset_of is experimental", diff --git a/compiler/rustc_infer/src/infer/at.rs b/compiler/rustc_infer/src/infer/at.rs index 09313cd9738c..e60e3ffeaa72 100644 --- a/compiler/rustc_infer/src/infer/at.rs +++ b/compiler/rustc_infer/src/infer/at.rs @@ -84,7 +84,7 @@ impl<'tcx> InferCtxt<'tcx> { selection_cache: self.selection_cache.clone(), evaluation_cache: self.evaluation_cache.clone(), reported_trait_errors: self.reported_trait_errors.clone(), - reported_closure_mismatch: self.reported_closure_mismatch.clone(), + reported_signature_mismatch: self.reported_signature_mismatch.clone(), tainted_by_errors: self.tainted_by_errors.clone(), err_count_on_creation: self.err_count_on_creation, universe: self.universe.clone(), diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index fcc94687ed29..e164041c5991 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -278,7 +278,7 @@ pub struct InferCtxt<'tcx> { /// avoid reporting the same error twice. pub reported_trait_errors: RefCell>>>, - pub reported_closure_mismatch: RefCell)>>, + pub reported_signature_mismatch: RefCell)>>, /// When an error occurs, we want to avoid reporting "derived" /// errors that are due to this original failure. Normally, we @@ -702,7 +702,7 @@ impl<'tcx> InferCtxtBuilder<'tcx> { selection_cache: Default::default(), evaluation_cache: Default::default(), reported_trait_errors: Default::default(), - reported_closure_mismatch: Default::default(), + reported_signature_mismatch: Default::default(), tainted_by_errors: Cell::new(None), err_count_on_creation: tcx.dcx().err_count(), universe: Cell::new(ty::UniverseIndex::ROOT), diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 03335996c035..32fba6ade88d 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -202,8 +202,15 @@ pub(crate) fn parse_check_cfg(dcx: &DiagCtxt, specs: Vec) -> CheckCfg { if !args.is_empty() { error!("`any()` must be empty"); } + } else if arg.has_name(sym::none) + && let Some(args) = arg.meta_item_list() + { + values.insert(None); + if !args.is_empty() { + error!("`none()` must be empty"); + } } else { - error!("`values()` arguments must be string literals or `any()`"); + error!("`values()` arguments must be string literals, `none()` or `any()`"); } } } else { diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 8d2f2aaca557..5e1f2ed11ac9 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -1306,10 +1306,7 @@ impl<'tcx> LateLintPass<'tcx> for UngatedAsyncFnTrackCaller { cx.emit_spanned_lint( UNGATED_ASYNC_FN_TRACK_CALLER, attr.span, - BuiltinUngatedAsyncFnTrackCaller { - label: span, - parse_sess: &cx.tcx.sess.parse_sess, - }, + BuiltinUngatedAsyncFnTrackCaller { label: span, session: &cx.tcx.sess }, ); } } diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs index 3c2d0c7b2053..b98b1a2935c0 100644 --- a/compiler/rustc_lint/src/levels.rs +++ b/compiler/rustc_lint/src/levels.rs @@ -786,7 +786,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> { if let ast::LitKind::Str(rationale, _) = name_value.kind { if !self.features.lint_reasons { feature_err( - &self.sess.parse_sess, + &self.sess, sym::lint_reasons, item.span, "lint reasons are experimental", @@ -1074,7 +1074,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> { lint.note(fluent::lint_note); rustc_session::parse::add_feature_diagnostics_for_issue( lint, - &self.sess.parse_sess, + &self.sess, feature, GateIssue::Language, lint_from_cli, diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index f370c4392b38..73db5790c2b3 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -13,7 +13,7 @@ use rustc_macros::{LintDiagnostic, Subdiagnostic}; use rustc_middle::ty::{ inhabitedness::InhabitedPredicate, Clause, PolyExistentialTraitRef, Ty, TyCtxt, }; -use rustc_session::parse::ParseSess; +use rustc_session::Session; use rustc_span::{edition::Edition, sym, symbol::Ident, Span, Symbol}; use crate::{ @@ -235,7 +235,7 @@ pub struct BuiltinUnstableFeatures; // lint_ungated_async_fn_track_caller pub struct BuiltinUngatedAsyncFnTrackCaller<'a> { pub label: Span, - pub parse_sess: &'a ParseSess, + pub session: &'a Session, } impl<'a> DecorateLint<'a, ()> for BuiltinUngatedAsyncFnTrackCaller<'_> { @@ -243,7 +243,7 @@ impl<'a> DecorateLint<'a, ()> for BuiltinUngatedAsyncFnTrackCaller<'_> { diag.span_label(self.label, fluent::lint_label); rustc_session::parse::add_feature_diagnostics( diag, - self.parse_sess, + self.session, sym::async_fn_track_caller, ); } diff --git a/compiler/rustc_metadata/src/native_libs.rs b/compiler/rustc_metadata/src/native_libs.rs index a639a887544e..5e20a03bbc0c 100644 --- a/compiler/rustc_metadata/src/native_libs.rs +++ b/compiler/rustc_metadata/src/native_libs.rs @@ -82,7 +82,7 @@ pub(crate) fn collect(tcx: TyCtxt<'_>, LocalCrate: LocalCrate) -> Vec pub(crate) fn relevant_lib(sess: &Session, lib: &NativeLib) -> bool { match lib.cfg { - Some(ref cfg) => attr::cfg_matches(cfg, &sess.parse_sess, CRATE_NODE_ID, None), + Some(ref cfg) => attr::cfg_matches(cfg, sess, CRATE_NODE_ID, None), None => true, } } @@ -163,7 +163,7 @@ impl<'tcx> Collector<'tcx> { "link-arg" => { if !features.link_arg_attribute { feature_err( - &sess.parse_sess, + sess, sym::link_arg_attribute, span, "link kind `link-arg` is unstable", @@ -206,13 +206,8 @@ impl<'tcx> Collector<'tcx> { continue; }; if !features.link_cfg { - feature_err( - &sess.parse_sess, - sym::link_cfg, - item.span(), - "link cfg is unstable", - ) - .emit(); + feature_err(sess, sym::link_cfg, item.span(), "link cfg is unstable") + .emit(); } cfg = Some(link_cfg.clone()); } @@ -277,7 +272,7 @@ impl<'tcx> Collector<'tcx> { macro report_unstable_modifier($feature: ident) { if !features.$feature { feature_err( - &sess.parse_sess, + sess, sym::$feature, span, format!("linking modifier `{modifier}` is unstable"), @@ -520,11 +515,23 @@ impl<'tcx> Collector<'tcx> { ) -> DllImport { let span = self.tcx.def_span(item); + // this logic is similar to `Target::adjust_abi` (in rustc_target/src/spec/mod.rs) but errors on unsupported inputs let calling_convention = if self.tcx.sess.target.arch == "x86" { match abi { Abi::C { .. } | Abi::Cdecl { .. } => DllCallingConvention::C, - Abi::Stdcall { .. } | Abi::System { .. } => { - DllCallingConvention::Stdcall(self.i686_arg_list_size(item)) + Abi::Stdcall { .. } => DllCallingConvention::Stdcall(self.i686_arg_list_size(item)), + // On Windows, `extern "system"` behaves like msvc's `__stdcall`. + // `__stdcall` only applies on x86 and on non-variadic functions: + // https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170 + Abi::System { .. } => { + let c_variadic = + self.tcx.type_of(item).instantiate_identity().fn_sig(self.tcx).c_variadic(); + + if c_variadic { + DllCallingConvention::C + } else { + DllCallingConvention::Stdcall(self.i686_arg_list_size(item)) + } } Abi::Fastcall { .. } => { DllCallingConvention::Fastcall(self.i686_arg_list_size(item)) diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index 90b479cf2f45..efe7bdfa06db 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -116,8 +116,7 @@ pub fn report_unstable( if is_soft { soft_handler(SOFT_UNSTABLE, span, msg) } else { - let mut err = - feature_err_issue(&sess.parse_sess, feature, span, GateIssue::Library(issue), msg); + let mut err = feature_err_issue(sess, feature, span, GateIssue::Library(issue), msg); if let Some((inner_types, msg, sugg, applicability)) = suggestion { err.span_suggestion(inner_types, msg, sugg, applicability); } diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index af601a0d702e..bebee8df10e8 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -611,9 +611,6 @@ pub enum SelectionError<'tcx> { NotConstEvaluatable(NotConstEvaluatable), /// Exceeded the recursion depth during type projection. Overflow(OverflowError), - /// Signaling that an error has already been emitted, to avoid - /// multiple errors being shown. - ErrorReporting, /// Computing an opaque type's hidden type caused an error (e.g. a cycle error). /// We can thus not know whether the hidden type implements an auto trait, so /// we should not presume anything about it. diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index 734c2b61c07f..64f4af08e12e 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -302,7 +302,6 @@ impl EvaluationResult { pub enum OverflowError { Error(ErrorGuaranteed), Canonical, - ErrorReporting, } impl From for OverflowError { @@ -318,7 +317,6 @@ impl<'tcx> From for SelectionError<'tcx> { match overflow_error { OverflowError::Error(e) => SelectionError::Overflow(OverflowError::Error(e)), OverflowError::Canonical => SelectionError::Overflow(OverflowError::Canonical), - OverflowError::ErrorReporting => SelectionError::ErrorReporting, } } } diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 9e8d7c2ef3ec..ad9296a4cc88 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -42,7 +42,7 @@ use rustc_data_structures::unord::UnordMap; use rustc_errors::{DiagnosticBuilder, ErrorGuaranteed, StashKey}; use rustc_hir as hir; use rustc_hir::def::{CtorKind, CtorOf, DefKind, DocLinkResMap, LifetimeRes, Res}; -use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LocalDefId, LocalDefIdMap}; +use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LocalDefId, LocalDefIdMap, LocalDefIdSet}; use rustc_index::IndexVec; use rustc_macros::HashStable; use rustc_query_system::ich::StableHashingContext; @@ -202,6 +202,10 @@ pub struct ResolverAstLowering { /// Lints that were emitted by the resolver and early lints. pub lint_buffer: Steal, + + /// Information about functions signatures for delegation items expansion + pub has_self: LocalDefIdSet, + pub fn_parameter_counts: LocalDefIdMap, } #[derive(Clone, Copy, Debug)] diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index bcff820da796..3bd8ae025862 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -252,6 +252,8 @@ impl<'a> Parser<'a> { { // IMPL ITEM self.parse_item_impl(attrs, def_())? + } else if self.is_reuse_path_item() { + self.parse_item_delegation()? } else if self.check_keyword(kw::Mod) || self.check_keyword(kw::Unsafe) && self.is_keyword_ahead(1, &[kw::Mod]) { @@ -349,11 +351,18 @@ impl<'a> Parser<'a> { /// When parsing a statement, would the start of a path be an item? pub(super) fn is_path_start_item(&mut self) -> bool { self.is_kw_followed_by_ident(kw::Union) // no: `union::b`, yes: `union U { .. }` + || self.is_reuse_path_item() || self.check_auto_or_unsafe_trait_item() // no: `auto::b`, yes: `auto trait X { .. }` || self.is_async_fn() // no(2015): `async::b`, yes: `async fn` || matches!(self.is_macro_rules_item(), IsMacroRulesItem::Yes{..}) // no: `macro_rules::b`, yes: `macro_rules! mac` } + fn is_reuse_path_item(&mut self) -> bool { + // no: `reuse ::path` for compatibility reasons with macro invocations + self.token.is_keyword(kw::Reuse) + && self.look_ahead(1, |t| t.is_path_start() && t.kind != token::ModSep) + } + /// Are we sure this could not possibly be a macro invocation? fn isnt_macro_invocation(&mut self) -> bool { self.check_ident() && self.look_ahead(1, |t| *t != token::Not && *t != token::ModSep) @@ -655,6 +664,33 @@ impl<'a> Parser<'a> { Ok((Ident::empty(), item_kind)) } + fn parse_item_delegation(&mut self) -> PResult<'a, ItemInfo> { + let span = self.token.span; + self.expect_keyword(kw::Reuse)?; + + let (qself, path) = if self.eat_lt() { + let (qself, path) = self.parse_qpath(PathStyle::Expr)?; + (Some(qself), path) + } else { + (None, self.parse_path(PathStyle::Expr)?) + }; + + let body = if self.check(&token::OpenDelim(Delimiter::Brace)) { + Some(self.parse_block()?) + } else { + self.expect(&token::Semi)?; + None + }; + let span = span.to(self.prev_token.span); + self.sess.gated_spans.gate(sym::fn_delegation, span); + + let ident = path.segments.last().map(|seg| seg.ident).unwrap_or(Ident::empty()); + Ok(( + ident, + ItemKind::Delegation(Box::new(Delegation { id: DUMMY_NODE_ID, qself, path, body })), + )) + } + fn parse_item_list( &mut self, attrs: &mut AttrVec, diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index e4bbc9eeaf7d..20ed2573e3a7 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -1170,7 +1170,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { sym::rust_logo => { if !self.tcx.features().rustdoc_internals { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::rustdoc_internals, meta.span(), "the `#[doc(rust_logo)]` attribute is used for Rust branding", @@ -1815,7 +1815,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { (target, self.tcx.features().fn_align) { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::fn_align, hint.span(), "`repr(align)` attributes on functions are unstable", diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs index 3e3f2771f5fb..3676eb92a3f7 100644 --- a/compiler/rustc_passes/src/check_const.rs +++ b/compiler/rustc_passes/src/check_const.rs @@ -147,7 +147,7 @@ impl<'tcx> CheckConstVisitor<'tcx> { [missing_primary, ref missing_secondary @ ..] => { let msg = format!("{} is not allowed in a `{}`", expr.name(), const_kind.keyword_name()); - let mut err = feature_err(&tcx.sess.parse_sess, *missing_primary, span, msg); + let mut err = feature_err(&tcx.sess, *missing_primary, span, msg); // If multiple feature gates would be required to enable this expression, include // them as help messages. Don't emit a separate error for each missing feature gate. diff --git a/compiler/rustc_passes/src/debugger_visualizer.rs b/compiler/rustc_passes/src/debugger_visualizer.rs index 42e929bde2ca..4bfe6be54937 100644 --- a/compiler/rustc_passes/src/debugger_visualizer.rs +++ b/compiler/rustc_passes/src/debugger_visualizer.rs @@ -45,14 +45,13 @@ impl DebuggerVisualizerCollector<'_> { } }; - let file = - match resolve_path(&self.sess.parse_sess, visualizer_path.as_str(), attr.span) { - Ok(file) => file, - Err(err) => { - err.emit(); - return; - } - }; + let file = match resolve_path(&self.sess, visualizer_path.as_str(), attr.span) { + Ok(file) => file, + Err(err) => { + err.emit(); + return; + } + }; match std::fs::read(&file) { Ok(contents) => { diff --git a/compiler/rustc_passes/src/entry.rs b/compiler/rustc_passes/src/entry.rs index ed26b45a936b..a9d0e0d2dd3e 100644 --- a/compiler/rustc_passes/src/entry.rs +++ b/compiler/rustc_passes/src/entry.rs @@ -135,7 +135,7 @@ fn configure_main(tcx: TyCtxt<'_>, visitor: &EntryContext<'_>) -> Option<(DefId, if main_def.is_import && !tcx.features().imported_main { let span = main_def.span; feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::imported_main, span, "using an imported function as entry point `main` is experimental", diff --git a/compiler/rustc_passes/src/hir_stats.rs b/compiler/rustc_passes/src/hir_stats.rs index c2392620cb28..ff29fc5929c7 100644 --- a/compiler/rustc_passes/src/hir_stats.rs +++ b/compiler/rustc_passes/src/hir_stats.rs @@ -341,6 +341,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> { record_variants!( (self, t, t.kind, Id::Node(t.hir_id), hir, Ty, TyKind), [ + InferDelegation, Slice, Array, Ptr, @@ -521,7 +522,8 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> { TraitAlias, Impl, MacCall, - MacroDef + MacroDef, + Delegation ] ); ast_visit::walk_item(self, i) @@ -645,7 +647,7 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> { fn visit_assoc_item(&mut self, i: &'v ast::AssocItem, ctxt: ast_visit::AssocCtxt) { record_variants!( (self, i, i.kind, Id::None, ast, AssocItem, AssocItemKind), - [Const, Fn, Type, MacCall] + [Const, Fn, Type, MacCall, Delegation] ); ast_visit::walk_assoc_item(self, i, ctxt); } diff --git a/compiler/rustc_passes/src/lang_items.rs b/compiler/rustc_passes/src/lang_items.rs index 647f4d0e0841..6aeaa8945fb5 100644 --- a/compiler/rustc_passes/src/lang_items.rs +++ b/compiler/rustc_passes/src/lang_items.rs @@ -271,7 +271,7 @@ impl<'ast, 'tcx> visit::Visitor<'ast> for LanguageItemCollector<'ast, 'tcx> { ast::ItemKind::Use(_) => Target::Use, ast::ItemKind::Static(_) => Target::Static, ast::ItemKind::Const(_) => Target::Const, - ast::ItemKind::Fn(_) => Target::Fn, + ast::ItemKind::Fn(_) | ast::ItemKind::Delegation(..) => Target::Fn, ast::ItemKind::Mod(_, _) => Target::Mod, ast::ItemKind::ForeignMod(_) => Target::ForeignFn, ast::ItemKind::GlobalAsm(_) => Target::GlobalAsm, @@ -315,24 +315,29 @@ impl<'ast, 'tcx> visit::Visitor<'ast> for LanguageItemCollector<'ast, 'tcx> { fn visit_assoc_item(&mut self, i: &'ast ast::AssocItem, ctxt: visit::AssocCtxt) { let (target, generics) = match &i.kind { - ast::AssocItemKind::Fn(fun) => ( - match &self.parent_item.unwrap().kind { - ast::ItemKind::Impl(i) => { - if i.of_trait.is_some() { - Target::Method(MethodKind::Trait { body: fun.body.is_some() }) - } else { - Target::Method(MethodKind::Inherent) + ast::AssocItemKind::Fn(..) | ast::AssocItemKind::Delegation(..) => { + let (body, generics) = if let ast::AssocItemKind::Fn(fun) = &i.kind { + (fun.body.is_some(), Some(&fun.generics)) + } else { + (true, None) + }; + ( + match &self.parent_item.unwrap().kind { + ast::ItemKind::Impl(i) => { + if i.of_trait.is_some() { + Target::Method(MethodKind::Trait { body }) + } else { + Target::Method(MethodKind::Inherent) + } } - } - ast::ItemKind::Trait(_) => { - Target::Method(MethodKind::Trait { body: fun.body.is_some() }) - } - _ => unreachable!(), - }, - &fun.generics, - ), - ast::AssocItemKind::Const(ct) => (Target::AssocConst, &ct.generics), - ast::AssocItemKind::Type(ty) => (Target::AssocTy, &ty.generics), + ast::ItemKind::Trait(_) => Target::Method(MethodKind::Trait { body }), + _ => unreachable!(), + }, + generics, + ) + } + ast::AssocItemKind::Const(ct) => (Target::AssocConst, Some(&ct.generics)), + ast::AssocItemKind::Type(ty) => (Target::AssocTy, Some(&ty.generics)), ast::AssocItemKind::MacCall(_) => unreachable!("macros should have been expanded"), }; @@ -341,7 +346,7 @@ impl<'ast, 'tcx> visit::Visitor<'ast> for LanguageItemCollector<'ast, 'tcx> { self.resolver.node_id_to_def_id[&i.id], &i.attrs, i.span, - Some(generics), + generics, ); visit::walk_assoc_item(self, i, ctxt); diff --git a/compiler/rustc_resolve/src/build_reduced_graph.rs b/compiler/rustc_resolve/src/build_reduced_graph.rs index 9ccfde5e3c62..a4e2f9e3ff8c 100644 --- a/compiler/rustc_resolve/src/build_reduced_graph.rs +++ b/compiler/rustc_resolve/src/build_reduced_graph.rs @@ -16,7 +16,7 @@ use crate::{Resolver, ResolverArenas, Segment, ToNameBinding, VisResolutionError use rustc_ast::visit::{self, AssocCtxt, Visitor}; use rustc_ast::{self as ast, AssocItem, AssocItemKind, MetaItemKind, StmtKind}; -use rustc_ast::{Block, Fn, ForeignItem, ForeignItemKind, Impl, Item, ItemKind, NodeId}; +use rustc_ast::{Block, ForeignItem, ForeignItemKind, Impl, Item, ItemKind, NodeId}; use rustc_attr as attr; use rustc_data_structures::sync::Lrc; use rustc_errors::{struct_span_code_err, Applicability}; @@ -686,10 +686,7 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> { } // These items live in the value namespace. - ItemKind::Static(..) => { - self.r.define(parent, ident, ValueNS, (res, vis, sp, expansion)); - } - ItemKind::Const(..) => { + ItemKind::Const(..) | ItemKind::Delegation(..) | ItemKind::Static(..) => { self.r.define(parent, ident, ValueNS, (res, vis, sp, expansion)); } ItemKind::Fn(..) => { @@ -701,11 +698,11 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> { } // These items live in the type namespace. - ItemKind::TyAlias(..) => { + ItemKind::TyAlias(..) | ItemKind::TraitAlias(..) => { self.r.define(parent, ident, TypeNS, (res, vis, sp, expansion)); } - ItemKind::Enum(_, _) => { + ItemKind::Enum(_, _) | ItemKind::Trait(..) => { let module = self.r.new_module( Some(parent), ModuleKind::Def(def_kind, def_id, ident.name), @@ -717,10 +714,6 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> { self.parent_scope.module = module; } - ItemKind::TraitAlias(..) => { - self.r.define(parent, ident, TypeNS, (res, vis, sp, expansion)); - } - // These items live in both the type and value namespaces. ItemKind::Struct(ref vdata, _) => { // Define a name in the type namespace. @@ -778,19 +771,6 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> { self.insert_field_visibilities_local(def_id, vdata); } - ItemKind::Trait(..) => { - // Add all the items within to a new module. - let module = self.r.new_module( - Some(parent), - ModuleKind::Def(def_kind, def_id, ident.name), - expansion.to_expn_id(), - item.span, - parent.no_implicit_prelude, - ); - self.r.define(parent, ident, TypeNS, (module, vis, sp, expansion)); - self.parent_scope.module = module; - } - // These items do not add names to modules. ItemKind::Impl(box Impl { of_trait: Some(..), .. }) => { self.r.trait_impl_items.insert(local_def_id); @@ -1358,13 +1338,9 @@ impl<'a, 'b, 'tcx> Visitor<'b> for BuildReducedGraphVisitor<'a, 'b, 'tcx> { if ctxt == AssocCtxt::Trait { let ns = match item.kind { - AssocItemKind::Const(..) => ValueNS, - AssocItemKind::Fn(box Fn { ref sig, .. }) => { - if sig.decl.has_self() { - self.r.has_self.insert(local_def_id); - } - ValueNS - } + AssocItemKind::Const(..) + | AssocItemKind::Delegation(..) + | AssocItemKind::Fn(..) => ValueNS, AssocItemKind::Type(..) => TypeNS, AssocItemKind::MacCall(_) => bug!(), // handled above }; diff --git a/compiler/rustc_resolve/src/def_collector.rs b/compiler/rustc_resolve/src/def_collector.rs index 02553d500715..b77102c085c5 100644 --- a/compiler/rustc_resolve/src/def_collector.rs +++ b/compiler/rustc_resolve/src/def_collector.rs @@ -111,7 +111,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> { ItemKind::TyAlias(..) => DefKind::TyAlias, ItemKind::Static(s) => DefKind::Static(s.mutability), ItemKind::Const(..) => DefKind::Const, - ItemKind::Fn(..) => DefKind::Fn, + ItemKind::Fn(..) | ItemKind::Delegation(..) => DefKind::Fn, ItemKind::MacroDef(..) => { let macro_data = self.resolver.compile_macro(i, self.resolver.tcx.sess.edition()); let macro_kind = macro_data.ext.macro_kind(); @@ -259,7 +259,7 @@ impl<'a, 'b, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'b, 'tcx> { fn visit_assoc_item(&mut self, i: &'a AssocItem, ctxt: visit::AssocCtxt) { let def_kind = match &i.kind { - AssocItemKind::Fn(..) => DefKind::AssocFn, + AssocItemKind::Fn(..) | AssocItemKind::Delegation(..) => DefKind::AssocFn, AssocItemKind::Const(..) => DefKind::AssocConst, AssocItemKind::Type(..) => DefKind::AssocTy, AssocItemKind::MacCall(..) => return self.visit_macro_invoc(i.id), diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 0d744238eeb4..b57006613850 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -786,7 +786,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { ResolutionError::SelfImportOnlyInImportListWithNonEmptyPrefix => { self.dcx().create_err(errs::SelfImportOnlyInImportListWithNonEmptyPrefix { span }) } - ResolutionError::FailedToResolve { last_segment, label, suggestion, module } => { + ResolutionError::FailedToResolve { segment, label, suggestion, module } => { let mut err = struct_span_code_err!(self.dcx(), span, E0433, "failed to resolve: {}", &label); err.span_label(span, label); @@ -801,9 +801,9 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { if let Some(ModuleOrUniformRoot::Module(module)) = module && let Some(module) = module.opt_def_id() - && let Some(last_segment) = last_segment + && let Some(segment) = segment { - self.find_cfg_stripped(&mut err, &last_segment, module); + self.find_cfg_stripped(&mut err, &segment, module); } err @@ -981,12 +981,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { } VisResolutionError::FailedToResolve(span, label, suggestion) => self.into_struct_error( span, - ResolutionError::FailedToResolve { - last_segment: None, - label, - suggestion, - module: None, - }, + ResolutionError::FailedToResolve { segment: None, label, suggestion, module: None }, ), VisResolutionError::ExpectedFound(span, path_str, res) => { self.dcx().create_err(errs::ExpectedFound { span, res, path_str }) @@ -2450,7 +2445,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { pub(crate) fn find_cfg_stripped( &mut self, err: &mut Diagnostic, - last_segment: &Symbol, + segment: &Symbol, module: DefId, ) { let local_items; @@ -2469,7 +2464,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { }; for &StrippedCfgItem { parent_module, name, ref cfg } in symbols { - if parent_module != module || name.name != *last_segment { + if parent_module != module || name.name != *segment { continue; } diff --git a/compiler/rustc_resolve/src/effective_visibilities.rs b/compiler/rustc_resolve/src/effective_visibilities.rs index 50352169221d..3443bbe6e115 100644 --- a/compiler/rustc_resolve/src/effective_visibilities.rs +++ b/compiler/rustc_resolve/src/effective_visibilities.rs @@ -277,7 +277,8 @@ impl<'r, 'ast, 'tcx> Visitor<'ast> for EffectiveVisibilitiesVisitor<'ast, 'r, 't | ast::ItemKind::TraitAlias(..) | ast::ItemKind::MacroDef(..) | ast::ItemKind::ForeignMod(..) - | ast::ItemKind::Fn(..) => return, + | ast::ItemKind::Fn(..) + | ast::ItemKind::Delegation(..) => return, } } } diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index 3a31addb1093..7fb9db16e9c7 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -1381,13 +1381,9 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { continue; } } - return PathResult::failed( - ident.span, - false, - finalize.is_some(), - module, - || ("there are too many leading `super` keywords".to_string(), None), - ); + return PathResult::failed(ident, false, finalize.is_some(), module, || { + ("there are too many leading `super` keywords".to_string(), None) + }); } if segment_idx == 0 { if name == kw::SelfLower { @@ -1419,7 +1415,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { // Report special messages for path segment keywords in wrong positions. if ident.is_path_segment_keyword() && segment_idx != 0 { - return PathResult::failed(ident.span, false, finalize.is_some(), module, || { + return PathResult::failed(ident, false, finalize.is_some(), module, || { let name_str = if name == kw::PathRoot { "crate root".to_string() } else { @@ -1515,7 +1511,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { )); } else { return PathResult::failed( - ident.span, + ident, is_last, finalize.is_some(), module, @@ -1541,24 +1537,18 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { } } - return PathResult::failed( - ident.span, - is_last, - finalize.is_some(), - module, - || { - self.report_path_resolution_error( - path, - opt_ns, - parent_scope, - ribs, - ignore_binding, - module, - segment_idx, - ident, - ) - }, - ); + return PathResult::failed(ident, is_last, finalize.is_some(), module, || { + self.report_path_resolution_error( + path, + opt_ns, + parent_scope, + ribs, + ignore_binding, + module, + segment_idx, + ident, + ) + }); } } } diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs index 2ebf4c205626..f846dbec2c69 100644 --- a/compiler/rustc_resolve/src/imports.rs +++ b/compiler/rustc_resolve/src/imports.rs @@ -886,6 +886,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { PathResult::Failed { is_error_from_last_segment: false, span, + segment_name, label, suggestion, module, @@ -895,7 +896,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { self.report_error( span, ResolutionError::FailedToResolve { - last_segment: None, + segment: Some(segment_name), label, suggestion, module, diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 4a3c8dfe3d72..82f502279112 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -394,13 +394,18 @@ pub(crate) enum PathSource<'a> { TupleStruct(Span, &'a [Span]), // `m::A::B` in `::B::C`. TraitItem(Namespace), + // Paths in delegation item + Delegation, } impl<'a> PathSource<'a> { fn namespace(self) -> Namespace { match self { PathSource::Type | PathSource::Trait(_) | PathSource::Struct => TypeNS, - PathSource::Expr(..) | PathSource::Pat | PathSource::TupleStruct(..) => ValueNS, + PathSource::Expr(..) + | PathSource::Pat + | PathSource::TupleStruct(..) + | PathSource::Delegation => ValueNS, PathSource::TraitItem(ns) => ns, } } @@ -412,7 +417,7 @@ impl<'a> PathSource<'a> { | PathSource::Pat | PathSource::Struct | PathSource::TupleStruct(..) => true, - PathSource::Trait(_) | PathSource::TraitItem(..) => false, + PathSource::Trait(_) | PathSource::TraitItem(..) | PathSource::Delegation => false, } } @@ -454,6 +459,7 @@ impl<'a> PathSource<'a> { }, _ => "value", }, + PathSource::Delegation => "function", } } @@ -521,6 +527,7 @@ impl<'a> PathSource<'a> { Res::Def(DefKind::AssocTy, _) if ns == TypeNS => true, _ => false, }, + PathSource::Delegation => matches!(res, Res::Def(DefKind::Fn | DefKind::AssocFn, _)), } } @@ -533,8 +540,8 @@ impl<'a> PathSource<'a> { (PathSource::Type, false) => error_code!(E0412), (PathSource::Struct, true) => error_code!(E0574), (PathSource::Struct, false) => error_code!(E0422), - (PathSource::Expr(..), true) => error_code!(E0423), - (PathSource::Expr(..), false) => error_code!(E0425), + (PathSource::Expr(..), true) | (PathSource::Delegation, true) => error_code!(E0423), + (PathSource::Expr(..), false) | (PathSource::Delegation, false) => error_code!(E0425), (PathSource::Pat | PathSource::TupleStruct(..), true) => error_code!(E0532), (PathSource::Pat | PathSource::TupleStruct(..), false) => error_code!(E0531), (PathSource::TraitItem(..), true) => error_code!(E0575), @@ -1805,7 +1812,8 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { PathSource::Expr(..) | PathSource::Pat | PathSource::Struct - | PathSource::TupleStruct(..) => true, + | PathSource::TupleStruct(..) + | PathSource::Delegation => true, }; if inferred { // Do not create a parameter for patterns and expressions: type checking can infer @@ -2514,6 +2522,10 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { visit::walk_item(self, item); } + ItemKind::Delegation(ref delegation) => { + self.resolve_delegation(delegation); + } + ItemKind::ExternCrate(..) => {} ItemKind::MacCall(_) => panic!("unexpanded macro in resolve!"), @@ -2790,6 +2802,9 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { AssocItemKind::Fn(box Fn { generics, .. }) => { walk_assoc_item(self, generics, LifetimeBinderKind::Function, item); } + AssocItemKind::Delegation(delegation) => { + self.resolve_delegation(delegation); + } AssocItemKind::Type(box TyAlias { generics, .. }) => self .with_lifetime_rib(LifetimeRibKind::AnonymousReportError, |this| { walk_assoc_item(this, generics, LifetimeBinderKind::Item, item) @@ -3036,6 +3051,19 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { }, ); } + AssocItemKind::Delegation(box delegation) => { + debug!("resolve_implementation AssocItemKind::Delegation"); + self.check_trait_item( + item.id, + item.ident, + &item.kind, + ValueNS, + item.span, + seen_trait_items, + |i, s, c| MethodNotMemberOfTrait(i, s, c), + ); + self.resolve_delegation(delegation); + } AssocItemKind::MacCall(_) => { panic!("unexpanded macro in resolve!") } @@ -3123,7 +3151,8 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { match (def_kind, kind) { (DefKind::AssocTy, AssocItemKind::Type(..)) | (DefKind::AssocFn, AssocItemKind::Fn(..)) - | (DefKind::AssocConst, AssocItemKind::Const(..)) => { + | (DefKind::AssocConst, AssocItemKind::Const(..)) + | (DefKind::AssocFn, AssocItemKind::Delegation(..)) => { self.r.record_partial_res(id, PartialRes::new(res)); return; } @@ -3136,6 +3165,7 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { AssocItemKind::Const(..) => (rustc_errors::error_code!(E0323), "const"), AssocItemKind::Fn(..) => (rustc_errors::error_code!(E0324), "method"), AssocItemKind::Type(..) => (rustc_errors::error_code!(E0325), "type"), + AssocItemKind::Delegation(..) => (rustc_errors::error_code!(E0324), "method"), AssocItemKind::MacCall(..) => span_bug!(span, "unexpanded macro"), }; let trait_path = path_names_to_string(path); @@ -3159,6 +3189,32 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { }) } + fn resolve_delegation(&mut self, delegation: &'ast Delegation) { + self.smart_resolve_path( + delegation.id, + &delegation.qself, + &delegation.path, + PathSource::Delegation, + ); + if let Some(qself) = &delegation.qself { + self.visit_ty(&qself.ty); + } + self.visit_path(&delegation.path, delegation.id); + if let Some(body) = &delegation.body { + // `PatBoundCtx` is not necessary in this context + let mut bindings = smallvec![(PatBoundCtx::Product, Default::default())]; + + let span = delegation.path.segments.last().unwrap().ident.span; + self.fresh_binding( + Ident::new(kw::SelfLower, span), + delegation.id, + PatternSource::FnParam, + &mut bindings, + ); + self.visit_block(body); + } + } + fn resolve_params(&mut self, params: &'ast [Param]) { let mut bindings = smallvec![(PatBoundCtx::Product, Default::default())]; self.with_lifetime_rib(LifetimeRibKind::Elided(LifetimeRes::Infer), |this| { @@ -3998,11 +4054,12 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { label, suggestion, module, + segment_name, } => { return Err(respan( span, ResolutionError::FailedToResolve { - last_segment: None, + segment: Some(segment_name), label, suggestion, module, @@ -4551,13 +4608,24 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> { } } -struct LifetimeCountVisitor<'a, 'b, 'tcx> { +/// Walks the whole crate in DFS order, visiting each item, counting the declared number of +/// lifetime generic parameters and function parameters. +struct ItemInfoCollector<'a, 'b, 'tcx> { r: &'b mut Resolver<'a, 'tcx>, } -/// Walks the whole crate in DFS order, visiting each item, counting the declared number of -/// lifetime generic parameters. -impl<'ast> Visitor<'ast> for LifetimeCountVisitor<'_, '_, '_> { +impl ItemInfoCollector<'_, '_, '_> { + fn collect_fn_info(&mut self, sig: &FnSig, id: NodeId) { + let def_id = self.r.local_def_id(id); + self.r.fn_parameter_counts.insert(def_id, sig.decl.inputs.len()); + + if sig.decl.has_self() { + self.r.has_self.insert(def_id); + } + } +} + +impl<'ast> Visitor<'ast> for ItemInfoCollector<'_, '_, '_> { fn visit_item(&mut self, item: &'ast Item) { match &item.kind { ItemKind::TyAlias(box TyAlias { ref generics, .. }) @@ -4569,6 +4637,10 @@ impl<'ast> Visitor<'ast> for LifetimeCountVisitor<'_, '_, '_> { | ItemKind::Impl(box Impl { ref generics, .. }) | ItemKind::Trait(box Trait { ref generics, .. }) | ItemKind::TraitAlias(ref generics, _) => { + if let ItemKind::Fn(box Fn { ref sig, .. }) = &item.kind { + self.collect_fn_info(sig, item.id); + } + let def_id = self.r.local_def_id(item.id); let count = generics .params @@ -4586,14 +4658,27 @@ impl<'ast> Visitor<'ast> for LifetimeCountVisitor<'_, '_, '_> { | ItemKind::MacroDef(..) | ItemKind::GlobalAsm(..) | ItemKind::MacCall(..) => {} + ItemKind::Delegation(..) => { + // Delegated functions have lifetimes, their count is not necessarily zero. + // But skipping the delegation items here doesn't mean that the count will be considered zero, + // it means there will be a panic when retrieving the count, + // but for delegation items we are never actually retrieving that count in practice. + } } visit::walk_item(self, item) } + + fn visit_assoc_item(&mut self, item: &'ast AssocItem, ctxt: AssocCtxt) { + if let AssocItemKind::Fn(box Fn { ref sig, .. }) = &item.kind { + self.collect_fn_info(sig, item.id); + } + visit::walk_assoc_item(self, item, ctxt); + } } impl<'a, 'tcx> Resolver<'a, 'tcx> { pub(crate) fn late_resolve_crate(&mut self, krate: &Crate) { - visit::walk_crate(&mut LifetimeCountVisitor { r: self }, krate); + visit::walk_crate(&mut ItemInfoCollector { r: self }, krate); let mut late_resolution_visitor = LateResolutionVisitor::new(self); late_resolution_visitor.resolve_doc_links(&krate.attrs, MaybeExported::Ok(CRATE_NODE_ID)); visit::walk_crate(&mut late_resolution_visitor, krate); diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 2f476ae6cbcc..58ff4d8c7934 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -656,7 +656,10 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { let typo_sugg = self .lookup_typo_candidate(path, following_seg, source.namespace(), is_expected) .to_opt_suggestion(); - if path.len() == 1 && self.self_type_is_available() { + if path.len() == 1 + && !matches!(source, PathSource::Delegation) + && self.self_type_is_available() + { if let Some(candidate) = self.lookup_assoc_candidate(ident, ns, is_expected, source.is_call()) { @@ -1899,6 +1902,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { (AssocItemKind::Const(..), Res::Def(DefKind::AssocConst, _)) => true, (AssocItemKind::Fn(_), Res::Def(DefKind::AssocFn, _)) => true, (AssocItemKind::Type(..), Res::Def(DefKind::AssocTy, _)) => true, + (AssocItemKind::Delegation(_), Res::Def(DefKind::AssocFn, _)) => true, _ => false, }) .map(|(key, _)| key.ident.name) @@ -1960,6 +1964,12 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> { } ast::AssocItemKind::Fn(..) => AssocSuggestion::AssocFn { called }, ast::AssocItemKind::Type(..) => AssocSuggestion::AssocType, + ast::AssocItemKind::Delegation(..) + if self.r.has_self.contains(&self.r.local_def_id(assoc_item.id)) => + { + AssocSuggestion::MethodWithSelf { called } + } + ast::AssocItemKind::Delegation(..) => AssocSuggestion::AssocFn { called }, ast::AssocItemKind::MacCall(_) => continue, }); } diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index a14f3d494fb4..90aa7d79bf04 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -213,7 +213,7 @@ enum ResolutionError<'a> { SelfImportOnlyInImportListWithNonEmptyPrefix, /// Error E0433: failed to resolve. FailedToResolve { - last_segment: Option, + segment: Option, label: String, suggestion: Option, module: Option>, @@ -396,12 +396,14 @@ enum PathResult<'a> { suggestion: Option, is_error_from_last_segment: bool, module: Option>, + /// The segment name of target + segment_name: Symbol, }, } impl<'a> PathResult<'a> { fn failed( - span: Span, + ident: Ident, is_error_from_last_segment: bool, finalize: bool, module: Option>, @@ -409,7 +411,14 @@ impl<'a> PathResult<'a> { ) -> PathResult<'a> { let (label, suggestion) = if finalize { label_and_suggestion() } else { (String::new(), None) }; - PathResult::Failed { span, label, suggestion, is_error_from_last_segment, module } + PathResult::Failed { + span: ident.span, + segment_name: ident.name, + label, + suggestion, + is_error_from_last_segment, + module, + } } } @@ -1101,6 +1110,8 @@ pub struct Resolver<'a, 'tcx> { legacy_const_generic_args: FxHashMap>>, /// Amount of lifetime parameters for each item in the crate. item_generics_num_lifetimes: FxHashMap, + /// Amount of parameters for each function in the crate. + fn_parameter_counts: LocalDefIdMap, main_def: Option, trait_impls: FxIndexMap>, @@ -1439,6 +1450,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { doc_link_resolutions: Default::default(), doc_link_traits_in_scope: Default::default(), all_macro_rules: Default::default(), + fn_parameter_counts: Default::default(), }; let root_parent_scope = ParentScope::module(graph_root, &resolver); @@ -1542,6 +1554,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { trait_map: self.trait_map, lifetime_elision_allowed: self.lifetime_elision_allowed, lint_buffer: Steal::new(self.lint_buffer), + has_self: self.has_self, + fn_parameter_counts: self.fn_parameter_counts, }; ResolverOutputs { global_ctxt, ast_lowering } } diff --git a/compiler/rustc_resolve/src/macros.rs b/compiler/rustc_resolve/src/macros.rs index 66ecaeb4449f..1c085ddf57bf 100644 --- a/compiler/rustc_resolve/src/macros.rs +++ b/compiler/rustc_resolve/src/macros.rs @@ -594,13 +594,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { if soft_custom_inner_attributes_gate { self.tcx.sess.parse_sess.buffer_lint(SOFT_UNSTABLE, path.span, node_id, msg); } else { - feature_err( - &self.tcx.sess.parse_sess, - sym::custom_inner_attributes, - path.span, - msg, - ) - .emit(); + feature_err(&self.tcx.sess, sym::custom_inner_attributes, path.span, msg).emit(); } } @@ -779,7 +773,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { self.report_error( span, ResolutionError::FailedToResolve { - last_segment: path.last().map(|segment| segment.ident.name), + segment: path.last().map(|segment| segment.ident.name), label, suggestion, module, diff --git a/compiler/rustc_session/messages.ftl b/compiler/rustc_session/messages.ftl index f2e646c70f57..53bdef6dfa0f 100644 --- a/compiler/rustc_session/messages.ftl +++ b/compiler/rustc_session/messages.ftl @@ -24,6 +24,9 @@ session_feature_diagnostic_for_issue = session_feature_diagnostic_help = add `#![feature({$feature})]` to the crate attributes to enable +session_feature_suggest_upgrade_compiler = + this compiler was built on {$date}; consider upgrading it if it is out of date + session_file_is_not_writeable = output file {$file} is not writeable -- check its permissions session_file_write_fail = failed to write `{$path}` due to error `{$err}` diff --git a/compiler/rustc_session/src/config/sigpipe.rs b/compiler/rustc_session/src/config/sigpipe.rs index 53692ad7cc92..1fadc75cfd0d 100644 --- a/compiler/rustc_session/src/config/sigpipe.rs +++ b/compiler/rustc_session/src/config/sigpipe.rs @@ -1,7 +1,7 @@ -//! NOTE: Keep these constants in sync with `library/std/src/sys/unix/mod.rs`! +//! NOTE: Keep these constants in sync with `library/std/src/sys/pal/unix/mod.rs`! /// The default value if `#[unix_sigpipe]` is not specified. This resolves -/// to `SIG_IGN` in `library/std/src/sys/unix/mod.rs`. +/// to `SIG_IGN` in `library/std/src/sys/pal/unix/mod.rs`. /// /// Note that `SIG_IGN` has been the Rust default since 2014. See /// . diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs index b672e760feb3..21a206798af1 100644 --- a/compiler/rustc_session/src/errors.rs +++ b/compiler/rustc_session/src/errors.rs @@ -1,6 +1,5 @@ use std::num::NonZeroU32; -use crate::parse::ParseSess; use rustc_ast::token; use rustc_ast::util::literal::LitError; use rustc_errors::{ @@ -10,6 +9,8 @@ use rustc_macros::Diagnostic; use rustc_span::{BytePos, Span, Symbol}; use rustc_target::spec::{SplitDebuginfo, StackProtector, TargetTriple}; +use crate::parse::ParseSess; + pub struct FeatureGateError { pub span: MultiSpan, pub explain: DiagnosticMessage, @@ -30,6 +31,24 @@ pub struct FeatureDiagnosticForIssue { pub n: NonZeroU32, } +#[derive(Subdiagnostic)] +#[note(session_feature_suggest_upgrade_compiler)] +pub struct SuggestUpgradeCompiler { + date: &'static str, +} + +impl SuggestUpgradeCompiler { + pub fn ui_testing() -> Self { + Self { date: "YYYY-MM-DD" } + } + + pub fn new() -> Option { + let date = option_env!("CFG_VER_DATE")?; + + Some(Self { date }) + } +} + #[derive(Subdiagnostic)] #[help(session_feature_diagnostic_help)] pub struct FeatureDiagnosticHelp { diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index 598178c3c2a5..c629c9884c8e 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -4,10 +4,12 @@ use crate::config::{Cfg, CheckCfg}; use crate::errors::{ CliFeatureDiagnosticHelp, FeatureDiagnosticForIssue, FeatureDiagnosticHelp, FeatureGateError, + SuggestUpgradeCompiler, }; use crate::lint::{ builtin::UNSTABLE_SYNTAX_PRE_EXPANSION, BufferedEarlyLint, BuiltinLintDiagnostics, Lint, LintId, }; +use crate::Session; use rustc_ast::node_id::NodeId; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_data_structures::sync::{AppendOnlyVec, Lock, Lrc}; @@ -75,11 +77,12 @@ impl SymbolGallery { } } +// todo: this function now accepts `Session` instead of `ParseSess` and should be relocated /// Construct a diagnostic for a language feature error due to the given `span`. /// The `feature`'s `Symbol` is the one you used in `unstable.rs` and `rustc_span::symbols`. #[track_caller] pub fn feature_err( - sess: &ParseSess, + sess: &Session, feature: Symbol, span: impl Into, explain: impl Into, @@ -93,7 +96,7 @@ pub fn feature_err( /// Almost always, you want to use this for a language feature. If so, prefer `feature_err`. #[track_caller] pub fn feature_err_issue( - sess: &ParseSess, + sess: &Session, feature: Symbol, span: impl Into, issue: GateIssue, @@ -103,12 +106,14 @@ pub fn feature_err_issue( // Cancel an earlier warning for this same error, if it exists. if let Some(span) = span.primary_span() { - if let Some(err) = sess.dcx.steal_diagnostic(span, StashKey::EarlySyntaxWarning) { + if let Some(err) = sess.parse_sess.dcx.steal_diagnostic(span, StashKey::EarlySyntaxWarning) + { err.cancel() } } - let mut err = sess.dcx.create_err(FeatureGateError { span, explain: explain.into() }); + let mut err = + sess.parse_sess.dcx.create_err(FeatureGateError { span, explain: explain.into() }); add_feature_diagnostics_for_issue(&mut err, sess, feature, issue, false); err } @@ -117,7 +122,7 @@ pub fn feature_err_issue( /// /// This diagnostic is only a warning and *does not cause compilation to fail*. #[track_caller] -pub fn feature_warn(sess: &ParseSess, feature: Symbol, span: Span, explain: &'static str) { +pub fn feature_warn(sess: &Session, feature: Symbol, span: Span, explain: &'static str) { feature_warn_issue(sess, feature, span, GateIssue::Language, explain); } @@ -131,13 +136,13 @@ pub fn feature_warn(sess: &ParseSess, feature: Symbol, span: Span, explain: &'st #[allow(rustc::untranslatable_diagnostic)] #[track_caller] pub fn feature_warn_issue( - sess: &ParseSess, + sess: &Session, feature: Symbol, span: Span, issue: GateIssue, explain: &'static str, ) { - let mut err = sess.dcx.struct_span_warn(span, explain); + let mut err = sess.parse_sess.dcx.struct_span_warn(span, explain); add_feature_diagnostics_for_issue(&mut err, sess, feature, issue, false); // Decorate this as a future-incompatibility lint as in rustc_middle::lint::struct_lint_level @@ -152,7 +157,7 @@ pub fn feature_warn_issue( } /// Adds the diagnostics for a feature to an existing error. -pub fn add_feature_diagnostics(err: &mut Diagnostic, sess: &ParseSess, feature: Symbol) { +pub fn add_feature_diagnostics(err: &mut Diagnostic, sess: &Session, feature: Symbol) { add_feature_diagnostics_for_issue(err, sess, feature, GateIssue::Language, false); } @@ -163,7 +168,7 @@ pub fn add_feature_diagnostics(err: &mut Diagnostic, sess: &ParseSess, feature: /// `add_feature_diagnostics`. pub fn add_feature_diagnostics_for_issue( err: &mut Diagnostic, - sess: &ParseSess, + sess: &Session, feature: Symbol, issue: GateIssue, feature_from_cli: bool, @@ -173,12 +178,18 @@ pub fn add_feature_diagnostics_for_issue( } // #23973: do not suggest `#![feature(...)]` if we are in beta/stable - if sess.unstable_features.is_nightly_build() { + if sess.parse_sess.unstable_features.is_nightly_build() { if feature_from_cli { err.subdiagnostic(CliFeatureDiagnosticHelp { feature }); } else { err.subdiagnostic(FeatureDiagnosticHelp { feature }); } + + if sess.opts.unstable_opts.ui_testing { + err.subdiagnostic(SuggestUpgradeCompiler::ui_testing()); + } else if let Some(suggestion) = SuggestUpgradeCompiler::new() { + err.subdiagnostic(suggestion); + } } } diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index 210dc9e01452..1c3d5a3cb881 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -318,7 +318,7 @@ impl Session { if err.code.is_none() { err.code(error_code!(E0658)); } - add_feature_diagnostics(&mut err, &self.parse_sess, feature); + add_feature_diagnostics(&mut err, self, feature); err } diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 8ed1255c010f..72b62a795fc5 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -102,6 +102,7 @@ symbols! { Gen: "gen", MacroRules: "macro_rules", Raw: "raw", + Reuse: "reuse", Union: "union", Yeet: "yeet", } diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs index fafc10e71635..1c83039047e0 100644 --- a/compiler/rustc_target/src/abi/call/mod.rs +++ b/compiler/rustc_target/src/abi/call/mod.rs @@ -840,7 +840,7 @@ impl<'a, Ty> FnAbi<'a, Ty> { "sparc" => sparc::compute_abi_info(cx, self), "sparc64" => sparc64::compute_abi_info(cx, self), "nvptx64" => { - if cx.target_spec().adjust_abi(abi) == spec::abi::Abi::PtxKernel { + if cx.target_spec().adjust_abi(abi, self.c_variadic) == spec::abi::Abi::PtxKernel { nvptx64::compute_ptx_kernel_abi_info(cx, self) } else { nvptx64::compute_abi_info(self) @@ -849,7 +849,7 @@ impl<'a, Ty> FnAbi<'a, Ty> { "hexagon" => hexagon::compute_abi_info(self), "riscv32" | "riscv64" => riscv::compute_abi_info(cx, self), "wasm32" | "wasm64" => { - if cx.target_spec().adjust_abi(abi) == spec::abi::Abi::Wasm { + if cx.target_spec().adjust_abi(abi, self.c_variadic) == spec::abi::Abi::Wasm { wasm::compute_wasm_abi_info(self) } else { wasm::compute_c_abi_info(cx, self) diff --git a/compiler/rustc_target/src/spec/abi/mod.rs b/compiler/rustc_target/src/spec/abi/mod.rs index 4c1f0c01a041..1a0aa6f0c4a2 100644 --- a/compiler/rustc_target/src/spec/abi/mod.rs +++ b/compiler/rustc_target/src/spec/abi/mod.rs @@ -70,15 +70,16 @@ impl Abi { // * C and Cdecl obviously support varargs. // * C can be based on Aapcs, SysV64 or Win64, so they must support varargs. // * EfiApi is based on Win64 or C, so it also supports it. + // * System falls back to C for functions with varargs. // // * Stdcall does not, because it would be impossible for the callee to clean // up the arguments. (callee doesn't know how many arguments are there) // * Same for Fastcall, Vectorcall and Thiscall. - // * System can become Stdcall, so is also a no-no. // * Other calling conventions are related to hardware or the compiler itself. match self { Self::C { .. } | Self::Cdecl { .. } + | Self::System { .. } | Self::Aapcs { .. } | Self::Win64 { .. } | Self::SysV64 { .. } diff --git a/compiler/rustc_target/src/spec/base/illumos.rs b/compiler/rustc_target/src/spec/base/illumos.rs index e63e789752bc..f0a648b93ad0 100644 --- a/compiler/rustc_target/src/spec/base/illumos.rs +++ b/compiler/rustc_target/src/spec/base/illumos.rs @@ -39,7 +39,7 @@ pub fn opts() -> TargetOptions { // While we support ELF TLS, rust requires a way to register // cleanup handlers (in C, this would be something along the lines of: // void register_callback(void (*fn)(void *), void *arg); - // (see src/libstd/sys/unix/fast_thread_local.rs) that is currently + // (see src/libstd/sys/pal/unix/fast_thread_local.rs) that is currently // missing in illumos. For now at least, we must fallback to using // pthread_{get,set}specific. //has_thread_local: true, diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index da8706ea715b..5d74ebebdf3f 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -2401,10 +2401,14 @@ impl DerefMut for Target { impl Target { /// Given a function ABI, turn it into the correct ABI for this target. - pub fn adjust_abi(&self, abi: Abi) -> Abi { + pub fn adjust_abi(&self, abi: Abi, c_variadic: bool) -> Abi { match abi { Abi::C { .. } => self.default_adjusted_cabi.unwrap_or(abi), - Abi::System { unwind } if self.is_like_windows && self.arch == "x86" => { + + // On Windows, `extern "system"` behaves like msvc's `__stdcall`. + // `__stdcall` only applies on x86 and on non-variadic functions: + // https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170 + Abi::System { unwind } if self.is_like_windows && self.arch == "x86" && !c_variadic => { Abi::Stdcall { unwind } } Abi::System { unwind } => Abi::C { unwind }, diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs index 100c9a70aaa2..532e2cb36e3c 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs @@ -408,7 +408,7 @@ impl<'tcx> OnUnimplementedDirective { .ok_or_else(|| tcx.dcx().emit_err(EmptyOnClauseInOnUnimplemented { span }))? .meta_item() .ok_or_else(|| tcx.dcx().emit_err(InvalidOnClauseInOnUnimplemented { span }))?; - attr::eval_condition(cond, &tcx.sess.parse_sess, Some(tcx.features()), &mut |cfg| { + attr::eval_condition(cond, &tcx.sess, Some(tcx.features()), &mut |cfg| { if let Some(value) = cfg.value && let Err(guar) = parse_value(value, cfg.span) { @@ -682,31 +682,22 @@ impl<'tcx> OnUnimplementedDirective { for command in self.subcommands.iter().chain(Some(self)).rev() { if let Some(ref condition) = command.condition - && !attr::eval_condition( - condition, - &tcx.sess.parse_sess, - Some(tcx.features()), - &mut |cfg| { - let value = cfg.value.map(|v| { - // `with_no_visible_paths` is also used when generating the options, - // so we need to match it here. - ty::print::with_no_visible_paths!( - OnUnimplementedFormatString { - symbol: v, - span: cfg.span, - is_diagnostic_namespace_variant: false - } - .format( - tcx, - trait_ref, - &options_map - ) - ) - }); + && !attr::eval_condition(condition, &tcx.sess, Some(tcx.features()), &mut |cfg| { + let value = cfg.value.map(|v| { + // `with_no_visible_paths` is also used when generating the options, + // so we need to match it here. + ty::print::with_no_visible_paths!( + OnUnimplementedFormatString { + symbol: v, + span: cfg.span, + is_diagnostic_namespace_variant: false + } + .format(tcx, trait_ref, &options_map) + ) + }); - options.contains(&(cfg.name, value)) - }, - ) + options.contains(&(cfg.name, value)) + }) { debug!("evaluate: skipping {:?} due to condition", command); continue; diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs index 47a700805fa5..b970ec7f726e 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs @@ -947,9 +947,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { Overflow(_) => { bug!("overflow should be handled before the `report_selection_error` path"); } - SelectionError::ErrorReporting => { - bug!("ErrorReporting Overflow should not reach `report_selection_err` call") - } }; self.note_obligation_cause(&mut err, &obligation); @@ -3459,14 +3456,12 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> { let found_node = found_did.and_then(|did| self.tcx.hir().get_if_local(did)); let found_span = found_did.and_then(|did| self.tcx.hir().span_if_local(did)); - if self.reported_closure_mismatch.borrow().contains(&(span, found_span)) { + if !self.reported_signature_mismatch.borrow_mut().insert((span, found_span)) { // We check closures twice, with obligations flowing in different directions, // but we want to complain about them only once. return None; } - self.reported_closure_mismatch.borrow_mut().insert((span, found_span)); - let mut not_tupled = false; let found = match found_trait_ref.skip_binder().args.type_at(1).kind() { diff --git a/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs b/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs index 31e34096fb00..4c0c57377e02 100644 --- a/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs +++ b/compiler/rustc_trait_selection/src/traits/query/evaluate_obligation.rs @@ -116,11 +116,9 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> { r, ) } - OverflowError::ErrorReporting => EvaluationResult::EvaluatedToErr, OverflowError::Error(_) => EvaluationResult::EvaluatedToErr, }) } - Err(OverflowError::ErrorReporting) => EvaluationResult::EvaluatedToErr, Err(OverflowError::Error(_)) => EvaluationResult::EvaluatedToErr, } } diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 61fe2c8efe36..6a6adcbb680e 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -14,9 +14,9 @@ use super::util; use super::util::closure_trait_ref_and_return_type; use super::wf; use super::{ - ErrorReporting, ImplDerivedObligation, ImplDerivedObligationCause, Normalized, Obligation, - ObligationCause, ObligationCauseCode, Overflow, PolyTraitObligation, PredicateObligation, - Selection, SelectionError, SelectionResult, TraitQueryMode, + ImplDerivedObligation, ImplDerivedObligationCause, Normalized, Obligation, ObligationCause, + ObligationCauseCode, Overflow, PolyTraitObligation, PredicateObligation, Selection, + SelectionError, SelectionResult, TraitQueryMode, }; use crate::infer::{InferCtxt, InferOk, TypeFreshener}; @@ -496,7 +496,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { } Ok(_) => Ok(None), Err(OverflowError::Canonical) => Err(Overflow(OverflowError::Canonical)), - Err(OverflowError::ErrorReporting) => Err(ErrorReporting), Err(OverflowError::Error(e)) => Err(Overflow(OverflowError::Error(e))), }) .flat_map(Result::transpose) @@ -1233,7 +1232,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { Ok(Some(c)) => self.evaluate_candidate(stack, &c), Ok(None) => Ok(EvaluatedToAmbig), Err(Overflow(OverflowError::Canonical)) => Err(OverflowError::Canonical), - Err(ErrorReporting) => Err(OverflowError::ErrorReporting), Err(..) => Ok(EvaluatedToErr), } } diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index 2772831e731e..6e8293dac312 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -228,9 +228,9 @@ fn fn_sig_for_fn_abi<'tcx>( } #[inline] -fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv { +fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi, c_variadic: bool) -> Conv { use rustc_target::spec::abi::Abi::*; - match tcx.sess.target.adjust_abi(abi) { + match tcx.sess.target.adjust_abi(abi, c_variadic) { RustIntrinsic | PlatformIntrinsic | Rust | RustCall => Conv::Rust, // This is intentionally not using `Conv::Cold`, as that has to preserve @@ -488,7 +488,7 @@ fn fn_abi_new_uncached<'tcx>( ) -> Result<&'tcx FnAbi<'tcx, Ty<'tcx>>, &'tcx FnAbiError<'tcx>> { let sig = cx.tcx.normalize_erasing_late_bound_regions(cx.param_env, sig); - let conv = conv_from_spec_abi(cx.tcx(), sig.abi); + let conv = conv_from_spec_abi(cx.tcx(), sig.abi, sig.c_variadic); let mut inputs = sig.inputs(); let extra_args = if sig.abi == RustCall { diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index bd2851a26fb8..267d9b44ad76 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -1605,9 +1605,9 @@ mod prim_ref {} /// type in the function pointer to the type at the function declaration, and the return value is /// [`transmute`d][mem::transmute] from the type in the declaration to the type in the /// pointer. All the usual caveats and concerns around transmutation apply; for instance, if the -/// function expects a `NonNullI32` and the function pointer uses the ABI-compatible type -/// `Option`, and the value used for the argument is `None`, then this call is Undefined -/// Behavior since transmuting `None::` to `NonNullI32` violates the non-null +/// function expects a `NonZeroI32` and the function pointer uses the ABI-compatible type +/// `Option`, and the value used for the argument is `None`, then this call is Undefined +/// Behavior since transmuting `None::` to `NonZeroI32` violates the non-zero /// requirement. /// /// #### Requirements concerning target features diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs index 9c41b8b4f46a..077852b0120c 100644 --- a/library/core/src/task/wake.rs +++ b/library/core/src/task/wake.rs @@ -329,12 +329,14 @@ impl Waker { Waker { waker } } - /// Creates a new `Waker` that does nothing when `wake` is called. + /// Returns a reference to a `Waker` that does nothing when used. /// /// This is mostly useful for writing tests that need a [`Context`] to poll /// some futures, but are not expecting those futures to wake the waker or /// do not need to do anything specific if it happens. /// + /// If an owned `Waker` is needed, `clone()` this one. + /// /// # Examples /// /// ``` @@ -343,8 +345,7 @@ impl Waker { /// use std::future::Future; /// use std::task; /// - /// let waker = task::Waker::noop(); - /// let mut cx = task::Context::from_waker(&waker); + /// let mut cx = task::Context::from_waker(task::Waker::noop()); /// /// let mut future = Box::pin(async { 10 }); /// assert_eq!(future.as_mut().poll(&mut cx), task::Poll::Ready(10)); @@ -352,7 +353,12 @@ impl Waker { #[inline] #[must_use] #[unstable(feature = "noop_waker", issue = "98286")] - pub const fn noop() -> Waker { + pub const fn noop() -> &'static Waker { + // Ideally all this data would be explicitly `static` because it is used by reference and + // only ever needs one copy. But `const fn`s (and `const` items) cannot refer to statics, + // even though their values can be promoted to static. (That might change; see #119618.) + // An alternative would be a `pub static NOOP: &Waker`, but associated static items are not + // currently allowed either, and making it non-associated would be unergonomic. const VTABLE: RawWakerVTable = RawWakerVTable::new( // Cloning just returns a new no-op raw waker |_| RAW, @@ -364,8 +370,9 @@ impl Waker { |_| {}, ); const RAW: RawWaker = RawWaker::new(ptr::null(), &VTABLE); + const WAKER_REF: &Waker = &Waker { waker: RAW }; - Waker { waker: RAW } + WAKER_REF } /// Get a reference to the underlying [`RawWaker`]. diff --git a/library/std/src/sys/mod.rs b/library/std/src/sys/mod.rs index 88420bd3612c..bbdcb32606cc 100644 --- a/library/std/src/sys/mod.rs +++ b/library/std/src/sys/mod.rs @@ -1,124 +1,10 @@ -//! Platform-dependent platform abstraction. -//! -//! The `std::sys` module is the abstracted interface through which -//! `std` talks to the underlying operating system. It has different -//! implementations for different operating system families, today -//! just Unix and Windows, and initial support for Redox. -//! -//! The centralization of platform-specific code in this module is -//! enforced by the "platform abstraction layer" tidy script in -//! `tools/tidy/src/pal.rs`. -//! -//! This module is closely related to the platform-independent system -//! integration code in `std::sys_common`. See that module's -//! documentation for details. -//! -//! In the future it would be desirable for the independent -//! implementations of this module to be extracted to their own crates -//! that `std` can link to, thus enabling their implementation -//! out-of-tree via crate replacement. Though due to the complex -//! inter-dependencies within `std` that will be a challenging goal to -//! achieve. +/// The PAL (platform abstraction layer) contains platform-specific abstractions +/// for implementing the features in the other submodules, e.g. UNIX file +/// descriptors. +mod pal; -#![allow(missing_debug_implementations)] - -pub mod common; mod personality; -cfg_if::cfg_if! { - if #[cfg(unix)] { - mod unix; - pub use self::unix::*; - } else if #[cfg(windows)] { - mod windows; - pub use self::windows::*; - } else if #[cfg(target_os = "solid_asp3")] { - mod solid; - pub use self::solid::*; - } else if #[cfg(target_os = "hermit")] { - mod hermit; - pub use self::hermit::*; - } else if #[cfg(target_os = "wasi")] { - mod wasi; - pub use self::wasi::*; - } else if #[cfg(target_family = "wasm")] { - mod wasm; - pub use self::wasm::*; - } else if #[cfg(target_os = "xous")] { - mod xous; - pub use self::xous::*; - } else if #[cfg(target_os = "uefi")] { - mod uefi; - pub use self::uefi::*; - } else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] { - mod sgx; - pub use self::sgx::*; - } else if #[cfg(target_os = "teeos")] { - mod teeos; - pub use self::teeos::*; - } else { - mod unsupported; - pub use self::unsupported::*; - } -} - -cfg_if::cfg_if! { - // Fuchsia components default to full backtrace. - if #[cfg(target_os = "fuchsia")] { - pub const FULL_BACKTRACE_DEFAULT: bool = true; - } else { - pub const FULL_BACKTRACE_DEFAULT: bool = false; - } -} - -#[cfg(not(test))] -cfg_if::cfg_if! { - if #[cfg(target_os = "android")] { - pub use self::android::log2f32; - pub use self::android::log2f64; - } else { - #[inline] - pub fn log2f32(n: f32) -> f32 { - unsafe { crate::intrinsics::log2f32(n) } - } - - #[inline] - pub fn log2f64(n: f64) -> f64 { - unsafe { crate::intrinsics::log2f64(n) } - } - } -} - -// Solaris/Illumos requires a wrapper around log, log2, and log10 functions -// because of their non-standard behavior (e.g., log(-n) returns -Inf instead -// of expected NaN). -#[cfg(not(test))] -#[cfg(any(target_os = "solaris", target_os = "illumos"))] -#[inline] -pub fn log_wrapper f64>(n: f64, log_fn: F) -> f64 { - if n.is_finite() { - if n > 0.0 { - log_fn(n) - } else if n == 0.0 { - f64::NEG_INFINITY // log(0) = -Inf - } else { - f64::NAN // log(-n) = NaN - } - } else if n.is_nan() { - n // log(NaN) = NaN - } else if n > 0.0 { - n // log(Inf) = Inf - } else { - f64::NAN // log(-Inf) = NaN - } -} - -#[cfg(not(test))] -#[cfg(not(any(target_os = "solaris", target_os = "illumos")))] -#[inline] -pub fn log_wrapper f64>(n: f64, log_fn: F) -> f64 { - log_fn(n) -} - -#[cfg(not(target_os = "uefi"))] -pub type RawOsError = i32; +// FIXME(117276): remove this, move feature implementations into individual +// submodules. +pub use pal::*; diff --git a/library/std/src/sys/common/alloc.rs b/library/std/src/sys/pal/common/alloc.rs similarity index 100% rename from library/std/src/sys/common/alloc.rs rename to library/std/src/sys/pal/common/alloc.rs diff --git a/library/std/src/sys/common/mod.rs b/library/std/src/sys/pal/common/mod.rs similarity index 100% rename from library/std/src/sys/common/mod.rs rename to library/std/src/sys/pal/common/mod.rs diff --git a/library/std/src/sys/common/small_c_string.rs b/library/std/src/sys/pal/common/small_c_string.rs similarity index 100% rename from library/std/src/sys/common/small_c_string.rs rename to library/std/src/sys/pal/common/small_c_string.rs diff --git a/library/std/src/sys/common/tests.rs b/library/std/src/sys/pal/common/tests.rs similarity index 100% rename from library/std/src/sys/common/tests.rs rename to library/std/src/sys/pal/common/tests.rs diff --git a/library/std/src/sys/common/thread_local/fast_local.rs b/library/std/src/sys/pal/common/thread_local/fast_local.rs similarity index 100% rename from library/std/src/sys/common/thread_local/fast_local.rs rename to library/std/src/sys/pal/common/thread_local/fast_local.rs diff --git a/library/std/src/sys/common/thread_local/mod.rs b/library/std/src/sys/pal/common/thread_local/mod.rs similarity index 100% rename from library/std/src/sys/common/thread_local/mod.rs rename to library/std/src/sys/pal/common/thread_local/mod.rs diff --git a/library/std/src/sys/common/thread_local/os_local.rs b/library/std/src/sys/pal/common/thread_local/os_local.rs similarity index 100% rename from library/std/src/sys/common/thread_local/os_local.rs rename to library/std/src/sys/pal/common/thread_local/os_local.rs diff --git a/library/std/src/sys/common/thread_local/static_local.rs b/library/std/src/sys/pal/common/thread_local/static_local.rs similarity index 100% rename from library/std/src/sys/common/thread_local/static_local.rs rename to library/std/src/sys/pal/common/thread_local/static_local.rs diff --git a/library/std/src/sys/hermit/alloc.rs b/library/std/src/sys/pal/hermit/alloc.rs similarity index 96% rename from library/std/src/sys/hermit/alloc.rs rename to library/std/src/sys/pal/hermit/alloc.rs index d153914e77e1..de550987a435 100644 --- a/library/std/src/sys/hermit/alloc.rs +++ b/library/std/src/sys/pal/hermit/alloc.rs @@ -1,6 +1,6 @@ +use super::abi; use crate::alloc::{GlobalAlloc, Layout, System}; use crate::ptr; -use crate::sys::hermit::abi; #[stable(feature = "alloc_system_type", since = "1.28.0")] unsafe impl GlobalAlloc for System { diff --git a/library/std/src/sys/hermit/args.rs b/library/std/src/sys/pal/hermit/args.rs similarity index 100% rename from library/std/src/sys/hermit/args.rs rename to library/std/src/sys/pal/hermit/args.rs diff --git a/library/std/src/sys/hermit/env.rs b/library/std/src/sys/pal/hermit/env.rs similarity index 100% rename from library/std/src/sys/hermit/env.rs rename to library/std/src/sys/pal/hermit/env.rs diff --git a/library/std/src/sys/hermit/fd.rs b/library/std/src/sys/pal/hermit/fd.rs similarity index 98% rename from library/std/src/sys/hermit/fd.rs rename to library/std/src/sys/pal/hermit/fd.rs index ccde05aa1d7d..5eb828fea1f9 100644 --- a/library/std/src/sys/hermit/fd.rs +++ b/library/std/src/sys/pal/hermit/fd.rs @@ -1,9 +1,9 @@ #![unstable(reason = "not public", issue = "none", feature = "fd")] +use super::abi; use crate::io::{self, Read}; use crate::os::hermit::io::{FromRawFd, OwnedFd, RawFd}; use crate::sys::cvt; -use crate::sys::hermit::abi; use crate::sys::unsupported; use crate::sys_common::{AsInner, FromInner, IntoInner}; diff --git a/library/std/src/sys/hermit/fs.rs b/library/std/src/sys/pal/hermit/fs.rs similarity index 98% rename from library/std/src/sys/hermit/fs.rs rename to library/std/src/sys/pal/hermit/fs.rs index 6aa4ea7f5b4f..694482a8a30a 100644 --- a/library/std/src/sys/hermit/fs.rs +++ b/library/std/src/sys/pal/hermit/fs.rs @@ -1,3 +1,5 @@ +use super::abi::{self, O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}; +use super::fd::FileDesc; use crate::ffi::{CStr, OsString}; use crate::fmt; use crate::hash::{Hash, Hasher}; @@ -7,10 +9,6 @@ use crate::os::hermit::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, Raw use crate::path::{Path, PathBuf}; use crate::sys::common::small_c_string::run_path_with_cstr; use crate::sys::cvt; -use crate::sys::hermit::abi::{ - self, O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY, -}; -use crate::sys::hermit::fd::FileDesc; use crate::sys::time::SystemTime; use crate::sys::unsupported; use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner}; diff --git a/library/std/src/sys/hermit/futex.rs b/library/std/src/sys/pal/hermit/futex.rs similarity index 100% rename from library/std/src/sys/hermit/futex.rs rename to library/std/src/sys/pal/hermit/futex.rs diff --git a/library/std/src/sys/hermit/memchr.rs b/library/std/src/sys/pal/hermit/memchr.rs similarity index 100% rename from library/std/src/sys/hermit/memchr.rs rename to library/std/src/sys/pal/hermit/memchr.rs diff --git a/library/std/src/sys/hermit/mod.rs b/library/std/src/sys/pal/hermit/mod.rs similarity index 98% rename from library/std/src/sys/hermit/mod.rs rename to library/std/src/sys/pal/hermit/mod.rs index abd7eb353f81..937603cfd8a0 100644 --- a/library/std/src/sys/hermit/mod.rs +++ b/library/std/src/sys/pal/hermit/mod.rs @@ -115,7 +115,7 @@ pub unsafe extern "C" fn runtime_entry( argv: *const *const c_char, env: *const *const c_char, ) -> ! { - use crate::sys::hermit::thread_local_dtor::run_dtors; + use thread_local_dtor::run_dtors; extern "C" { fn main(argc: isize, argv: *const *const c_char) -> i32; } diff --git a/library/std/src/sys/hermit/net.rs b/library/std/src/sys/pal/hermit/net.rs similarity index 99% rename from library/std/src/sys/hermit/net.rs rename to library/std/src/sys/pal/hermit/net.rs index bd8b493d65aa..3cf63fccf2e7 100644 --- a/library/std/src/sys/hermit/net.rs +++ b/library/std/src/sys/pal/hermit/net.rs @@ -1,11 +1,11 @@ #![allow(dead_code)] +use super::fd::FileDesc; use crate::cmp; use crate::io::{self, BorrowedBuf, BorrowedCursor, IoSlice, IoSliceMut}; use crate::mem; use crate::net::{Shutdown, SocketAddr}; use crate::os::hermit::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, RawFd}; -use crate::sys::hermit::fd::FileDesc; use crate::sys::time::Instant; use crate::sys_common::net::{getsockopt, setsockopt, sockaddr_to_addr}; use crate::sys_common::{AsInner, FromInner, IntoInner}; diff --git a/library/std/src/sys/hermit/os.rs b/library/std/src/sys/pal/hermit/os.rs similarity index 99% rename from library/std/src/sys/hermit/os.rs rename to library/std/src/sys/pal/hermit/os.rs index c79197a9ad1f..a54536aecb8b 100644 --- a/library/std/src/sys/hermit/os.rs +++ b/library/std/src/sys/pal/hermit/os.rs @@ -1,3 +1,4 @@ +use super::abi; use crate::collections::HashMap; use crate::error::Error as StdError; use crate::ffi::{CStr, OsStr, OsString}; @@ -8,7 +9,6 @@ use crate::os::hermit::ffi::OsStringExt; use crate::path::{self, PathBuf}; use crate::str; use crate::sync::Mutex; -use crate::sys::hermit::abi; use crate::sys::memchr; use crate::sys::unsupported; use crate::vec; diff --git a/library/std/src/sys/hermit/stdio.rs b/library/std/src/sys/pal/hermit/stdio.rs similarity index 98% rename from library/std/src/sys/hermit/stdio.rs rename to library/std/src/sys/pal/hermit/stdio.rs index 514de1df6f9c..ac54385e8cec 100644 --- a/library/std/src/sys/hermit/stdio.rs +++ b/library/std/src/sys/pal/hermit/stdio.rs @@ -1,6 +1,6 @@ +use super::abi; use crate::io; use crate::io::{IoSlice, IoSliceMut}; -use crate::sys::hermit::abi; pub struct Stdin; pub struct Stdout; diff --git a/library/std/src/sys/hermit/thread.rs b/library/std/src/sys/pal/hermit/thread.rs similarity index 96% rename from library/std/src/sys/hermit/thread.rs rename to library/std/src/sys/pal/hermit/thread.rs index 332151e40d02..3384906a15e3 100644 --- a/library/std/src/sys/hermit/thread.rs +++ b/library/std/src/sys/pal/hermit/thread.rs @@ -1,12 +1,12 @@ #![allow(dead_code)] +use super::abi; +use super::thread_local_dtor::run_dtors; use crate::ffi::CStr; use crate::io; use crate::mem; use crate::num::NonZeroUsize; use crate::ptr; -use crate::sys::hermit::abi; -use crate::sys::hermit::thread_local_dtor::run_dtors; use crate::time::Duration; pub type Tid = abi::Tid; diff --git a/library/std/src/sys/hermit/thread_local_dtor.rs b/library/std/src/sys/pal/hermit/thread_local_dtor.rs similarity index 100% rename from library/std/src/sys/hermit/thread_local_dtor.rs rename to library/std/src/sys/pal/hermit/thread_local_dtor.rs diff --git a/library/std/src/sys/hermit/time.rs b/library/std/src/sys/pal/hermit/time.rs similarity index 97% rename from library/std/src/sys/hermit/time.rs rename to library/std/src/sys/pal/hermit/time.rs index 7d91460aba3e..b0e9634d2299 100644 --- a/library/std/src/sys/hermit/time.rs +++ b/library/std/src/sys/pal/hermit/time.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] +use super::abi; +use super::abi::timespec; +use super::abi::{CLOCK_MONOTONIC, CLOCK_REALTIME, NSEC_PER_SEC}; use crate::cmp::Ordering; use crate::ops::{Add, AddAssign, Sub, SubAssign}; -use crate::sys::hermit::abi; -use crate::sys::hermit::abi::timespec; -use crate::sys::hermit::abi::{CLOCK_MONOTONIC, CLOCK_REALTIME, NSEC_PER_SEC}; use crate::time::Duration; use core::hash::{Hash, Hasher}; diff --git a/library/std/src/sys/itron/abi.rs b/library/std/src/sys/pal/itron/abi.rs similarity index 100% rename from library/std/src/sys/itron/abi.rs rename to library/std/src/sys/pal/itron/abi.rs diff --git a/library/std/src/sys/itron/condvar.rs b/library/std/src/sys/pal/itron/condvar.rs similarity index 100% rename from library/std/src/sys/itron/condvar.rs rename to library/std/src/sys/pal/itron/condvar.rs diff --git a/library/std/src/sys/itron/error.rs b/library/std/src/sys/pal/itron/error.rs similarity index 100% rename from library/std/src/sys/itron/error.rs rename to library/std/src/sys/pal/itron/error.rs diff --git a/library/std/src/sys/itron/mutex.rs b/library/std/src/sys/pal/itron/mutex.rs similarity index 100% rename from library/std/src/sys/itron/mutex.rs rename to library/std/src/sys/pal/itron/mutex.rs diff --git a/library/std/src/sys/itron/spin.rs b/library/std/src/sys/pal/itron/spin.rs similarity index 100% rename from library/std/src/sys/itron/spin.rs rename to library/std/src/sys/pal/itron/spin.rs diff --git a/library/std/src/sys/itron/task.rs b/library/std/src/sys/pal/itron/task.rs similarity index 100% rename from library/std/src/sys/itron/task.rs rename to library/std/src/sys/pal/itron/task.rs diff --git a/library/std/src/sys/itron/thread.rs b/library/std/src/sys/pal/itron/thread.rs similarity index 100% rename from library/std/src/sys/itron/thread.rs rename to library/std/src/sys/pal/itron/thread.rs diff --git a/library/std/src/sys/itron/thread_parking.rs b/library/std/src/sys/pal/itron/thread_parking.rs similarity index 100% rename from library/std/src/sys/itron/thread_parking.rs rename to library/std/src/sys/pal/itron/thread_parking.rs diff --git a/library/std/src/sys/itron/time.rs b/library/std/src/sys/pal/itron/time.rs similarity index 100% rename from library/std/src/sys/itron/time.rs rename to library/std/src/sys/pal/itron/time.rs diff --git a/library/std/src/sys/itron/time/tests.rs b/library/std/src/sys/pal/itron/time/tests.rs similarity index 100% rename from library/std/src/sys/itron/time/tests.rs rename to library/std/src/sys/pal/itron/time/tests.rs diff --git a/library/std/src/sys/pal/mod.rs b/library/std/src/sys/pal/mod.rs new file mode 100644 index 000000000000..66b2a4b88850 --- /dev/null +++ b/library/std/src/sys/pal/mod.rs @@ -0,0 +1,123 @@ +//! Platform-dependent platform abstraction. +//! +//! The `std::sys` module is the abstracted interface through which +//! `std` talks to the underlying operating system. It has different +//! implementations for different operating system families, today +//! just Unix and Windows, and initial support for Redox. +//! +//! The centralization of platform-specific code in this module is +//! enforced by the "platform abstraction layer" tidy script in +//! `tools/tidy/src/pal.rs`. +//! +//! This module is closely related to the platform-independent system +//! integration code in `std::sys_common`. See that module's +//! documentation for details. +//! +//! In the future it would be desirable for the independent +//! implementations of this module to be extracted to their own crates +//! that `std` can link to, thus enabling their implementation +//! out-of-tree via crate replacement. Though due to the complex +//! inter-dependencies within `std` that will be a challenging goal to +//! achieve. + +#![allow(missing_debug_implementations)] + +pub mod common; + +cfg_if::cfg_if! { + if #[cfg(unix)] { + mod unix; + pub use self::unix::*; + } else if #[cfg(windows)] { + mod windows; + pub use self::windows::*; + } else if #[cfg(target_os = "solid_asp3")] { + mod solid; + pub use self::solid::*; + } else if #[cfg(target_os = "hermit")] { + mod hermit; + pub use self::hermit::*; + } else if #[cfg(target_os = "wasi")] { + mod wasi; + pub use self::wasi::*; + } else if #[cfg(target_family = "wasm")] { + mod wasm; + pub use self::wasm::*; + } else if #[cfg(target_os = "xous")] { + mod xous; + pub use self::xous::*; + } else if #[cfg(target_os = "uefi")] { + mod uefi; + pub use self::uefi::*; + } else if #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] { + mod sgx; + pub use self::sgx::*; + } else if #[cfg(target_os = "teeos")] { + mod teeos; + pub use self::teeos::*; + } else { + mod unsupported; + pub use self::unsupported::*; + } +} + +cfg_if::cfg_if! { + // Fuchsia components default to full backtrace. + if #[cfg(target_os = "fuchsia")] { + pub const FULL_BACKTRACE_DEFAULT: bool = true; + } else { + pub const FULL_BACKTRACE_DEFAULT: bool = false; + } +} + +#[cfg(not(test))] +cfg_if::cfg_if! { + if #[cfg(target_os = "android")] { + pub use self::android::log2f32; + pub use self::android::log2f64; + } else { + #[inline] + pub fn log2f32(n: f32) -> f32 { + unsafe { crate::intrinsics::log2f32(n) } + } + + #[inline] + pub fn log2f64(n: f64) -> f64 { + unsafe { crate::intrinsics::log2f64(n) } + } + } +} + +// Solaris/Illumos requires a wrapper around log, log2, and log10 functions +// because of their non-standard behavior (e.g., log(-n) returns -Inf instead +// of expected NaN). +#[cfg(not(test))] +#[cfg(any(target_os = "solaris", target_os = "illumos"))] +#[inline] +pub fn log_wrapper f64>(n: f64, log_fn: F) -> f64 { + if n.is_finite() { + if n > 0.0 { + log_fn(n) + } else if n == 0.0 { + f64::NEG_INFINITY // log(0) = -Inf + } else { + f64::NAN // log(-n) = NaN + } + } else if n.is_nan() { + n // log(NaN) = NaN + } else if n > 0.0 { + n // log(Inf) = Inf + } else { + f64::NAN // log(-Inf) = NaN + } +} + +#[cfg(not(test))] +#[cfg(not(any(target_os = "solaris", target_os = "illumos")))] +#[inline] +pub fn log_wrapper f64>(n: f64, log_fn: F) -> f64 { + log_fn(n) +} + +#[cfg(not(target_os = "uefi"))] +pub type RawOsError = i32; diff --git a/library/std/src/sys/sgx/abi/entry.S b/library/std/src/sys/pal/sgx/abi/entry.S similarity index 100% rename from library/std/src/sys/sgx/abi/entry.S rename to library/std/src/sys/pal/sgx/abi/entry.S diff --git a/library/std/src/sys/sgx/abi/mem.rs b/library/std/src/sys/pal/sgx/abi/mem.rs similarity index 100% rename from library/std/src/sys/sgx/abi/mem.rs rename to library/std/src/sys/pal/sgx/abi/mem.rs diff --git a/library/std/src/sys/sgx/abi/mod.rs b/library/std/src/sys/pal/sgx/abi/mod.rs similarity index 100% rename from library/std/src/sys/sgx/abi/mod.rs rename to library/std/src/sys/pal/sgx/abi/mod.rs diff --git a/library/std/src/sys/sgx/abi/panic.rs b/library/std/src/sys/pal/sgx/abi/panic.rs similarity index 100% rename from library/std/src/sys/sgx/abi/panic.rs rename to library/std/src/sys/pal/sgx/abi/panic.rs diff --git a/library/std/src/sys/sgx/abi/reloc.rs b/library/std/src/sys/pal/sgx/abi/reloc.rs similarity index 100% rename from library/std/src/sys/sgx/abi/reloc.rs rename to library/std/src/sys/pal/sgx/abi/reloc.rs diff --git a/library/std/src/sys/sgx/abi/thread.rs b/library/std/src/sys/pal/sgx/abi/thread.rs similarity index 100% rename from library/std/src/sys/sgx/abi/thread.rs rename to library/std/src/sys/pal/sgx/abi/thread.rs diff --git a/library/std/src/sys/sgx/abi/tls/mod.rs b/library/std/src/sys/pal/sgx/abi/tls/mod.rs similarity index 100% rename from library/std/src/sys/sgx/abi/tls/mod.rs rename to library/std/src/sys/pal/sgx/abi/tls/mod.rs diff --git a/library/std/src/sys/sgx/abi/tls/sync_bitset.rs b/library/std/src/sys/pal/sgx/abi/tls/sync_bitset.rs similarity index 100% rename from library/std/src/sys/sgx/abi/tls/sync_bitset.rs rename to library/std/src/sys/pal/sgx/abi/tls/sync_bitset.rs diff --git a/library/std/src/sys/sgx/abi/tls/sync_bitset/tests.rs b/library/std/src/sys/pal/sgx/abi/tls/sync_bitset/tests.rs similarity index 100% rename from library/std/src/sys/sgx/abi/tls/sync_bitset/tests.rs rename to library/std/src/sys/pal/sgx/abi/tls/sync_bitset/tests.rs diff --git a/library/std/src/sys/sgx/abi/usercalls/alloc.rs b/library/std/src/sys/pal/sgx/abi/usercalls/alloc.rs similarity index 100% rename from library/std/src/sys/sgx/abi/usercalls/alloc.rs rename to library/std/src/sys/pal/sgx/abi/usercalls/alloc.rs diff --git a/library/std/src/sys/sgx/abi/usercalls/mod.rs b/library/std/src/sys/pal/sgx/abi/usercalls/mod.rs similarity index 100% rename from library/std/src/sys/sgx/abi/usercalls/mod.rs rename to library/std/src/sys/pal/sgx/abi/usercalls/mod.rs diff --git a/library/std/src/sys/sgx/abi/usercalls/raw.rs b/library/std/src/sys/pal/sgx/abi/usercalls/raw.rs similarity index 100% rename from library/std/src/sys/sgx/abi/usercalls/raw.rs rename to library/std/src/sys/pal/sgx/abi/usercalls/raw.rs diff --git a/library/std/src/sys/sgx/abi/usercalls/tests.rs b/library/std/src/sys/pal/sgx/abi/usercalls/tests.rs similarity index 100% rename from library/std/src/sys/sgx/abi/usercalls/tests.rs rename to library/std/src/sys/pal/sgx/abi/usercalls/tests.rs diff --git a/library/std/src/sys/sgx/alloc.rs b/library/std/src/sys/pal/sgx/alloc.rs similarity index 98% rename from library/std/src/sys/sgx/alloc.rs rename to library/std/src/sys/pal/sgx/alloc.rs index 4aea28cb83e2..0c7bf9a9201f 100644 --- a/library/std/src/sys/sgx/alloc.rs +++ b/library/std/src/sys/pal/sgx/alloc.rs @@ -1,8 +1,8 @@ use crate::alloc::{GlobalAlloc, Layout, System}; use crate::ptr; -use crate::sys::sgx::abi::mem as sgx_mem; use core::sync::atomic::{AtomicBool, Ordering}; +use super::abi::mem as sgx_mem; use super::waitqueue::SpinMutex; // Using a SpinMutex because we never want to exit the enclave waiting for the diff --git a/library/std/src/sys/sgx/args.rs b/library/std/src/sys/pal/sgx/args.rs similarity index 100% rename from library/std/src/sys/sgx/args.rs rename to library/std/src/sys/pal/sgx/args.rs diff --git a/library/std/src/sys/sgx/condvar.rs b/library/std/src/sys/pal/sgx/condvar.rs similarity index 100% rename from library/std/src/sys/sgx/condvar.rs rename to library/std/src/sys/pal/sgx/condvar.rs diff --git a/library/std/src/sys/sgx/env.rs b/library/std/src/sys/pal/sgx/env.rs similarity index 100% rename from library/std/src/sys/sgx/env.rs rename to library/std/src/sys/pal/sgx/env.rs diff --git a/library/std/src/sys/sgx/fd.rs b/library/std/src/sys/pal/sgx/fd.rs similarity index 100% rename from library/std/src/sys/sgx/fd.rs rename to library/std/src/sys/pal/sgx/fd.rs diff --git a/library/std/src/sys/sgx/memchr.rs b/library/std/src/sys/pal/sgx/memchr.rs similarity index 100% rename from library/std/src/sys/sgx/memchr.rs rename to library/std/src/sys/pal/sgx/memchr.rs diff --git a/library/std/src/sys/sgx/mod.rs b/library/std/src/sys/pal/sgx/mod.rs similarity index 100% rename from library/std/src/sys/sgx/mod.rs rename to library/std/src/sys/pal/sgx/mod.rs diff --git a/library/std/src/sys/sgx/mutex.rs b/library/std/src/sys/pal/sgx/mutex.rs similarity index 100% rename from library/std/src/sys/sgx/mutex.rs rename to library/std/src/sys/pal/sgx/mutex.rs diff --git a/library/std/src/sys/sgx/net.rs b/library/std/src/sys/pal/sgx/net.rs similarity index 100% rename from library/std/src/sys/sgx/net.rs rename to library/std/src/sys/pal/sgx/net.rs diff --git a/library/std/src/sys/sgx/os.rs b/library/std/src/sys/pal/sgx/os.rs similarity index 100% rename from library/std/src/sys/sgx/os.rs rename to library/std/src/sys/pal/sgx/os.rs diff --git a/library/std/src/sys/sgx/path.rs b/library/std/src/sys/pal/sgx/path.rs similarity index 100% rename from library/std/src/sys/sgx/path.rs rename to library/std/src/sys/pal/sgx/path.rs diff --git a/library/std/src/sys/sgx/rwlock.rs b/library/std/src/sys/pal/sgx/rwlock.rs similarity index 100% rename from library/std/src/sys/sgx/rwlock.rs rename to library/std/src/sys/pal/sgx/rwlock.rs diff --git a/library/std/src/sys/sgx/rwlock/tests.rs b/library/std/src/sys/pal/sgx/rwlock/tests.rs similarity index 100% rename from library/std/src/sys/sgx/rwlock/tests.rs rename to library/std/src/sys/pal/sgx/rwlock/tests.rs diff --git a/library/std/src/sys/sgx/stdio.rs b/library/std/src/sys/pal/sgx/stdio.rs similarity index 100% rename from library/std/src/sys/sgx/stdio.rs rename to library/std/src/sys/pal/sgx/stdio.rs diff --git a/library/std/src/sys/sgx/thread.rs b/library/std/src/sys/pal/sgx/thread.rs similarity index 100% rename from library/std/src/sys/sgx/thread.rs rename to library/std/src/sys/pal/sgx/thread.rs diff --git a/library/std/src/sys/sgx/thread_local_key.rs b/library/std/src/sys/pal/sgx/thread_local_key.rs similarity index 100% rename from library/std/src/sys/sgx/thread_local_key.rs rename to library/std/src/sys/pal/sgx/thread_local_key.rs diff --git a/library/std/src/sys/sgx/thread_parking.rs b/library/std/src/sys/pal/sgx/thread_parking.rs similarity index 100% rename from library/std/src/sys/sgx/thread_parking.rs rename to library/std/src/sys/pal/sgx/thread_parking.rs diff --git a/library/std/src/sys/sgx/time.rs b/library/std/src/sys/pal/sgx/time.rs similarity index 100% rename from library/std/src/sys/sgx/time.rs rename to library/std/src/sys/pal/sgx/time.rs diff --git a/library/std/src/sys/sgx/waitqueue/mod.rs b/library/std/src/sys/pal/sgx/waitqueue/mod.rs similarity index 100% rename from library/std/src/sys/sgx/waitqueue/mod.rs rename to library/std/src/sys/pal/sgx/waitqueue/mod.rs diff --git a/library/std/src/sys/sgx/waitqueue/spin_mutex.rs b/library/std/src/sys/pal/sgx/waitqueue/spin_mutex.rs similarity index 100% rename from library/std/src/sys/sgx/waitqueue/spin_mutex.rs rename to library/std/src/sys/pal/sgx/waitqueue/spin_mutex.rs diff --git a/library/std/src/sys/sgx/waitqueue/spin_mutex/tests.rs b/library/std/src/sys/pal/sgx/waitqueue/spin_mutex/tests.rs similarity index 100% rename from library/std/src/sys/sgx/waitqueue/spin_mutex/tests.rs rename to library/std/src/sys/pal/sgx/waitqueue/spin_mutex/tests.rs diff --git a/library/std/src/sys/sgx/waitqueue/tests.rs b/library/std/src/sys/pal/sgx/waitqueue/tests.rs similarity index 100% rename from library/std/src/sys/sgx/waitqueue/tests.rs rename to library/std/src/sys/pal/sgx/waitqueue/tests.rs diff --git a/library/std/src/sys/sgx/waitqueue/unsafe_list.rs b/library/std/src/sys/pal/sgx/waitqueue/unsafe_list.rs similarity index 100% rename from library/std/src/sys/sgx/waitqueue/unsafe_list.rs rename to library/std/src/sys/pal/sgx/waitqueue/unsafe_list.rs diff --git a/library/std/src/sys/sgx/waitqueue/unsafe_list/tests.rs b/library/std/src/sys/pal/sgx/waitqueue/unsafe_list/tests.rs similarity index 100% rename from library/std/src/sys/sgx/waitqueue/unsafe_list/tests.rs rename to library/std/src/sys/pal/sgx/waitqueue/unsafe_list/tests.rs diff --git a/library/std/src/sys/solid/abi/fs.rs b/library/std/src/sys/pal/solid/abi/fs.rs similarity index 100% rename from library/std/src/sys/solid/abi/fs.rs rename to library/std/src/sys/pal/solid/abi/fs.rs diff --git a/library/std/src/sys/solid/abi/mod.rs b/library/std/src/sys/pal/solid/abi/mod.rs similarity index 100% rename from library/std/src/sys/solid/abi/mod.rs rename to library/std/src/sys/pal/solid/abi/mod.rs diff --git a/library/std/src/sys/solid/abi/sockets.rs b/library/std/src/sys/pal/solid/abi/sockets.rs similarity index 100% rename from library/std/src/sys/solid/abi/sockets.rs rename to library/std/src/sys/pal/solid/abi/sockets.rs diff --git a/library/std/src/sys/solid/alloc.rs b/library/std/src/sys/pal/solid/alloc.rs similarity index 100% rename from library/std/src/sys/solid/alloc.rs rename to library/std/src/sys/pal/solid/alloc.rs diff --git a/library/std/src/sys/solid/env.rs b/library/std/src/sys/pal/solid/env.rs similarity index 100% rename from library/std/src/sys/solid/env.rs rename to library/std/src/sys/pal/solid/env.rs diff --git a/library/std/src/sys/solid/error.rs b/library/std/src/sys/pal/solid/error.rs similarity index 100% rename from library/std/src/sys/solid/error.rs rename to library/std/src/sys/pal/solid/error.rs diff --git a/library/std/src/sys/solid/fs.rs b/library/std/src/sys/pal/solid/fs.rs similarity index 100% rename from library/std/src/sys/solid/fs.rs rename to library/std/src/sys/pal/solid/fs.rs diff --git a/library/std/src/sys/solid/io.rs b/library/std/src/sys/pal/solid/io.rs similarity index 100% rename from library/std/src/sys/solid/io.rs rename to library/std/src/sys/pal/solid/io.rs diff --git a/library/std/src/sys/solid/memchr.rs b/library/std/src/sys/pal/solid/memchr.rs similarity index 100% rename from library/std/src/sys/solid/memchr.rs rename to library/std/src/sys/pal/solid/memchr.rs diff --git a/library/std/src/sys/solid/mod.rs b/library/std/src/sys/pal/solid/mod.rs similarity index 100% rename from library/std/src/sys/solid/mod.rs rename to library/std/src/sys/pal/solid/mod.rs diff --git a/library/std/src/sys/solid/net.rs b/library/std/src/sys/pal/solid/net.rs similarity index 99% rename from library/std/src/sys/solid/net.rs rename to library/std/src/sys/pal/solid/net.rs index a768e2406c8a..1c310648a3db 100644 --- a/library/std/src/sys/solid/net.rs +++ b/library/std/src/sys/pal/solid/net.rs @@ -68,7 +68,7 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> { } } -/// Just to provide the same interface as sys/unix/net.rs +/// Just to provide the same interface as sys/pal/unix/net.rs pub fn cvt_r(mut f: F) -> io::Result where T: IsMinusOne, diff --git a/library/std/src/sys/solid/os.rs b/library/std/src/sys/pal/solid/os.rs similarity index 100% rename from library/std/src/sys/solid/os.rs rename to library/std/src/sys/pal/solid/os.rs diff --git a/library/std/src/sys/solid/path.rs b/library/std/src/sys/pal/solid/path.rs similarity index 100% rename from library/std/src/sys/solid/path.rs rename to library/std/src/sys/pal/solid/path.rs diff --git a/library/std/src/sys/solid/rwlock.rs b/library/std/src/sys/pal/solid/rwlock.rs similarity index 100% rename from library/std/src/sys/solid/rwlock.rs rename to library/std/src/sys/pal/solid/rwlock.rs diff --git a/library/std/src/sys/solid/stdio.rs b/library/std/src/sys/pal/solid/stdio.rs similarity index 100% rename from library/std/src/sys/solid/stdio.rs rename to library/std/src/sys/pal/solid/stdio.rs diff --git a/library/std/src/sys/solid/thread_local_dtor.rs b/library/std/src/sys/pal/solid/thread_local_dtor.rs similarity index 100% rename from library/std/src/sys/solid/thread_local_dtor.rs rename to library/std/src/sys/pal/solid/thread_local_dtor.rs diff --git a/library/std/src/sys/solid/thread_local_key.rs b/library/std/src/sys/pal/solid/thread_local_key.rs similarity index 100% rename from library/std/src/sys/solid/thread_local_key.rs rename to library/std/src/sys/pal/solid/thread_local_key.rs diff --git a/library/std/src/sys/solid/time.rs b/library/std/src/sys/pal/solid/time.rs similarity index 100% rename from library/std/src/sys/solid/time.rs rename to library/std/src/sys/pal/solid/time.rs diff --git a/library/std/src/sys/teeos/alloc.rs b/library/std/src/sys/pal/teeos/alloc.rs similarity index 100% rename from library/std/src/sys/teeos/alloc.rs rename to library/std/src/sys/pal/teeos/alloc.rs diff --git a/library/std/src/sys/teeos/locks/condvar.rs b/library/std/src/sys/pal/teeos/locks/condvar.rs similarity index 100% rename from library/std/src/sys/teeos/locks/condvar.rs rename to library/std/src/sys/pal/teeos/locks/condvar.rs diff --git a/library/std/src/sys/teeos/locks/mod.rs b/library/std/src/sys/pal/teeos/locks/mod.rs similarity index 100% rename from library/std/src/sys/teeos/locks/mod.rs rename to library/std/src/sys/pal/teeos/locks/mod.rs diff --git a/library/std/src/sys/teeos/locks/rwlock.rs b/library/std/src/sys/pal/teeos/locks/rwlock.rs similarity index 100% rename from library/std/src/sys/teeos/locks/rwlock.rs rename to library/std/src/sys/pal/teeos/locks/rwlock.rs diff --git a/library/std/src/sys/teeos/mod.rs b/library/std/src/sys/pal/teeos/mod.rs similarity index 100% rename from library/std/src/sys/teeos/mod.rs rename to library/std/src/sys/pal/teeos/mod.rs diff --git a/library/std/src/sys/teeos/net.rs b/library/std/src/sys/pal/teeos/net.rs similarity index 100% rename from library/std/src/sys/teeos/net.rs rename to library/std/src/sys/pal/teeos/net.rs diff --git a/library/std/src/sys/teeos/os.rs b/library/std/src/sys/pal/teeos/os.rs similarity index 100% rename from library/std/src/sys/teeos/os.rs rename to library/std/src/sys/pal/teeos/os.rs diff --git a/library/std/src/sys/teeos/rand.rs b/library/std/src/sys/pal/teeos/rand.rs similarity index 100% rename from library/std/src/sys/teeos/rand.rs rename to library/std/src/sys/pal/teeos/rand.rs diff --git a/library/std/src/sys/teeos/stdio.rs b/library/std/src/sys/pal/teeos/stdio.rs similarity index 100% rename from library/std/src/sys/teeos/stdio.rs rename to library/std/src/sys/pal/teeos/stdio.rs diff --git a/library/std/src/sys/teeos/thread.rs b/library/std/src/sys/pal/teeos/thread.rs similarity index 100% rename from library/std/src/sys/teeos/thread.rs rename to library/std/src/sys/pal/teeos/thread.rs diff --git a/library/std/src/sys/teeos/thread_local_dtor.rs b/library/std/src/sys/pal/teeos/thread_local_dtor.rs similarity index 100% rename from library/std/src/sys/teeos/thread_local_dtor.rs rename to library/std/src/sys/pal/teeos/thread_local_dtor.rs diff --git a/library/std/src/sys/uefi/alloc.rs b/library/std/src/sys/pal/uefi/alloc.rs similarity index 98% rename from library/std/src/sys/uefi/alloc.rs rename to library/std/src/sys/pal/uefi/alloc.rs index ad3904d82f3f..15404ac3ea69 100644 --- a/library/std/src/sys/uefi/alloc.rs +++ b/library/std/src/sys/pal/uefi/alloc.rs @@ -3,9 +3,9 @@ use r_efi::protocols::loaded_image; +use super::helpers; use crate::alloc::{GlobalAlloc, Layout, System}; use crate::sync::OnceLock; -use crate::sys::uefi::helpers; #[stable(feature = "alloc_system_type", since = "1.28.0")] unsafe impl GlobalAlloc for System { diff --git a/library/std/src/sys/uefi/args.rs b/library/std/src/sys/pal/uefi/args.rs similarity index 99% rename from library/std/src/sys/uefi/args.rs rename to library/std/src/sys/pal/uefi/args.rs index 4ff7be748e90..18a69afa7d91 100644 --- a/library/std/src/sys/uefi/args.rs +++ b/library/std/src/sys/pal/uefi/args.rs @@ -1,11 +1,11 @@ use r_efi::protocols::loaded_image; +use super::helpers; use crate::env::current_exe; use crate::ffi::OsString; use crate::fmt; use crate::iter::Iterator; use crate::mem::size_of; -use crate::sys::uefi::helpers; use crate::vec; pub struct Args { diff --git a/library/std/src/sys/uefi/env.rs b/library/std/src/sys/pal/uefi/env.rs similarity index 100% rename from library/std/src/sys/uefi/env.rs rename to library/std/src/sys/pal/uefi/env.rs diff --git a/library/std/src/sys/uefi/helpers.rs b/library/std/src/sys/pal/uefi/helpers.rs similarity index 100% rename from library/std/src/sys/uefi/helpers.rs rename to library/std/src/sys/pal/uefi/helpers.rs diff --git a/library/std/src/sys/uefi/mod.rs b/library/std/src/sys/pal/uefi/mod.rs similarity index 100% rename from library/std/src/sys/uefi/mod.rs rename to library/std/src/sys/pal/uefi/mod.rs diff --git a/library/std/src/sys/uefi/os.rs b/library/std/src/sys/pal/uefi/os.rs similarity index 100% rename from library/std/src/sys/uefi/os.rs rename to library/std/src/sys/pal/uefi/os.rs diff --git a/library/std/src/sys/uefi/path.rs b/library/std/src/sys/pal/uefi/path.rs similarity index 100% rename from library/std/src/sys/uefi/path.rs rename to library/std/src/sys/pal/uefi/path.rs diff --git a/library/std/src/sys/uefi/stdio.rs b/library/std/src/sys/pal/uefi/stdio.rs similarity index 100% rename from library/std/src/sys/uefi/stdio.rs rename to library/std/src/sys/pal/uefi/stdio.rs diff --git a/library/std/src/sys/uefi/tests.rs b/library/std/src/sys/pal/uefi/tests.rs similarity index 100% rename from library/std/src/sys/uefi/tests.rs rename to library/std/src/sys/pal/uefi/tests.rs diff --git a/library/std/src/sys/unix/alloc.rs b/library/std/src/sys/pal/unix/alloc.rs similarity index 100% rename from library/std/src/sys/unix/alloc.rs rename to library/std/src/sys/pal/unix/alloc.rs diff --git a/library/std/src/sys/unix/android.rs b/library/std/src/sys/pal/unix/android.rs similarity index 100% rename from library/std/src/sys/unix/android.rs rename to library/std/src/sys/pal/unix/android.rs diff --git a/library/std/src/sys/unix/args.rs b/library/std/src/sys/pal/unix/args.rs similarity index 100% rename from library/std/src/sys/unix/args.rs rename to library/std/src/sys/pal/unix/args.rs diff --git a/library/std/src/sys/unix/cmath.rs b/library/std/src/sys/pal/unix/cmath.rs similarity index 100% rename from library/std/src/sys/unix/cmath.rs rename to library/std/src/sys/pal/unix/cmath.rs diff --git a/library/std/src/sys/unix/env.rs b/library/std/src/sys/pal/unix/env.rs similarity index 100% rename from library/std/src/sys/unix/env.rs rename to library/std/src/sys/pal/unix/env.rs diff --git a/library/std/src/sys/unix/fd.rs b/library/std/src/sys/pal/unix/fd.rs similarity index 100% rename from library/std/src/sys/unix/fd.rs rename to library/std/src/sys/pal/unix/fd.rs diff --git a/library/std/src/sys/unix/fd/tests.rs b/library/std/src/sys/pal/unix/fd/tests.rs similarity index 100% rename from library/std/src/sys/unix/fd/tests.rs rename to library/std/src/sys/pal/unix/fd/tests.rs diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/pal/unix/fs.rs similarity index 99% rename from library/std/src/sys/unix/fs.rs rename to library/std/src/sys/pal/unix/fs.rs index 72e7b1b1fc30..6d0b892ea2f4 100644 --- a/library/std/src/sys/unix/fs.rs +++ b/library/std/src/sys/pal/unix/fs.rs @@ -2008,7 +2008,7 @@ mod remove_dir_impl { pub unsafe fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int { get_openat_fn().map(|openat| openat(dirfd, pathname, flags)).unwrap_or_else(|| { - crate::sys::unix::os::set_errno(libc::ENOSYS); + crate::sys::pal::unix::os::set_errno(libc::ENOSYS); -1 }) } @@ -2019,7 +2019,7 @@ mod remove_dir_impl { #[cfg(all(target_os = "macos", target_arch = "x86_64"))] weak!(fn fdopendir(c_int) -> *mut DIR, "fdopendir$INODE64"); fdopendir.get().map(|fdopendir| fdopendir(fd)).unwrap_or_else(|| { - crate::sys::unix::os::set_errno(libc::ENOSYS); + crate::sys::pal::unix::os::set_errno(libc::ENOSYS); crate::ptr::null_mut() }) } @@ -2027,7 +2027,7 @@ mod remove_dir_impl { pub unsafe fn unlinkat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int { weak!(fn unlinkat(c_int, *const c_char, c_int) -> c_int); unlinkat.get().map(|unlinkat| unlinkat(dirfd, pathname, flags)).unwrap_or_else(|| { - crate::sys::unix::os::set_errno(libc::ENOSYS); + crate::sys::pal::unix::os::set_errno(libc::ENOSYS); -1 }) } diff --git a/library/std/src/sys/unix/futex.rs b/library/std/src/sys/pal/unix/futex.rs similarity index 100% rename from library/std/src/sys/unix/futex.rs rename to library/std/src/sys/pal/unix/futex.rs diff --git a/library/std/src/sys/unix/io.rs b/library/std/src/sys/pal/unix/io.rs similarity index 100% rename from library/std/src/sys/unix/io.rs rename to library/std/src/sys/pal/unix/io.rs diff --git a/library/std/src/sys/unix/kernel_copy.rs b/library/std/src/sys/pal/unix/kernel_copy.rs similarity index 100% rename from library/std/src/sys/unix/kernel_copy.rs rename to library/std/src/sys/pal/unix/kernel_copy.rs diff --git a/library/std/src/sys/unix/kernel_copy/tests.rs b/library/std/src/sys/pal/unix/kernel_copy/tests.rs similarity index 100% rename from library/std/src/sys/unix/kernel_copy/tests.rs rename to library/std/src/sys/pal/unix/kernel_copy/tests.rs diff --git a/library/std/src/sys/unix/l4re.rs b/library/std/src/sys/pal/unix/l4re.rs similarity index 100% rename from library/std/src/sys/unix/l4re.rs rename to library/std/src/sys/pal/unix/l4re.rs diff --git a/library/std/src/sys/unix/locks/fuchsia_mutex.rs b/library/std/src/sys/pal/unix/locks/fuchsia_mutex.rs similarity index 100% rename from library/std/src/sys/unix/locks/fuchsia_mutex.rs rename to library/std/src/sys/pal/unix/locks/fuchsia_mutex.rs diff --git a/library/std/src/sys/unix/locks/futex_condvar.rs b/library/std/src/sys/pal/unix/locks/futex_condvar.rs similarity index 100% rename from library/std/src/sys/unix/locks/futex_condvar.rs rename to library/std/src/sys/pal/unix/locks/futex_condvar.rs diff --git a/library/std/src/sys/unix/locks/futex_mutex.rs b/library/std/src/sys/pal/unix/locks/futex_mutex.rs similarity index 100% rename from library/std/src/sys/unix/locks/futex_mutex.rs rename to library/std/src/sys/pal/unix/locks/futex_mutex.rs diff --git a/library/std/src/sys/unix/locks/futex_rwlock.rs b/library/std/src/sys/pal/unix/locks/futex_rwlock.rs similarity index 100% rename from library/std/src/sys/unix/locks/futex_rwlock.rs rename to library/std/src/sys/pal/unix/locks/futex_rwlock.rs diff --git a/library/std/src/sys/unix/locks/mod.rs b/library/std/src/sys/pal/unix/locks/mod.rs similarity index 100% rename from library/std/src/sys/unix/locks/mod.rs rename to library/std/src/sys/pal/unix/locks/mod.rs diff --git a/library/std/src/sys/unix/locks/pthread_condvar.rs b/library/std/src/sys/pal/unix/locks/pthread_condvar.rs similarity index 100% rename from library/std/src/sys/unix/locks/pthread_condvar.rs rename to library/std/src/sys/pal/unix/locks/pthread_condvar.rs diff --git a/library/std/src/sys/unix/locks/pthread_mutex.rs b/library/std/src/sys/pal/unix/locks/pthread_mutex.rs similarity index 100% rename from library/std/src/sys/unix/locks/pthread_mutex.rs rename to library/std/src/sys/pal/unix/locks/pthread_mutex.rs diff --git a/library/std/src/sys/unix/locks/pthread_rwlock.rs b/library/std/src/sys/pal/unix/locks/pthread_rwlock.rs similarity index 100% rename from library/std/src/sys/unix/locks/pthread_rwlock.rs rename to library/std/src/sys/pal/unix/locks/pthread_rwlock.rs diff --git a/library/std/src/sys/unix/memchr.rs b/library/std/src/sys/pal/unix/memchr.rs similarity index 100% rename from library/std/src/sys/unix/memchr.rs rename to library/std/src/sys/pal/unix/memchr.rs diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs similarity index 100% rename from library/std/src/sys/unix/mod.rs rename to library/std/src/sys/pal/unix/mod.rs diff --git a/library/std/src/sys/unix/net.rs b/library/std/src/sys/pal/unix/net.rs similarity index 99% rename from library/std/src/sys/unix/net.rs rename to library/std/src/sys/pal/unix/net.rs index ec861f9cb869..8f537de7026f 100644 --- a/library/std/src/sys/unix/net.rs +++ b/library/std/src/sys/pal/unix/net.rs @@ -6,7 +6,7 @@ use crate::net::{Shutdown, SocketAddr}; use crate::os::unix::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd}; use crate::str; use crate::sys::fd::FileDesc; -use crate::sys::unix::IsMinusOne; +use crate::sys::pal::unix::IsMinusOne; use crate::sys_common::net::{getsockopt, setsockopt, sockaddr_to_addr}; use crate::sys_common::{AsInner, FromInner, IntoInner}; use crate::time::{Duration, Instant}; diff --git a/library/std/src/sys/unix/os.rs b/library/std/src/sys/pal/unix/os.rs similarity index 100% rename from library/std/src/sys/unix/os.rs rename to library/std/src/sys/pal/unix/os.rs diff --git a/library/std/src/sys/unix/os/tests.rs b/library/std/src/sys/pal/unix/os/tests.rs similarity index 100% rename from library/std/src/sys/unix/os/tests.rs rename to library/std/src/sys/pal/unix/os/tests.rs diff --git a/library/std/src/sys/unix/os_str.rs b/library/std/src/sys/pal/unix/os_str.rs similarity index 100% rename from library/std/src/sys/unix/os_str.rs rename to library/std/src/sys/pal/unix/os_str.rs diff --git a/library/std/src/sys/unix/os_str/tests.rs b/library/std/src/sys/pal/unix/os_str/tests.rs similarity index 100% rename from library/std/src/sys/unix/os_str/tests.rs rename to library/std/src/sys/pal/unix/os_str/tests.rs diff --git a/library/std/src/sys/unix/path.rs b/library/std/src/sys/pal/unix/path.rs similarity index 100% rename from library/std/src/sys/unix/path.rs rename to library/std/src/sys/pal/unix/path.rs diff --git a/library/std/src/sys/unix/pipe.rs b/library/std/src/sys/pal/unix/pipe.rs similarity index 100% rename from library/std/src/sys/unix/pipe.rs rename to library/std/src/sys/pal/unix/pipe.rs diff --git a/library/std/src/sys/unix/process/mod.rs b/library/std/src/sys/pal/unix/process/mod.rs similarity index 100% rename from library/std/src/sys/unix/process/mod.rs rename to library/std/src/sys/pal/unix/process/mod.rs diff --git a/library/std/src/sys/unix/process/process_common.rs b/library/std/src/sys/pal/unix/process/process_common.rs similarity index 99% rename from library/std/src/sys/unix/process/process_common.rs rename to library/std/src/sys/pal/unix/process/process_common.rs index c5f04fb8b3b1..f615e8086dcc 100644 --- a/library/std/src/sys/unix/process/process_common.rs +++ b/library/std/src/sys/pal/unix/process/process_common.rs @@ -63,7 +63,7 @@ cfg_if::cfg_if! { let bit = (signum - 1) as usize; if set.is_null() || bit >= (8 * size_of::()) { - crate::sys::unix::os::set_errno(libc::EINVAL); + crate::sys::pal::unix::os::set_errno(libc::EINVAL); return -1; } let raw = slice::from_raw_parts_mut( diff --git a/library/std/src/sys/unix/process/process_common/tests.rs b/library/std/src/sys/pal/unix/process/process_common/tests.rs similarity index 100% rename from library/std/src/sys/unix/process/process_common/tests.rs rename to library/std/src/sys/pal/unix/process/process_common/tests.rs diff --git a/library/std/src/sys/unix/process/process_fuchsia.rs b/library/std/src/sys/pal/unix/process/process_fuchsia.rs similarity index 100% rename from library/std/src/sys/unix/process/process_fuchsia.rs rename to library/std/src/sys/pal/unix/process/process_fuchsia.rs diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/pal/unix/process/process_unix.rs similarity index 99% rename from library/std/src/sys/unix/process/process_unix.rs rename to library/std/src/sys/pal/unix/process/process_unix.rs index ee86a5f88dd7..fac6d92439ee 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/pal/unix/process/process_unix.rs @@ -362,7 +362,7 @@ impl Command { // If #[unix_sigpipe] is not specified, reset SIGPIPE to SIG_DFL for backward compatibility. // // #[unix_sigpipe] is an opportunity to change the default here. - if !crate::sys::unix_sigpipe_attr_specified() { + if !crate::sys::pal::unix_sigpipe_attr_specified() { #[cfg(target_os = "android")] // see issue #88585 { let mut action: libc::sigaction = mem::zeroed(); diff --git a/library/std/src/sys/unix/process/process_unix/tests.rs b/library/std/src/sys/pal/unix/process/process_unix/tests.rs similarity index 100% rename from library/std/src/sys/unix/process/process_unix/tests.rs rename to library/std/src/sys/pal/unix/process/process_unix/tests.rs diff --git a/library/std/src/sys/unix/process/process_unsupported.rs b/library/std/src/sys/pal/unix/process/process_unsupported.rs similarity index 97% rename from library/std/src/sys/unix/process/process_unsupported.rs rename to library/std/src/sys/pal/unix/process/process_unsupported.rs index 2fbb31922653..9453c8a384e2 100644 --- a/library/std/src/sys/unix/process/process_unsupported.rs +++ b/library/std/src/sys/pal/unix/process/process_unsupported.rs @@ -1,8 +1,8 @@ use crate::fmt; use crate::io; use crate::num::NonZeroI32; +use crate::sys::pal::unix::unsupported::*; use crate::sys::process::process_common::*; -use crate::sys::unix::unsupported::*; use core::ffi::NonZero_c_int; use libc::{c_int, pid_t}; diff --git a/library/std/src/sys/unix/process/process_unsupported/wait_status.rs b/library/std/src/sys/pal/unix/process/process_unsupported/wait_status.rs similarity index 100% rename from library/std/src/sys/unix/process/process_unsupported/wait_status.rs rename to library/std/src/sys/pal/unix/process/process_unsupported/wait_status.rs diff --git a/library/std/src/sys/unix/process/process_unsupported/wait_status/tests.rs b/library/std/src/sys/pal/unix/process/process_unsupported/wait_status/tests.rs similarity index 100% rename from library/std/src/sys/unix/process/process_unsupported/wait_status/tests.rs rename to library/std/src/sys/pal/unix/process/process_unsupported/wait_status/tests.rs diff --git a/library/std/src/sys/unix/process/process_vxworks.rs b/library/std/src/sys/pal/unix/process/process_vxworks.rs similarity index 100% rename from library/std/src/sys/unix/process/process_vxworks.rs rename to library/std/src/sys/pal/unix/process/process_vxworks.rs diff --git a/library/std/src/sys/unix/process/zircon.rs b/library/std/src/sys/pal/unix/process/zircon.rs similarity index 100% rename from library/std/src/sys/unix/process/zircon.rs rename to library/std/src/sys/pal/unix/process/zircon.rs diff --git a/library/std/src/sys/unix/rand.rs b/library/std/src/sys/pal/unix/rand.rs similarity index 100% rename from library/std/src/sys/unix/rand.rs rename to library/std/src/sys/pal/unix/rand.rs diff --git a/library/std/src/sys/unix/stack_overflow.rs b/library/std/src/sys/pal/unix/stack_overflow.rs similarity index 99% rename from library/std/src/sys/unix/stack_overflow.rs rename to library/std/src/sys/pal/unix/stack_overflow.rs index 3dbab4cc4864..923637cbaf26 100644 --- a/library/std/src/sys/unix/stack_overflow.rs +++ b/library/std/src/sys/pal/unix/stack_overflow.rs @@ -55,7 +55,7 @@ mod imp { use libc::{MAP_ANON, MAP_PRIVATE, PROT_NONE, PROT_READ, PROT_WRITE, SIGSEGV}; use crate::sync::atomic::{AtomicBool, AtomicPtr, Ordering}; - use crate::sys::unix::os::page_size; + use crate::sys::pal::unix::os::page_size; use crate::sys_common::thread_info; // Signal handler for the SIGSEGV and SIGBUS handlers. We've got guard pages diff --git a/library/std/src/sys/unix/stdio.rs b/library/std/src/sys/pal/unix/stdio.rs similarity index 100% rename from library/std/src/sys/unix/stdio.rs rename to library/std/src/sys/pal/unix/stdio.rs diff --git a/library/std/src/sys/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs similarity index 100% rename from library/std/src/sys/unix/thread.rs rename to library/std/src/sys/pal/unix/thread.rs diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/pal/unix/thread_local_dtor.rs similarity index 100% rename from library/std/src/sys/unix/thread_local_dtor.rs rename to library/std/src/sys/pal/unix/thread_local_dtor.rs diff --git a/library/std/src/sys/unix/thread_local_key.rs b/library/std/src/sys/pal/unix/thread_local_key.rs similarity index 100% rename from library/std/src/sys/unix/thread_local_key.rs rename to library/std/src/sys/pal/unix/thread_local_key.rs diff --git a/library/std/src/sys/unix/thread_parking/darwin.rs b/library/std/src/sys/pal/unix/thread_parking/darwin.rs similarity index 100% rename from library/std/src/sys/unix/thread_parking/darwin.rs rename to library/std/src/sys/pal/unix/thread_parking/darwin.rs diff --git a/library/std/src/sys/unix/thread_parking/mod.rs b/library/std/src/sys/pal/unix/thread_parking/mod.rs similarity index 100% rename from library/std/src/sys/unix/thread_parking/mod.rs rename to library/std/src/sys/pal/unix/thread_parking/mod.rs diff --git a/library/std/src/sys/unix/thread_parking/netbsd.rs b/library/std/src/sys/pal/unix/thread_parking/netbsd.rs similarity index 100% rename from library/std/src/sys/unix/thread_parking/netbsd.rs rename to library/std/src/sys/pal/unix/thread_parking/netbsd.rs diff --git a/library/std/src/sys/unix/thread_parking/pthread.rs b/library/std/src/sys/pal/unix/thread_parking/pthread.rs similarity index 100% rename from library/std/src/sys/unix/thread_parking/pthread.rs rename to library/std/src/sys/pal/unix/thread_parking/pthread.rs diff --git a/library/std/src/sys/unix/time.rs b/library/std/src/sys/pal/unix/time.rs similarity index 100% rename from library/std/src/sys/unix/time.rs rename to library/std/src/sys/pal/unix/time.rs diff --git a/library/std/src/sys/unix/weak.rs b/library/std/src/sys/pal/unix/weak.rs similarity index 100% rename from library/std/src/sys/unix/weak.rs rename to library/std/src/sys/pal/unix/weak.rs diff --git a/library/std/src/sys/unsupported/alloc.rs b/library/std/src/sys/pal/unsupported/alloc.rs similarity index 100% rename from library/std/src/sys/unsupported/alloc.rs rename to library/std/src/sys/pal/unsupported/alloc.rs diff --git a/library/std/src/sys/unsupported/args.rs b/library/std/src/sys/pal/unsupported/args.rs similarity index 100% rename from library/std/src/sys/unsupported/args.rs rename to library/std/src/sys/pal/unsupported/args.rs diff --git a/library/std/src/sys/unsupported/common.rs b/library/std/src/sys/pal/unsupported/common.rs similarity index 100% rename from library/std/src/sys/unsupported/common.rs rename to library/std/src/sys/pal/unsupported/common.rs diff --git a/library/std/src/sys/unsupported/env.rs b/library/std/src/sys/pal/unsupported/env.rs similarity index 100% rename from library/std/src/sys/unsupported/env.rs rename to library/std/src/sys/pal/unsupported/env.rs diff --git a/library/std/src/sys/unsupported/fs.rs b/library/std/src/sys/pal/unsupported/fs.rs similarity index 100% rename from library/std/src/sys/unsupported/fs.rs rename to library/std/src/sys/pal/unsupported/fs.rs diff --git a/library/std/src/sys/unsupported/io.rs b/library/std/src/sys/pal/unsupported/io.rs similarity index 100% rename from library/std/src/sys/unsupported/io.rs rename to library/std/src/sys/pal/unsupported/io.rs diff --git a/library/std/src/sys/unsupported/locks/condvar.rs b/library/std/src/sys/pal/unsupported/locks/condvar.rs similarity index 100% rename from library/std/src/sys/unsupported/locks/condvar.rs rename to library/std/src/sys/pal/unsupported/locks/condvar.rs diff --git a/library/std/src/sys/unsupported/locks/mod.rs b/library/std/src/sys/pal/unsupported/locks/mod.rs similarity index 100% rename from library/std/src/sys/unsupported/locks/mod.rs rename to library/std/src/sys/pal/unsupported/locks/mod.rs diff --git a/library/std/src/sys/unsupported/locks/mutex.rs b/library/std/src/sys/pal/unsupported/locks/mutex.rs similarity index 100% rename from library/std/src/sys/unsupported/locks/mutex.rs rename to library/std/src/sys/pal/unsupported/locks/mutex.rs diff --git a/library/std/src/sys/unsupported/locks/rwlock.rs b/library/std/src/sys/pal/unsupported/locks/rwlock.rs similarity index 100% rename from library/std/src/sys/unsupported/locks/rwlock.rs rename to library/std/src/sys/pal/unsupported/locks/rwlock.rs diff --git a/library/std/src/sys/unsupported/mod.rs b/library/std/src/sys/pal/unsupported/mod.rs similarity index 100% rename from library/std/src/sys/unsupported/mod.rs rename to library/std/src/sys/pal/unsupported/mod.rs diff --git a/library/std/src/sys/unsupported/net.rs b/library/std/src/sys/pal/unsupported/net.rs similarity index 100% rename from library/std/src/sys/unsupported/net.rs rename to library/std/src/sys/pal/unsupported/net.rs diff --git a/library/std/src/sys/unsupported/once.rs b/library/std/src/sys/pal/unsupported/once.rs similarity index 100% rename from library/std/src/sys/unsupported/once.rs rename to library/std/src/sys/pal/unsupported/once.rs diff --git a/library/std/src/sys/unsupported/os.rs b/library/std/src/sys/pal/unsupported/os.rs similarity index 100% rename from library/std/src/sys/unsupported/os.rs rename to library/std/src/sys/pal/unsupported/os.rs diff --git a/library/std/src/sys/unsupported/pipe.rs b/library/std/src/sys/pal/unsupported/pipe.rs similarity index 100% rename from library/std/src/sys/unsupported/pipe.rs rename to library/std/src/sys/pal/unsupported/pipe.rs diff --git a/library/std/src/sys/unsupported/process.rs b/library/std/src/sys/pal/unsupported/process.rs similarity index 100% rename from library/std/src/sys/unsupported/process.rs rename to library/std/src/sys/pal/unsupported/process.rs diff --git a/library/std/src/sys/unsupported/stdio.rs b/library/std/src/sys/pal/unsupported/stdio.rs similarity index 100% rename from library/std/src/sys/unsupported/stdio.rs rename to library/std/src/sys/pal/unsupported/stdio.rs diff --git a/library/std/src/sys/unsupported/thread.rs b/library/std/src/sys/pal/unsupported/thread.rs similarity index 100% rename from library/std/src/sys/unsupported/thread.rs rename to library/std/src/sys/pal/unsupported/thread.rs diff --git a/library/std/src/sys/unsupported/thread_local_dtor.rs b/library/std/src/sys/pal/unsupported/thread_local_dtor.rs similarity index 100% rename from library/std/src/sys/unsupported/thread_local_dtor.rs rename to library/std/src/sys/pal/unsupported/thread_local_dtor.rs diff --git a/library/std/src/sys/unsupported/thread_local_key.rs b/library/std/src/sys/pal/unsupported/thread_local_key.rs similarity index 100% rename from library/std/src/sys/unsupported/thread_local_key.rs rename to library/std/src/sys/pal/unsupported/thread_local_key.rs diff --git a/library/std/src/sys/unsupported/thread_parking.rs b/library/std/src/sys/pal/unsupported/thread_parking.rs similarity index 100% rename from library/std/src/sys/unsupported/thread_parking.rs rename to library/std/src/sys/pal/unsupported/thread_parking.rs diff --git a/library/std/src/sys/unsupported/time.rs b/library/std/src/sys/pal/unsupported/time.rs similarity index 100% rename from library/std/src/sys/unsupported/time.rs rename to library/std/src/sys/pal/unsupported/time.rs diff --git a/library/std/src/sys/wasi/args.rs b/library/std/src/sys/pal/wasi/args.rs similarity index 100% rename from library/std/src/sys/wasi/args.rs rename to library/std/src/sys/pal/wasi/args.rs diff --git a/library/std/src/sys/wasi/env.rs b/library/std/src/sys/pal/wasi/env.rs similarity index 100% rename from library/std/src/sys/wasi/env.rs rename to library/std/src/sys/pal/wasi/env.rs diff --git a/library/std/src/sys/wasi/fd.rs b/library/std/src/sys/pal/wasi/fd.rs similarity index 100% rename from library/std/src/sys/wasi/fd.rs rename to library/std/src/sys/pal/wasi/fd.rs diff --git a/library/std/src/sys/wasi/fs.rs b/library/std/src/sys/pal/wasi/fs.rs similarity index 100% rename from library/std/src/sys/wasi/fs.rs rename to library/std/src/sys/pal/wasi/fs.rs diff --git a/library/std/src/sys/wasi/io.rs b/library/std/src/sys/pal/wasi/io.rs similarity index 100% rename from library/std/src/sys/wasi/io.rs rename to library/std/src/sys/pal/wasi/io.rs diff --git a/library/std/src/sys/wasi/mod.rs b/library/std/src/sys/pal/wasi/mod.rs similarity index 100% rename from library/std/src/sys/wasi/mod.rs rename to library/std/src/sys/pal/wasi/mod.rs diff --git a/library/std/src/sys/wasi/net.rs b/library/std/src/sys/pal/wasi/net.rs similarity index 100% rename from library/std/src/sys/wasi/net.rs rename to library/std/src/sys/pal/wasi/net.rs diff --git a/library/std/src/sys/wasi/os.rs b/library/std/src/sys/pal/wasi/os.rs similarity index 99% rename from library/std/src/sys/wasi/os.rs rename to library/std/src/sys/pal/wasi/os.rs index d53bddd8e9df..530d36021721 100644 --- a/library/std/src/sys/wasi/os.rs +++ b/library/std/src/sys/pal/wasi/os.rs @@ -209,7 +209,7 @@ pub fn env() -> Env { return Env { iter: result.into_iter() }; } - // See src/libstd/sys/unix/os.rs, same as that + // See src/libstd/sys/pal/unix/os.rs, same as that fn parse(input: &[u8]) -> Option<(OsString, OsString)> { if input.is_empty() { return None; diff --git a/library/std/src/sys/wasi/stdio.rs b/library/std/src/sys/pal/wasi/stdio.rs similarity index 100% rename from library/std/src/sys/wasi/stdio.rs rename to library/std/src/sys/pal/wasi/stdio.rs diff --git a/library/std/src/sys/wasi/thread.rs b/library/std/src/sys/pal/wasi/thread.rs similarity index 100% rename from library/std/src/sys/wasi/thread.rs rename to library/std/src/sys/pal/wasi/thread.rs diff --git a/library/std/src/sys/wasi/time.rs b/library/std/src/sys/pal/wasi/time.rs similarity index 100% rename from library/std/src/sys/wasi/time.rs rename to library/std/src/sys/pal/wasi/time.rs diff --git a/library/std/src/sys/wasm/alloc.rs b/library/std/src/sys/pal/wasm/alloc.rs similarity index 100% rename from library/std/src/sys/wasm/alloc.rs rename to library/std/src/sys/pal/wasm/alloc.rs diff --git a/library/std/src/sys/wasm/atomics/futex.rs b/library/std/src/sys/pal/wasm/atomics/futex.rs similarity index 100% rename from library/std/src/sys/wasm/atomics/futex.rs rename to library/std/src/sys/pal/wasm/atomics/futex.rs diff --git a/library/std/src/sys/wasm/atomics/thread.rs b/library/std/src/sys/pal/wasm/atomics/thread.rs similarity index 100% rename from library/std/src/sys/wasm/atomics/thread.rs rename to library/std/src/sys/pal/wasm/atomics/thread.rs diff --git a/library/std/src/sys/wasm/env.rs b/library/std/src/sys/pal/wasm/env.rs similarity index 100% rename from library/std/src/sys/wasm/env.rs rename to library/std/src/sys/pal/wasm/env.rs diff --git a/library/std/src/sys/wasm/mod.rs b/library/std/src/sys/pal/wasm/mod.rs similarity index 100% rename from library/std/src/sys/wasm/mod.rs rename to library/std/src/sys/pal/wasm/mod.rs diff --git a/library/std/src/sys/windows/alloc.rs b/library/std/src/sys/pal/windows/alloc.rs similarity index 100% rename from library/std/src/sys/windows/alloc.rs rename to library/std/src/sys/pal/windows/alloc.rs diff --git a/library/std/src/sys/windows/alloc/tests.rs b/library/std/src/sys/pal/windows/alloc/tests.rs similarity index 100% rename from library/std/src/sys/windows/alloc/tests.rs rename to library/std/src/sys/pal/windows/alloc/tests.rs diff --git a/library/std/src/sys/windows/api.rs b/library/std/src/sys/pal/windows/api.rs similarity index 98% rename from library/std/src/sys/windows/api.rs rename to library/std/src/sys/pal/windows/api.rs index a7ea59e85f78..90e1bff52a36 100644 --- a/library/std/src/sys/windows/api.rs +++ b/library/std/src/sys/pal/windows/api.rs @@ -27,7 +27,7 @@ //! This module must only depend on core and not on std types as the eventual //! hope is to have std depend on sys and not the other way around. //! However, some amount of glue code may currently be necessary so such code -//! should go in sys/windows/mod.rs rather than here. See `IoResult` as an example. +//! should go in sys/pal/windows/mod.rs rather than here. See `IoResult` as an example. use core::ffi::c_void; use core::ptr::addr_of; diff --git a/library/std/src/sys/windows/args.rs b/library/std/src/sys/pal/windows/args.rs similarity index 99% rename from library/std/src/sys/windows/args.rs rename to library/std/src/sys/pal/windows/args.rs index ee7dba6e5b36..fbbdbc212659 100644 --- a/library/std/src/sys/windows/args.rs +++ b/library/std/src/sys/pal/windows/args.rs @@ -6,6 +6,7 @@ #[cfg(test)] mod tests; +use super::os::current_exe; use crate::ffi::OsString; use crate::fmt; use crate::io; @@ -14,7 +15,6 @@ use crate::os::windows::prelude::*; use crate::path::{Path, PathBuf}; use crate::sys::path::get_long_path; use crate::sys::process::ensure_no_nuls; -use crate::sys::windows::os::current_exe; use crate::sys::{c, to_u16s}; use crate::sys_common::wstr::WStrUnits; use crate::vec; @@ -318,8 +318,8 @@ pub(crate) fn to_user_path(path: &Path) -> io::Result> { from_wide_to_user_path(to_u16s(path)?) } pub(crate) fn from_wide_to_user_path(mut path: Vec) -> io::Result> { + use super::fill_utf16_buf; use crate::ptr; - use crate::sys::windows::fill_utf16_buf; // UTF-16 encoded code points, used in parsing and building UTF-16 paths. // All of these are in the ASCII range so they can be cast directly to `u16`. diff --git a/library/std/src/sys/windows/args/tests.rs b/library/std/src/sys/pal/windows/args/tests.rs similarity index 99% rename from library/std/src/sys/windows/args/tests.rs rename to library/std/src/sys/pal/windows/args/tests.rs index 82c32d08c5ea..484a90ab056d 100644 --- a/library/std/src/sys/windows/args/tests.rs +++ b/library/std/src/sys/pal/windows/args/tests.rs @@ -1,5 +1,5 @@ +use super::*; use crate::ffi::OsString; -use crate::sys::windows::args::*; fn chk(string: &str, parts: &[&str]) { let mut wide: Vec = OsString::from(string).encode_wide().collect(); diff --git a/library/std/src/sys/windows/c.rs b/library/std/src/sys/pal/windows/c.rs similarity index 100% rename from library/std/src/sys/windows/c.rs rename to library/std/src/sys/pal/windows/c.rs diff --git a/library/std/src/sys/windows/c/windows_sys.lst b/library/std/src/sys/pal/windows/c/windows_sys.lst similarity index 100% rename from library/std/src/sys/windows/c/windows_sys.lst rename to library/std/src/sys/pal/windows/c/windows_sys.lst diff --git a/library/std/src/sys/windows/c/windows_sys.rs b/library/std/src/sys/pal/windows/c/windows_sys.rs similarity index 100% rename from library/std/src/sys/windows/c/windows_sys.rs rename to library/std/src/sys/pal/windows/c/windows_sys.rs diff --git a/library/std/src/sys/windows/cmath.rs b/library/std/src/sys/pal/windows/cmath.rs similarity index 100% rename from library/std/src/sys/windows/cmath.rs rename to library/std/src/sys/pal/windows/cmath.rs diff --git a/library/std/src/sys/windows/compat.rs b/library/std/src/sys/pal/windows/compat.rs similarity index 100% rename from library/std/src/sys/windows/compat.rs rename to library/std/src/sys/pal/windows/compat.rs diff --git a/library/std/src/sys/windows/env.rs b/library/std/src/sys/pal/windows/env.rs similarity index 100% rename from library/std/src/sys/windows/env.rs rename to library/std/src/sys/pal/windows/env.rs diff --git a/library/std/src/sys/windows/fs.rs b/library/std/src/sys/pal/windows/fs.rs similarity index 100% rename from library/std/src/sys/windows/fs.rs rename to library/std/src/sys/pal/windows/fs.rs diff --git a/library/std/src/sys/windows/handle.rs b/library/std/src/sys/pal/windows/handle.rs similarity index 100% rename from library/std/src/sys/windows/handle.rs rename to library/std/src/sys/pal/windows/handle.rs diff --git a/library/std/src/sys/windows/handle/tests.rs b/library/std/src/sys/pal/windows/handle/tests.rs similarity index 100% rename from library/std/src/sys/windows/handle/tests.rs rename to library/std/src/sys/pal/windows/handle/tests.rs diff --git a/library/std/src/sys/windows/io.rs b/library/std/src/sys/pal/windows/io.rs similarity index 100% rename from library/std/src/sys/windows/io.rs rename to library/std/src/sys/pal/windows/io.rs diff --git a/library/std/src/sys/windows/locks/condvar.rs b/library/std/src/sys/pal/windows/locks/condvar.rs similarity index 95% rename from library/std/src/sys/windows/locks/condvar.rs rename to library/std/src/sys/pal/windows/locks/condvar.rs index 66fafa2c00b0..953bcc27dee0 100644 --- a/library/std/src/sys/windows/locks/condvar.rs +++ b/library/std/src/sys/pal/windows/locks/condvar.rs @@ -27,7 +27,7 @@ impl Condvar { let r = c::SleepConditionVariableSRW( self.inner.get(), mutex::raw(mutex), - crate::sys::windows::dur2timeout(dur), + crate::sys::pal::windows::dur2timeout(dur), 0, ); if r == 0 { diff --git a/library/std/src/sys/windows/locks/mod.rs b/library/std/src/sys/pal/windows/locks/mod.rs similarity index 100% rename from library/std/src/sys/windows/locks/mod.rs rename to library/std/src/sys/pal/windows/locks/mod.rs diff --git a/library/std/src/sys/windows/locks/mutex.rs b/library/std/src/sys/pal/windows/locks/mutex.rs similarity index 100% rename from library/std/src/sys/windows/locks/mutex.rs rename to library/std/src/sys/pal/windows/locks/mutex.rs diff --git a/library/std/src/sys/windows/locks/rwlock.rs b/library/std/src/sys/pal/windows/locks/rwlock.rs similarity index 100% rename from library/std/src/sys/windows/locks/rwlock.rs rename to library/std/src/sys/pal/windows/locks/rwlock.rs diff --git a/library/std/src/sys/windows/memchr.rs b/library/std/src/sys/pal/windows/memchr.rs similarity index 100% rename from library/std/src/sys/windows/memchr.rs rename to library/std/src/sys/pal/windows/memchr.rs diff --git a/library/std/src/sys/windows/mod.rs b/library/std/src/sys/pal/windows/mod.rs similarity index 100% rename from library/std/src/sys/windows/mod.rs rename to library/std/src/sys/pal/windows/mod.rs diff --git a/library/std/src/sys/windows/net.rs b/library/std/src/sys/pal/windows/net.rs similarity index 99% rename from library/std/src/sys/windows/net.rs rename to library/std/src/sys/pal/windows/net.rs index 6cd758ec5c32..c34e01e000ac 100644 --- a/library/std/src/sys/windows/net.rs +++ b/library/std/src/sys/pal/windows/net.rs @@ -90,7 +90,7 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> { if err == 0 { Ok(()) } else { Err(last_error()) } } -/// Just to provide the same interface as sys/unix/net.rs +/// Just to provide the same interface as sys/pal/unix/net.rs pub fn cvt_r(mut f: F) -> io::Result where T: IsMinusOne, diff --git a/library/std/src/sys/windows/os.rs b/library/std/src/sys/pal/windows/os.rs similarity index 100% rename from library/std/src/sys/windows/os.rs rename to library/std/src/sys/pal/windows/os.rs diff --git a/library/std/src/sys/windows/os/tests.rs b/library/std/src/sys/pal/windows/os/tests.rs similarity index 100% rename from library/std/src/sys/windows/os/tests.rs rename to library/std/src/sys/pal/windows/os/tests.rs diff --git a/library/std/src/sys/windows/os_str.rs b/library/std/src/sys/pal/windows/os_str.rs similarity index 100% rename from library/std/src/sys/windows/os_str.rs rename to library/std/src/sys/pal/windows/os_str.rs diff --git a/library/std/src/sys/windows/path.rs b/library/std/src/sys/pal/windows/path.rs similarity index 100% rename from library/std/src/sys/windows/path.rs rename to library/std/src/sys/pal/windows/path.rs diff --git a/library/std/src/sys/windows/path/tests.rs b/library/std/src/sys/pal/windows/path/tests.rs similarity index 100% rename from library/std/src/sys/windows/path/tests.rs rename to library/std/src/sys/pal/windows/path/tests.rs diff --git a/library/std/src/sys/windows/pipe.rs b/library/std/src/sys/pal/windows/pipe.rs similarity index 100% rename from library/std/src/sys/windows/pipe.rs rename to library/std/src/sys/pal/windows/pipe.rs diff --git a/library/std/src/sys/windows/process.rs b/library/std/src/sys/pal/windows/process.rs similarity index 100% rename from library/std/src/sys/windows/process.rs rename to library/std/src/sys/pal/windows/process.rs diff --git a/library/std/src/sys/windows/process/tests.rs b/library/std/src/sys/pal/windows/process/tests.rs similarity index 100% rename from library/std/src/sys/windows/process/tests.rs rename to library/std/src/sys/pal/windows/process/tests.rs diff --git a/library/std/src/sys/windows/rand.rs b/library/std/src/sys/pal/windows/rand.rs similarity index 100% rename from library/std/src/sys/windows/rand.rs rename to library/std/src/sys/pal/windows/rand.rs diff --git a/library/std/src/sys/windows/stack_overflow.rs b/library/std/src/sys/pal/windows/stack_overflow.rs similarity index 100% rename from library/std/src/sys/windows/stack_overflow.rs rename to library/std/src/sys/pal/windows/stack_overflow.rs diff --git a/library/std/src/sys/windows/stack_overflow_uwp.rs b/library/std/src/sys/pal/windows/stack_overflow_uwp.rs similarity index 100% rename from library/std/src/sys/windows/stack_overflow_uwp.rs rename to library/std/src/sys/pal/windows/stack_overflow_uwp.rs diff --git a/library/std/src/sys/windows/stdio.rs b/library/std/src/sys/pal/windows/stdio.rs similarity index 99% rename from library/std/src/sys/windows/stdio.rs rename to library/std/src/sys/pal/windows/stdio.rs index 819a48266d94..96c23f82aec2 100644 --- a/library/std/src/sys/windows/stdio.rs +++ b/library/std/src/sys/pal/windows/stdio.rs @@ -1,5 +1,6 @@ #![unstable(issue = "none", feature = "windows_stdio")] +use super::api; use crate::cmp; use crate::io; use crate::mem::MaybeUninit; @@ -9,7 +10,6 @@ use crate::str; use crate::sys::c; use crate::sys::cvt; use crate::sys::handle::Handle; -use crate::sys::windows::api; use core::str::utf8_char_width; #[cfg(test)] diff --git a/library/std/src/sys/windows/stdio/tests.rs b/library/std/src/sys/pal/windows/stdio/tests.rs similarity index 100% rename from library/std/src/sys/windows/stdio/tests.rs rename to library/std/src/sys/pal/windows/stdio/tests.rs diff --git a/library/std/src/sys/windows/thread.rs b/library/std/src/sys/pal/windows/thread.rs similarity index 100% rename from library/std/src/sys/windows/thread.rs rename to library/std/src/sys/pal/windows/thread.rs diff --git a/library/std/src/sys/windows/thread_local_dtor.rs b/library/std/src/sys/pal/windows/thread_local_dtor.rs similarity index 100% rename from library/std/src/sys/windows/thread_local_dtor.rs rename to library/std/src/sys/pal/windows/thread_local_dtor.rs diff --git a/library/std/src/sys/windows/thread_local_key.rs b/library/std/src/sys/pal/windows/thread_local_key.rs similarity index 100% rename from library/std/src/sys/windows/thread_local_key.rs rename to library/std/src/sys/pal/windows/thread_local_key.rs diff --git a/library/std/src/sys/windows/thread_local_key/tests.rs b/library/std/src/sys/pal/windows/thread_local_key/tests.rs similarity index 100% rename from library/std/src/sys/windows/thread_local_key/tests.rs rename to library/std/src/sys/pal/windows/thread_local_key/tests.rs diff --git a/library/std/src/sys/windows/thread_parking.rs b/library/std/src/sys/pal/windows/thread_parking.rs similarity index 100% rename from library/std/src/sys/windows/thread_parking.rs rename to library/std/src/sys/pal/windows/thread_parking.rs diff --git a/library/std/src/sys/windows/time.rs b/library/std/src/sys/pal/windows/time.rs similarity index 100% rename from library/std/src/sys/windows/time.rs rename to library/std/src/sys/pal/windows/time.rs diff --git a/library/std/src/sys/xous/alloc.rs b/library/std/src/sys/pal/xous/alloc.rs similarity index 100% rename from library/std/src/sys/xous/alloc.rs rename to library/std/src/sys/pal/xous/alloc.rs diff --git a/library/std/src/sys/xous/locks/condvar.rs b/library/std/src/sys/pal/xous/locks/condvar.rs similarity index 100% rename from library/std/src/sys/xous/locks/condvar.rs rename to library/std/src/sys/pal/xous/locks/condvar.rs diff --git a/library/std/src/sys/xous/locks/mod.rs b/library/std/src/sys/pal/xous/locks/mod.rs similarity index 100% rename from library/std/src/sys/xous/locks/mod.rs rename to library/std/src/sys/pal/xous/locks/mod.rs diff --git a/library/std/src/sys/xous/locks/mutex.rs b/library/std/src/sys/pal/xous/locks/mutex.rs similarity index 100% rename from library/std/src/sys/xous/locks/mutex.rs rename to library/std/src/sys/pal/xous/locks/mutex.rs diff --git a/library/std/src/sys/xous/locks/rwlock.rs b/library/std/src/sys/pal/xous/locks/rwlock.rs similarity index 100% rename from library/std/src/sys/xous/locks/rwlock.rs rename to library/std/src/sys/pal/xous/locks/rwlock.rs diff --git a/library/std/src/sys/xous/mod.rs b/library/std/src/sys/pal/xous/mod.rs similarity index 100% rename from library/std/src/sys/xous/mod.rs rename to library/std/src/sys/pal/xous/mod.rs diff --git a/library/std/src/sys/xous/os.rs b/library/std/src/sys/pal/xous/os.rs similarity index 100% rename from library/std/src/sys/xous/os.rs rename to library/std/src/sys/pal/xous/os.rs diff --git a/library/std/src/sys/xous/stdio.rs b/library/std/src/sys/pal/xous/stdio.rs similarity index 100% rename from library/std/src/sys/xous/stdio.rs rename to library/std/src/sys/pal/xous/stdio.rs diff --git a/library/std/src/sys/xous/thread.rs b/library/std/src/sys/pal/xous/thread.rs similarity index 100% rename from library/std/src/sys/xous/thread.rs rename to library/std/src/sys/pal/xous/thread.rs diff --git a/library/std/src/sys/xous/thread_local_key.rs b/library/std/src/sys/pal/xous/thread_local_key.rs similarity index 100% rename from library/std/src/sys/xous/thread_local_key.rs rename to library/std/src/sys/pal/xous/thread_local_key.rs diff --git a/library/std/src/sys/xous/thread_parking.rs b/library/std/src/sys/pal/xous/thread_parking.rs similarity index 100% rename from library/std/src/sys/xous/thread_parking.rs rename to library/std/src/sys/pal/xous/thread_parking.rs diff --git a/library/std/src/sys/xous/time.rs b/library/std/src/sys/pal/xous/time.rs similarity index 100% rename from library/std/src/sys/xous/time.rs rename to library/std/src/sys/pal/xous/time.rs diff --git a/src/doc/rustc/src/platform-support/unknown-uefi.md b/src/doc/rustc/src/platform-support/unknown-uefi.md index 1230ea22bd99..8fb155e1ffa0 100644 --- a/src/doc/rustc/src/platform-support/unknown-uefi.md +++ b/src/doc/rustc/src/platform-support/unknown-uefi.md @@ -82,13 +82,29 @@ rustup target add x86_64-unknown-uefi cargo build --target x86_64-unknown-uefi ``` +### Building a driver + +There are three types of UEFI executables: application, boot service +driver, and runtime driver. All of Rust's UEFI targets default to +producing applications. To build a driver instead, pass a +[`subsystem`][linker-subsystem] linker flag with a value of +`efi_boot_service_driver` or `efi_runtime_driver`. + +Example: + +```toml +# In .cargo/config.toml: +[build] +rustflags = ["-C", "link-args=/subsystem:efi_runtime_driver"] +``` + ## Testing UEFI applications can be copied into the ESP on any UEFI system and executed via the firmware boot menu. The qemu suite allows emulating UEFI systems and executing UEFI applications as well. See its documentation for details. -The [uefi-run](https://github.com/Richard-W/uefi-run) rust tool is a simple +The [uefi-run] rust tool is a simple wrapper around `qemu` that can spawn UEFI applications in qemu. You can install it via `cargo install uefi-run` and execute qemu applications as `uefi-run ./application.efi`. @@ -132,19 +148,19 @@ have been developed to provide access to UEFI protocols and make UEFI programming more ergonomic in rust. The following list is a short overview (in alphabetical ordering): -- **efi**: *Ergonomic Rust bindings for writing UEFI applications*. Provides +- **[efi][efi-crate]**: *Ergonomic Rust bindings for writing UEFI applications*. Provides _rustified_ access to UEFI protocols, implements allocators and a safe environment to write UEFI applications. -- **r-efi**: *UEFI Reference Specification Protocol Constants and Definitions*. +- **[r-efi]**: *UEFI Reference Specification Protocol Constants and Definitions*. A pure transpose of the UEFI specification into rust. This provides the raw definitions from the specification, without any extended helpers or _rustification_. It serves as baseline to implement any more elaborate rust UEFI layers. -- **uefi-rs**: *Safe and easy-to-use wrapper for building UEFI apps*. An +- **[uefi-rs]**: *Safe and easy-to-use wrapper for building UEFI apps*. An elaborate library providing safe abstractions for UEFI protocols and features. It implements allocators and provides an execution environment to UEFI applications written in rust. -- **uefi-run**: *Run UEFI applications*. A small wrapper around _qemu_ to spawn +- **[uefi-run]**: *Run UEFI applications*. A small wrapper around _qemu_ to spawn UEFI applications in an emulated `x86_64` machine. ## Example: Freestanding @@ -311,3 +327,9 @@ pub fn main() { The current implementation of std makes `BootServices` unavailable once `ExitBootServices` is called. Refer to [Runtime Drivers](https://edk2-docs.gitbook.io/edk-ii-uefi-driver-writer-s-guide/7_driver_entry_point/711_runtime_drivers) for more information regarding how to handle switching from using physical addresses to using virtual addresses. Note: It should be noted that it is up to the user to drop all allocated memory before `ExitBootServices` is called. + +[efi-crate]: https://github.com/gurry/efi +[linker-subsystem]: https://learn.microsoft.com/en-us/cpp/build/reference/subsystem +[r-efi]: https://github.com/r-efi/r-efi +[uefi-rs]: https://github.com/rust-osdev/uefi-rs +[uefi-run]: https://github.com/Richard-W/uefi-run diff --git a/src/doc/unstable-book/src/compiler-flags/check-cfg.md b/src/doc/unstable-book/src/compiler-flags/check-cfg.md index e8fc2fe986e2..78bc8dceb782 100644 --- a/src/doc/unstable-book/src/compiler-flags/check-cfg.md +++ b/src/doc/unstable-book/src/compiler-flags/check-cfg.md @@ -36,12 +36,16 @@ present in the list of expected values. If `"value"` is not in it, then `rustc` *The command line `--cfg` arguments are currently *NOT* checked but may very well be checked in the future.* +To check for the _none_ value (ie `#[cfg(foo)]`) one can use the `none()` predicate inside +`values()`: `values(none())`. It can be followed or precessed by any number of `"value"`. + To enable checking of values, but to provide an *none*/empty set of expected values (ie. expect `#[cfg(name)]`), use these forms: ```bash rustc --check-cfg 'cfg(name)' rustc --check-cfg 'cfg(name, values())' +rustc --check-cfg 'cfg(name, values(none()))' ``` To enable checking of name but not values (i.e. unknown expected values), use this form: @@ -112,7 +116,7 @@ This table describe the equivalence of a `--cfg` argument to a `--check-cfg` arg | `--cfg` | `--check-cfg` | |-----------------------------|----------------------------------------------------------| | *nothing* | *nothing* or `--check-cfg=cfg()` (to enable the checking) | -| `--cfg foo` | `--check-cfg=cfg(foo) or --check-cfg=cfg(foo, values())` | +| `--cfg foo` | `--check-cfg=cfg(foo), --check-cfg=cfg(foo, values())` or `--check-cfg=cfg(foo, values(none()))` | | `--cfg foo=""` | `--check-cfg=cfg(foo, values(""))` | | `--cfg foo="bar"` | `--check-cfg=cfg(foo, values("bar"))` | | `--cfg foo="1" --cfg foo="2"` | `--check-cfg=cfg(foo, values("1", "2"))` | diff --git a/src/librustdoc/clean/blanket_impl.rs b/src/librustdoc/clean/blanket_impl.rs index 4da85885d67c..47cfe651e319 100644 --- a/src/librustdoc/clean/blanket_impl.rs +++ b/src/librustdoc/clean/blanket_impl.rs @@ -81,7 +81,6 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> { match infcx.evaluate_obligation(&obligation) { Ok(eval_result) if eval_result.may_apply() => {} Err(traits::OverflowError::Canonical) => {} - Err(traits::OverflowError::ErrorReporting) => {} _ => continue 'blanket_impls, } } diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 9c0a8634990b..124a2d9cba95 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1870,7 +1870,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T } TyKind::BareFn(barefn) => BareFunction(Box::new(clean_bare_fn_ty(barefn, cx))), // Rustdoc handles `TyKind::Err`s by turning them into `Type::Infer`s. - TyKind::Infer | TyKind::Err(_) | TyKind::Typeof(..) => Infer, + TyKind::Infer | TyKind::Err(_) | TyKind::Typeof(..) | TyKind::InferDelegation(..) => Infer, } } diff --git a/src/librustdoc/passes/check_custom_code_classes.rs b/src/librustdoc/passes/check_custom_code_classes.rs index 73f71cc062b3..451a44cd53a4 100644 --- a/src/librustdoc/passes/check_custom_code_classes.rs +++ b/src/librustdoc/passes/check_custom_code_classes.rs @@ -65,9 +65,10 @@ pub(crate) fn look_for_custom_classes<'tcx>(cx: &DocContext<'tcx>, item: &Item) if !tests.custom_classes_found.is_empty() { let span = item.attr_span(cx.tcx); - let sess = &cx.tcx.sess.parse_sess; - let mut err = - sess.dcx.struct_span_warn(span, "custom classes in code blocks will change behaviour"); + let sess = &cx.tcx.sess; + let mut err = sess + .dcx() + .struct_span_warn(span, "custom classes in code blocks will change behaviour"); add_feature_diagnostics_for_issue( &mut err, sess, diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index b843227d1871..dbff33dc1ecf 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -1223,7 +1223,7 @@ impl LinkCollector<'_, '_> { ) .unwrap_or_else(|| item.attr_span(self.cx.tcx)); rustc_session::parse::feature_err( - &self.cx.tcx.sess.parse_sess, + &self.cx.tcx.sess, sym::intra_doc_pointers, span, "linking to associated items of raw pointers is experimental", diff --git a/src/tools/clippy/clippy_lints/src/dereference.rs b/src/tools/clippy/clippy_lints/src/dereference.rs index aaef163ad554..8ff54dfcfa0d 100644 --- a/src/tools/clippy/clippy_lints/src/dereference.rs +++ b/src/tools/clippy/clippy_lints/src/dereference.rs @@ -830,6 +830,7 @@ impl TyCoercionStability { | TyKind::Infer | TyKind::Typeof(..) | TyKind::TraitObject(..) + | TyKind::InferDelegation(..) | TyKind::Err(_) => Self::Reborrow, }; } diff --git a/src/tools/clippy/clippy_utils/src/hir_utils.rs b/src/tools/clippy/clippy_utils/src/hir_utils.rs index 07b72e3f570b..482eaed77d1d 100644 --- a/src/tools/clippy/clippy_utils/src/hir_utils.rs +++ b/src/tools/clippy/clippy_utils/src/hir_utils.rs @@ -1108,7 +1108,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> { TyKind::Typeof(anon_const) => { self.hash_body(anon_const.body); }, - TyKind::Err(_) | TyKind::Infer | TyKind::Never => {}, + TyKind::Err(_) | TyKind::Infer | TyKind::Never | TyKind::InferDelegation(..) => {}, } } diff --git a/src/tools/generate-windows-sys/src/main.rs b/src/tools/generate-windows-sys/src/main.rs index dff2c5e467af..dc95d969aede 100644 --- a/src/tools/generate-windows-sys/src/main.rs +++ b/src/tools/generate-windows-sys/src/main.rs @@ -16,7 +16,7 @@ const PRELUDE: &str = r#"// This file is autogenerated. fn main() -> Result<(), Box> { let mut path: PathBuf = env::args_os().nth(1).expect("a path to the rust repository is required").into(); - path.push("library/std/src/sys/windows/c"); + path.push("library/std/src/sys/pal/windows/c"); env::set_current_dir(&path)?; let info = windows_bindgen::bindgen(["--etc", "windows_sys.lst"])?; diff --git a/src/tools/miri/rust-version b/src/tools/miri/rust-version index ebc704f785f5..ad3a534b7ed0 100644 --- a/src/tools/miri/rust-version +++ b/src/tools/miri/rust-version @@ -1 +1 @@ -f1f8687b06a5908dd096f51da32347b3313279db +3deb9bbf84f6431ebcbb7cbdbe3d89bc2636bc1b diff --git a/src/tools/miri/src/helpers.rs b/src/tools/miri/src/helpers.rs index 14ba69b898b1..6423ce0b79ac 100644 --- a/src/tools/miri/src/helpers.rs +++ b/src/tools/miri/src/helpers.rs @@ -25,7 +25,7 @@ use rand::RngCore; use crate::*; // This mapping should match `decode_error_kind` in -// . +// . const UNIX_IO_ERROR_TABLE: &[(&str, std::io::ErrorKind)] = { use std::io::ErrorKind::*; &[ @@ -217,7 +217,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { /// Helper function to get a `windows` constant as a `Scalar`. fn eval_windows(&self, module: &str, name: &str) -> Scalar { - self.eval_context_ref().eval_path_scalar(&["std", "sys", "windows", module, name]) + self.eval_context_ref().eval_path_scalar(&["std", "sys", "pal", "windows", module, name]) } /// Helper function to get a `windows` constant as a `u32`. @@ -249,7 +249,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { fn windows_ty_layout(&self, name: &str) -> TyAndLayout<'tcx> { let this = self.eval_context_ref(); let ty = this - .resolve_path(&["std", "sys", "windows", "c", name], Namespace::TypeNS) + .resolve_path(&["std", "sys", "pal", "windows", "c", name], Namespace::TypeNS) .ty(*this.tcx, ty::ParamEnv::reveal_all()); this.layout_of(ty).unwrap() } diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs index e7b2a6823ed6..a002f2aad057 100644 --- a/src/tools/miri/src/shims/foreign_items.rs +++ b/src/tools/miri/src/shims/foreign_items.rs @@ -342,7 +342,7 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { /// Returns the minimum alignment for the target architecture for allocations of the given size. fn min_align(&self, size: u64, kind: MiriMemoryKind) -> Align { let this = self.eval_context_ref(); - // List taken from `library/std/src/sys/common/alloc.rs`. + // List taken from `library/std/src/sys/pal/common/alloc.rs`. // This list should be kept in sync with the one from libstd. let min_align = match this.tcx.sess.target.arch.as_ref() { "x86" | "arm" | "mips" | "mips32r6" | "powerpc" | "powerpc64" | "wasm32" => 8, diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index 074808b11227..8bed321e6551 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -192,13 +192,13 @@ regexes! { // erase thread caller ids r"call [0-9]+" => "call ID", // erase platform module paths - "sys::[a-z]+::" => "sys::PLATFORM::", + "sys::pal::[a-z]+::" => "sys::pal::PLATFORM::", // Windows file paths r"\\" => "/", // erase Rust stdlib path "[^ \n`]*/(rust[^/]*|checkout)/library/" => "RUSTLIB/", // erase platform file paths - "sys/[a-z]+/" => "sys/PLATFORM/", + "sys/pal/[a-z]+/" => "sys/pal/PLATFORM/", // erase paths into the crate registry r"[^ ]*/\.?cargo/registry/.*/(.*\.rs)" => "CARGO_REGISTRY/.../$1", } diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr index 651c2eba0d9d..19bfe56395e0 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: trying to join a detached thread - --> RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread @@ -7,7 +7,7 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: - = note: inside `std::sys::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/PLATFORM/thread.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC = note: inside `std::thread::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/mod.rs:LL:CC note: inside `main` diff --git a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr index de76e925c11c..7006b96ee1e6 100644 --- a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr +++ b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr @@ -1,5 +1,5 @@ error: Undefined Behavior: deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation - --> RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/alloc.rs:LL:CC | LL | FREE(); | ^ deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation @@ -7,7 +7,7 @@ LL | FREE(); = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE: - = note: inside `std::sys::PLATFORM::alloc::::dealloc` at RUSTLIB/std/src/sys/PLATFORM/alloc.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::alloc::::dealloc` at RUSTLIB/std/src/sys/pal/PLATFORM/alloc.rs:LL:CC = note: inside `::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC note: inside `main` --> $DIR/global_system_mixup.rs:LL:CC diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr index 2be02100a35f..bccd532faca9 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr @@ -6,12 +6,12 @@ panic in a function that cannot unwind stack backtrace: thread caused non-unwinding panic. aborting. error: abnormal termination: the program aborted execution - --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC | LL | ABORT(); | ^ the program aborted execution | - = note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr index 2be02100a35f..bccd532faca9 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr @@ -6,12 +6,12 @@ panic in a function that cannot unwind stack backtrace: thread caused non-unwinding panic. aborting. error: abnormal termination: the program aborted execution - --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC | LL | ABORT(); | ^ the program aborted execution | - = note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC diff --git a/src/tools/miri/tests/fail/intrinsics/uninit_uninhabited_type.stderr b/src/tools/miri/tests/fail/intrinsics/uninit_uninhabited_type.stderr index 2196673c39ae..5d4ea011581c 100644 --- a/src/tools/miri/tests/fail/intrinsics/uninit_uninhabited_type.stderr +++ b/src/tools/miri/tests/fail/intrinsics/uninit_uninhabited_type.stderr @@ -3,12 +3,12 @@ aborted execution: attempted to instantiate uninhabited type `!` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread caused non-unwinding panic. aborting. error: abnormal termination: the program aborted execution - --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC | LL | ABORT(); | ^ the program aborted execution | - = note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC diff --git a/src/tools/miri/tests/fail/intrinsics/zero_fn_ptr.stderr b/src/tools/miri/tests/fail/intrinsics/zero_fn_ptr.stderr index 90ba5995cee6..935e79dfd8d3 100644 --- a/src/tools/miri/tests/fail/intrinsics/zero_fn_ptr.stderr +++ b/src/tools/miri/tests/fail/intrinsics/zero_fn_ptr.stderr @@ -3,12 +3,12 @@ aborted execution: attempted to zero-initialize type `fn()`, which is invalid note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread caused non-unwinding panic. aborting. error: abnormal termination: the program aborted execution - --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC | LL | ABORT(); | ^ the program aborted execution | - = note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC diff --git a/src/tools/miri/tests/fail/panic/double_panic.stderr b/src/tools/miri/tests/fail/panic/double_panic.stderr index 75ca0901bc82..2eb9354a4d04 100644 --- a/src/tools/miri/tests/fail/panic/double_panic.stderr +++ b/src/tools/miri/tests/fail/panic/double_panic.stderr @@ -8,12 +8,12 @@ thread 'main' panicked at RUSTLIB/core/src/panicking.rs:LL:CC: panic in a destructor during cleanup thread caused non-unwinding panic. aborting. error: abnormal termination: the program aborted execution - --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC | LL | ABORT(); | ^ the program aborted execution | - = note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC diff --git a/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr index e1b180008667..ec670c4a391e 100644 --- a/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr +++ b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr @@ -1,5 +1,5 @@ error: unsupported operation: `open` not available when isolation is enabled - --> RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC | LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `open` not available when isolation is enabled @@ -7,13 +7,13 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a = help: pass the flag `-Zmiri-disable-isolation` to disable isolation; = help: or pass `-Zmiri-isolation-error=warn` to configure Miri to return an error code from isolated operations (if supported for that operation) and continue with a warning = note: BACKTRACE: - = note: inside closure at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC - = note: inside `std::sys::PLATFORM::cvt_r::` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC - = note: inside `std::sys::PLATFORM::fs::File::open_c` at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC - = note: inside `std::sys::PLATFORM::small_c_string::run_with_cstr::` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::PLATFORM::small_c_string::run_path_with_cstr::` at RUSTLIB/std/src/sys/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::PLATFORM::fs::File::open` at RUSTLIB/std/src/sys/PLATFORM/fs.rs:LL:CC + = note: inside closure at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::cvt_r::` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::fs::File::open_c` at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC + = note: inside closure at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::fs::File::open` at RUSTLIB/std/src/sys/pal/PLATFORM/fs.rs:LL:CC = note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC = note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC = note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC diff --git a/src/tools/miri/tests/fail/terminate-terminator.stderr b/src/tools/miri/tests/fail/terminate-terminator.stderr index be66bad6fc35..44c04b3ae930 100644 --- a/src/tools/miri/tests/fail/terminate-terminator.stderr +++ b/src/tools/miri/tests/fail/terminate-terminator.stderr @@ -8,12 +8,12 @@ panic in a function that cannot unwind stack backtrace: thread caused non-unwinding panic. aborting. error: abnormal termination: the program aborted execution - --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC | LL | ABORT(); | ^ the program aborted execution | - = note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC diff --git a/src/tools/miri/tests/fail/unwind-action-terminate.stderr b/src/tools/miri/tests/fail/unwind-action-terminate.stderr index a7543df340df..adb2967feaf5 100644 --- a/src/tools/miri/tests/fail/unwind-action-terminate.stderr +++ b/src/tools/miri/tests/fail/unwind-action-terminate.stderr @@ -6,12 +6,12 @@ panic in a function that cannot unwind stack backtrace: thread caused non-unwinding panic. aborting. error: abnormal termination: the program aborted execution - --> RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + --> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC | LL | ABORT(); | ^ the program aborted execution | - = note: inside `std::sys::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/PLATFORM/mod.rs:LL:CC + = note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC = note: inside `std::panicking::rust_panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC = note: inside `std::sys_common::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::begin_panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC diff --git a/src/tools/rustfmt/src/items.rs b/src/tools/rustfmt/src/items.rs index 6fb69d6b8839..b57be8c10549 100644 --- a/src/tools/rustfmt/src/items.rs +++ b/src/tools/rustfmt/src/items.rs @@ -728,7 +728,9 @@ impl<'a> FmtVisitor<'a> { (Const(..), Const(..)) | (MacCall(..), MacCall(..)) => { a.ident.as_str().cmp(b.ident.as_str()) } - (Fn(..), Fn(..)) => a.span.lo().cmp(&b.span.lo()), + (Fn(..), Fn(..)) | (Delegation(..), Delegation(..)) => { + a.span.lo().cmp(&b.span.lo()) + } (Type(ty), _) if is_type(&ty.ty) => Ordering::Less, (_, Type(ty)) if is_type(&ty.ty) => Ordering::Greater, (Type(..), _) => Ordering::Less, @@ -737,6 +739,8 @@ impl<'a> FmtVisitor<'a> { (_, Const(..)) => Ordering::Greater, (MacCall(..), _) => Ordering::Less, (_, MacCall(..)) => Ordering::Greater, + (Delegation(..), _) => Ordering::Less, + (_, Delegation(..)) => Ordering::Greater, }); let mut prev_kind = None; for (buf, item) in buffer { diff --git a/src/tools/rustfmt/src/visitor.rs b/src/tools/rustfmt/src/visitor.rs index f4d84d1381fc..bc5accefd92b 100644 --- a/src/tools/rustfmt/src/visitor.rs +++ b/src/tools/rustfmt/src/visitor.rs @@ -592,6 +592,11 @@ impl<'b, 'a: 'b> FmtVisitor<'a> { ); self.push_rewrite(item.span, rewrite); } + ast::ItemKind::Delegation(..) => { + // TODO: rewrite delegation items once syntax is established. + // For now, leave the contents of the Span unformatted. + self.push_rewrite(item.span, None) + } }; } self.skip_context = skip_context_saved; diff --git a/src/tools/tidy/src/pal.rs b/src/tools/tidy/src/pal.rs index 5f6b63a67fda..7e5656926abe 100644 --- a/src/tools/tidy/src/pal.rs +++ b/src/tools/tidy/src/pal.rs @@ -46,8 +46,8 @@ const EXCEPTION_PATHS: &[&str] = &[ // we must use `#[cfg(windows)]` to conditionally compile the // correct `VaList` structure for windows. "library/core/src/ffi/mod.rs", - "library/std/src/sys/", // Platform-specific code for std lives here. - "library/std/src/os", // Platform-specific public interfaces + "library/std/src/sys", // Platform-specific code for std lives here. + "library/std/src/os", // Platform-specific public interfaces // Temporary `std` exceptions // FIXME: platform-specific code should be moved to `sys` "library/std/src/io/copy.rs", diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs index ba569078f3dd..95cf9f8cb13a 100644 --- a/src/tools/tidy/src/ui_tests.rs +++ b/src/tools/tidy/src/ui_tests.rs @@ -11,7 +11,7 @@ use std::path::{Path, PathBuf}; const ENTRY_LIMIT: usize = 900; // FIXME: The following limits should be reduced eventually. const ISSUES_ENTRY_LIMIT: usize = 1849; -const ROOT_ENTRY_LIMIT: usize = 869; +const ROOT_ENTRY_LIMIT: usize = 870; const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs", // test source files diff --git a/tests/debuginfo/mutex.rs b/tests/debuginfo/mutex.rs index 61ec6a81243d..7a58c5c2224b 100644 --- a/tests/debuginfo/mutex.rs +++ b/tests/debuginfo/mutex.rs @@ -10,7 +10,7 @@ // // cdb-command:dx m,d // cdb-check:m,d [Type: std::sync::mutex::Mutex] -// cdb-check: [...] inner [Type: std::sys::windows::locks::mutex::Mutex] +// cdb-check: [...] inner [Type: std::sys::pal::windows::locks::mutex::Mutex] // cdb-check: [...] poison [Type: std::sync::poison::Flag] // cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell] diff --git a/tests/debuginfo/rwlock-read.rs b/tests/debuginfo/rwlock-read.rs index bc42f92f053d..4ed1ebd0b37c 100644 --- a/tests/debuginfo/rwlock-read.rs +++ b/tests/debuginfo/rwlock-read.rs @@ -16,7 +16,7 @@ // cdb-command:dx r // cdb-check:r [Type: std::sync::rwlock::RwLockReadGuard] // cdb-check: [...] data : NonNull([...]: 0) [Type: core::ptr::non_null::NonNull] -// cdb-check: [...] inner_lock : [...] [Type: std::sys::windows::locks::rwlock::RwLock *] +// cdb-check: [...] inner_lock : [...] [Type: std::sys::pal::windows::locks::rwlock::RwLock *] #[allow(unused_variables)] diff --git a/tests/pretty/delegation.rs b/tests/pretty/delegation.rs new file mode 100644 index 000000000000..6a46437f7d63 --- /dev/null +++ b/tests/pretty/delegation.rs @@ -0,0 +1,25 @@ +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +// pp-exact + +trait Trait { + fn bar(&self, x: i32) -> i32 { x } +} + +struct F; +impl Trait for F {} + +struct S(F); +impl Trait for S { + reuse Trait::bar { &self.0 } +} + +mod to_reuse { + pub fn foo() {} +} + +#[inline] +pub reuse to_reuse::foo; + +fn main() {} diff --git a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs index 99263a944f81..1e7cdfc9ba7a 100644 --- a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs +++ b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.rs @@ -6,6 +6,7 @@ //~^^^ WARNING custom classes in code blocks will change behaviour //~| NOTE found these custom classes: class=language-c //~| NOTE see issue #79483 +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date //~| HELP add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable pub struct Bar; diff --git a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr index 1a2360d9b300..822806997c26 100644 --- a/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr +++ b/tests/rustdoc-ui/feature-gate-custom_code_classes_in_docs.stderr @@ -8,6 +8,7 @@ LL | | /// ``` | = note: see issue #79483 for more information = help: add `#![feature(custom_code_classes_in_docs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: found these custom classes: class=language-c warning: 1 warning emitted diff --git a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr b/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr index 0b982cd9fd3d..55135986ffe7 100644 --- a/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr +++ b/tests/rustdoc-ui/feature-gate-doc_cfg_hide.stderr @@ -6,6 +6,7 @@ LL | #![doc(cfg_hide(test))] | = note: see issue #43781 for more information = help: add `#![feature(doc_cfg_hide)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr b/tests/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr index 2c946ed48db1..1245bc15bb09 100644 --- a/tests/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr +++ b/tests/rustdoc-ui/intra-doc/feature-gate-intra-doc-pointers.stderr @@ -6,6 +6,7 @@ LL | //! [pointer::add] | = note: see issue #80896 for more information = help: add `#![feature(intra_doc_pointers)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: rustdoc does not allow disambiguating between `*const` and `*mut`, and pointers are unstable until it does error[E0658]: linking to associated items of raw pointers is experimental @@ -16,6 +17,7 @@ LL | //! [pointer::wrapping_add] | = note: see issue #80896 for more information = help: add `#![feature(intra_doc_pointers)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: rustdoc does not allow disambiguating between `*const` and `*mut`, and pointers are unstable until it does error: aborting due to 2 previous errors diff --git a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs index ce94a06c39ea..832f129fab2d 100644 --- a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs +++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs @@ -5,3 +5,4 @@ //~^ ERROR unknown lint //~| NOTE lint is unstable //~| NOTE see issue +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr index f188240062db..67540949f4d7 100644 --- a/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr +++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr @@ -7,6 +7,7 @@ LL | #![allow(rustdoc::missing_doc_code_examples)] = note: the `rustdoc::missing_doc_code_examples` lint is unstable = note: see issue #101730 for more information = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date note: the lint level is defined here --> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:2:9 | diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.rs b/tests/ui-fulldeps/hash-stable-is-unstable.rs index 37d7472ec609..ab18f2c6415e 100644 --- a/tests/ui-fulldeps/hash-stable-is-unstable.rs +++ b/tests/ui-fulldeps/hash-stable-is-unstable.rs @@ -1,16 +1,31 @@ +// ignore-stage1 // compile-flags: -Zdeduplicate-diagnostics=yes extern crate rustc_data_structures; //~^ use of unstable library feature 'rustc_private' +//~| NOTE: issue #27812 for more information +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date extern crate rustc_macros; //~^ use of unstable library feature 'rustc_private' +//~| NOTE: see issue #27812 for more information +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date extern crate rustc_query_system; //~^ use of unstable library feature 'rustc_private' +//~| NOTE: see issue #27812 for more information +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date use rustc_macros::HashStable; //~^ use of unstable library feature 'rustc_private' +//~| NOTE: see issue #27812 for more information +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date #[derive(HashStable)] //~^ use of unstable library feature 'rustc_private' +//~| NOTE: in this expansion of #[derive(HashStable)] +//~| NOTE: in this expansion of #[derive(HashStable)] +//~| NOTE: in this expansion of #[derive(HashStable)] +//~| NOTE: in this expansion of #[derive(HashStable)] +//~| NOTE: see issue #27812 for more information +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date struct Test; fn main() {} diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.stderr b/tests/ui-fulldeps/hash-stable-is-unstable.stderr index 1a8994d722ea..818bdaedccad 100644 --- a/tests/ui-fulldeps/hash-stable-is-unstable.stderr +++ b/tests/ui-fulldeps/hash-stable-is-unstable.stderr @@ -1,47 +1,52 @@ error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? - --> $DIR/hash-stable-is-unstable.rs:2:1 + --> $DIR/hash-stable-is-unstable.rs:3:1 | LL | extern crate rustc_data_structures; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? - --> $DIR/hash-stable-is-unstable.rs:4:1 + --> $DIR/hash-stable-is-unstable.rs:7:1 | LL | extern crate rustc_macros; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? - --> $DIR/hash-stable-is-unstable.rs:6:1 + --> $DIR/hash-stable-is-unstable.rs:11:1 | LL | extern crate rustc_query_system; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? - --> $DIR/hash-stable-is-unstable.rs:9:5 + --> $DIR/hash-stable-is-unstable.rs:16:5 | LL | use rustc_macros::HashStable; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? - --> $DIR/hash-stable-is-unstable.rs:12:10 + --> $DIR/hash-stable-is-unstable.rs:21:10 | LL | #[derive(HashStable)] | ^^^^^^^^^^ | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the derive macro `HashStable` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/tests/ui-fulldeps/pathless-extern-unstable.rs b/tests/ui-fulldeps/pathless-extern-unstable.rs index 7fba8343bc08..719ca3c5a65b 100644 --- a/tests/ui-fulldeps/pathless-extern-unstable.rs +++ b/tests/ui-fulldeps/pathless-extern-unstable.rs @@ -1,4 +1,5 @@ // edition:2018 +// ignore-stage1 // compile-flags:--extern rustc_middle // Test that `--extern rustc_middle` fails with `rustc_private`. diff --git a/tests/ui-fulldeps/pathless-extern-unstable.stderr b/tests/ui-fulldeps/pathless-extern-unstable.stderr index cfd8669c45fe..d13a00792131 100644 --- a/tests/ui-fulldeps/pathless-extern-unstable.stderr +++ b/tests/ui-fulldeps/pathless-extern-unstable.stderr @@ -1,11 +1,12 @@ error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? - --> $DIR/pathless-extern-unstable.rs:6:9 + --> $DIR/pathless-extern-unstable.rs:7:9 | LL | pub use rustc_middle; | ^^^^^^^^^^^^ | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/array-slice-vec/suggest-array-length.stderr b/tests/ui/array-slice-vec/suggest-array-length.stderr index 16c90a04784d..fdab7ba7064e 100644 --- a/tests/ui/array-slice-vec/suggest-array-length.stderr +++ b/tests/ui/array-slice-vec/suggest-array-length.stderr @@ -48,6 +48,7 @@ LL | const Foo: [i32; _] = [1, 2, 3]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: using `_` for array lengths is unstable --> $DIR/suggest-array-length.rs:8:26 @@ -57,6 +58,7 @@ LL | const REF_FOO: &[u8; _] = &[1]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: using `_` for array lengths is unstable --> $DIR/suggest-array-length.rs:11:20 @@ -66,6 +68,7 @@ LL | let foo: [i32; _] = [1, 2, 3]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: using `_` for array lengths is unstable --> $DIR/suggest-array-length.rs:14:20 @@ -75,6 +78,7 @@ LL | let bar: [i32; _] = [0; 3]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: using `_` for array lengths is unstable --> $DIR/suggest-array-length.rs:17:25 @@ -84,6 +88,7 @@ LL | let ref_foo: &[i32; _] = &[1, 2, 3]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: using `_` for array lengths is unstable --> $DIR/suggest-array-length.rs:20:25 @@ -93,6 +98,7 @@ LL | let ref_bar: &[i32; _] = &[0; 3]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: using `_` for array lengths is unstable --> $DIR/suggest-array-length.rs:23:35 @@ -102,6 +108,7 @@ LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 14 previous errors diff --git a/tests/ui/associated-consts/issue-105330.stderr b/tests/ui/associated-consts/issue-105330.stderr index e1461fec296e..b4c021d0f4fd 100644 --- a/tests/ui/associated-consts/issue-105330.stderr +++ b/tests/ui/associated-consts/issue-105330.stderr @@ -23,6 +23,7 @@ LL | fn foo>() { | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated const equality is incomplete --> $DIR/issue-105330.rs:15:29 @@ -32,6 +33,7 @@ LL | fn main>() { | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in impl headers --> $DIR/issue-105330.rs:6:27 diff --git a/tests/ui/associated-consts/issue-93835.stderr b/tests/ui/associated-consts/issue-93835.stderr index be0573a1301a..d3ce46f6f03f 100644 --- a/tests/ui/associated-consts/issue-93835.stderr +++ b/tests/ui/associated-consts/issue-93835.stderr @@ -24,6 +24,7 @@ LL | type_ascribe!(p, a>); | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/issue-93835.rs:4:24 @@ -33,6 +34,7 @@ LL | type_ascribe!(p, a>); | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors diff --git a/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr b/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr index cf2aee6ab53e..ab8cdb6f80a4 100644 --- a/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr +++ b/tests/ui/associated-inherent-types/assoc-inherent-unstable.stderr @@ -5,6 +5,7 @@ LL | type Data = aux::Owner::Data; | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(data)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/associated-inherent-types/dont-select-if-disabled.stderr b/tests/ui/associated-inherent-types/dont-select-if-disabled.stderr index 87a3f35c9685..edf54894cd4e 100644 --- a/tests/ui/associated-inherent-types/dont-select-if-disabled.stderr +++ b/tests/ui/associated-inherent-types/dont-select-if-disabled.stderr @@ -17,6 +17,7 @@ LL | impl S { type P = (); } | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr b/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr index e3eddf489b04..b8366b15a8ae 100644 --- a/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr +++ b/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr @@ -28,6 +28,7 @@ LL | type Item = &[T]; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0223]: ambiguous associated type --> $DIR/issue-109071.rs:15:22 diff --git a/tests/ui/associated-inherent-types/issue-109768.stderr b/tests/ui/associated-inherent-types/issue-109768.stderr index c489fd1ab9b0..e960f4fb5d17 100644 --- a/tests/ui/associated-inherent-types/issue-109768.stderr +++ b/tests/ui/associated-inherent-types/issue-109768.stderr @@ -28,6 +28,7 @@ LL | type AssocType3 = T; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0061]: this struct takes 1 argument but 0 arguments were supplied --> $DIR/issue-109768.rs:10:56 diff --git a/tests/ui/associated-type-bounds/issue-99828.stderr b/tests/ui/associated-type-bounds/issue-99828.stderr index 8813baf84de4..911f3ff0f5ed 100644 --- a/tests/ui/associated-type-bounds/issue-99828.stderr +++ b/tests/ui/associated-type-bounds/issue-99828.stderr @@ -6,6 +6,7 @@ LL | fn get_iter(vec: &[i32]) -> impl Iterator + '_ { | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: expected type, found constant --> $DIR/issue-99828.rs:1:50 diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr index 1714dac12db9..02bec24c628d 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr +++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr @@ -12,6 +12,7 @@ LL | fn foo>() {} | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/bad-inputs-and-output.rs:14:17 @@ -21,6 +22,7 @@ LL | fn bar (): Send>>() {} | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/bad-inputs-and-output.rs:3:12 diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr index f27603e3719d..3007240c3ab6 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr @@ -6,6 +6,7 @@ LL | fn foo>() {} | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/async-await/feature-async-closure.stderr b/tests/ui/async-await/feature-async-closure.stderr index c69a0dd9ed98..650500b48903 100644 --- a/tests/ui/async-await/feature-async-closure.stderr +++ b/tests/ui/async-await/feature-async-closure.stderr @@ -6,6 +6,7 @@ LL | let _ = async || {}; | = note: see issue #62290 for more information = help: add `#![feature(async_closure)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: to use an async block, remove the `||`: `async {` error: aborting due to 1 previous error diff --git a/tests/ui/async-await/feature-async-for-loop.stderr b/tests/ui/async-await/feature-async-for-loop.stderr index 38f75821772c..62ddc4222b85 100644 --- a/tests/ui/async-await/feature-async-for-loop.stderr +++ b/tests/ui/async-await/feature-async-for-loop.stderr @@ -6,6 +6,7 @@ LL | for await _i in core::async_iter::from_iter(0..3) { | = note: see issue #118898 for more information = help: add `#![feature(async_for_loop)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `for await` loops are experimental --> $DIR/feature-async-for-loop.rs:17:13 @@ -15,6 +16,7 @@ LL | for await _i in core::async_iter::from_iter(0..3) { | = note: see issue #118898 for more information = help: add `#![feature(async_for_loop)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/async-await/issues/issue-95307.stderr b/tests/ui/async-await/issues/issue-95307.stderr index fdc6d5de1a80..dd8fcd3690a7 100644 --- a/tests/ui/async-await/issues/issue-95307.stderr +++ b/tests/ui/async-await/issues/issue-95307.stderr @@ -12,6 +12,7 @@ LL | async fn new() -> [u8; _]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/async-await/track-caller/async-block.afn.stderr b/tests/ui/async-await/track-caller/async-block.afn.stderr index 2302722eecc4..b6a7481a4d11 100644 --- a/tests/ui/async-await/track-caller/async-block.afn.stderr +++ b/tests/ui/async-await/track-caller/async-block.afn.stderr @@ -6,6 +6,7 @@ LL | let _ = #[track_caller] async { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-block.rs:15:13 @@ -15,6 +16,7 @@ LL | let _ = #[track_caller] async { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-block.rs:23:17 @@ -24,6 +26,7 @@ LL | let _ = #[track_caller] async { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/async-await/track-caller/async-block.nofeat.stderr b/tests/ui/async-await/track-caller/async-block.nofeat.stderr index 2302722eecc4..b6a7481a4d11 100644 --- a/tests/ui/async-await/track-caller/async-block.nofeat.stderr +++ b/tests/ui/async-await/track-caller/async-block.nofeat.stderr @@ -6,6 +6,7 @@ LL | let _ = #[track_caller] async { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-block.rs:15:13 @@ -15,6 +16,7 @@ LL | let _ = #[track_caller] async { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-block.rs:23:17 @@ -24,6 +26,7 @@ LL | let _ = #[track_caller] async { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr b/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr index e23fc459358b..92f38d5a7962 100644 --- a/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr +++ b/tests/ui/async-await/track-caller/async-closure-gate.afn.stderr @@ -6,6 +6,7 @@ LL | let _ = #[track_caller] async || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:15:13 @@ -15,6 +16,7 @@ LL | let _ = #[track_caller] async || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:21:13 @@ -24,6 +26,7 @@ LL | let _ = #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:29:17 @@ -33,6 +36,7 @@ LL | let _ = #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:37:9 @@ -42,6 +46,7 @@ LL | #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:47:13 @@ -51,6 +56,7 @@ LL | #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0308]: mismatched types --> $DIR/async-closure-gate.rs:27:5 diff --git a/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr b/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr index e23fc459358b..92f38d5a7962 100644 --- a/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr +++ b/tests/ui/async-await/track-caller/async-closure-gate.nofeat.stderr @@ -6,6 +6,7 @@ LL | let _ = #[track_caller] async || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:15:13 @@ -15,6 +16,7 @@ LL | let _ = #[track_caller] async || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:21:13 @@ -24,6 +26,7 @@ LL | let _ = #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:29:17 @@ -33,6 +36,7 @@ LL | let _ = #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:37:9 @@ -42,6 +46,7 @@ LL | #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/async-closure-gate.rs:47:13 @@ -51,6 +56,7 @@ LL | #[track_caller] || { | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0308]: mismatched types --> $DIR/async-closure-gate.rs:27:5 diff --git a/tests/ui/async-await/track-caller/panic-track-caller.cls.stderr b/tests/ui/async-await/track-caller/panic-track-caller.cls.stderr index f3090e3b9a68..464cbfba2acf 100644 --- a/tests/ui/async-await/track-caller/panic-track-caller.cls.stderr +++ b/tests/ui/async-await/track-caller/panic-track-caller.cls.stderr @@ -11,6 +11,7 @@ LL | | } | = note: see issue #110011 for more information = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(ungated_async_fn_track_caller)]` on by default warning: `#[track_caller]` on async functions is a no-op @@ -26,6 +27,7 @@ LL | | } | = note: see issue #110011 for more information = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: 2 warnings emitted diff --git a/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr b/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr index f3090e3b9a68..464cbfba2acf 100644 --- a/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr +++ b/tests/ui/async-await/track-caller/panic-track-caller.nofeat.stderr @@ -11,6 +11,7 @@ LL | | } | = note: see issue #110011 for more information = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(ungated_async_fn_track_caller)]` on by default warning: `#[track_caller]` on async functions is a no-op @@ -26,6 +27,7 @@ LL | | } | = note: see issue #110011 for more information = help: add `#![feature(async_fn_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: 2 warnings emitted diff --git a/tests/ui/auto-traits/issue-117789.stderr b/tests/ui/auto-traits/issue-117789.stderr index 9a3a7efed3e1..1f8880b1ef46 100644 --- a/tests/ui/auto-traits/issue-117789.stderr +++ b/tests/ui/auto-traits/issue-117789.stderr @@ -14,6 +14,7 @@ LL | auto trait Trait

{} | = note: see issue #13231 for more information = help: add `#![feature(auto_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/auto-traits/pre-cfg.stderr b/tests/ui/auto-traits/pre-cfg.stderr index 6efa05b4326d..648f9464d61d 100644 --- a/tests/ui/auto-traits/pre-cfg.stderr +++ b/tests/ui/auto-traits/pre-cfg.stderr @@ -6,6 +6,7 @@ LL | auto trait Foo {} | = note: see issue #13231 for more information = help: add `#![feature(auto_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 diff --git a/tests/ui/bounds-lifetime.stderr b/tests/ui/bounds-lifetime.stderr index de9b9e01242c..01b314f3d1bb 100644 --- a/tests/ui/bounds-lifetime.stderr +++ b/tests/ui/bounds-lifetime.stderr @@ -24,6 +24,7 @@ LL | type D = for<'a, T> fn(); | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: only lifetime parameters can be used in this context --> $DIR/bounds-lifetime.rs:5:18 @@ -33,6 +34,7 @@ LL | type E = dyn for Fn(); | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors diff --git a/tests/ui/box/alloc-unstable-fail.stderr b/tests/ui/box/alloc-unstable-fail.stderr index 352efce318f3..9e1e12a2b6ae 100644 --- a/tests/ui/box/alloc-unstable-fail.stderr +++ b/tests/ui/box/alloc-unstable-fail.stderr @@ -6,6 +6,7 @@ LL | let _boxed: Box = Box::new(10); | = note: see issue #32838 for more information = help: add `#![feature(allocator_api)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr index 5b97b396fb12..94e9628f0f0f 100644 --- a/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr +++ b/tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr @@ -6,6 +6,7 @@ LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) { | = note: see issue #100189 for more information = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl` --> $DIR/feature-gate-extended_varargs_abi_support.rs:1:14 @@ -21,6 +22,7 @@ LL | fn sysv(f: extern "sysv64" fn(usize, ...)) { | = note: see issue #100189 for more information = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl` --> $DIR/feature-gate-extended_varargs_abi_support.rs:6:12 @@ -36,6 +38,7 @@ LL | fn win(f: extern "win64" fn(usize, ...)) { | = note: see issue #100189 for more information = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl` --> $DIR/feature-gate-extended_varargs_abi_support.rs:11:11 diff --git a/tests/ui/c-variadic/variadic-ffi-2.rs b/tests/ui/c-variadic/variadic-ffi-2.rs index 67a0a9a1dec3..a412a58d7c59 100644 --- a/tests/ui/c-variadic/variadic-ffi-2.rs +++ b/tests/ui/c-variadic/variadic-ffi-2.rs @@ -3,10 +3,13 @@ fn baz(f: extern "stdcall" fn(usize, ...)) { //~^ ERROR: C-variadic function must have a compatible calling convention, - // like C, cdecl, aapcs, win64, sysv64 or efiapi + // like C, cdecl, system, aapcs, win64, sysv64 or efiapi f(22, 44); } +fn system(f: extern "system" fn(usize, ...)) { + f(22, 44); +} fn aapcs(f: extern "aapcs" fn(usize, ...)) { f(22, 44); } diff --git a/tests/ui/c-variadic/variadic-ffi-2.stderr b/tests/ui/c-variadic/variadic-ffi-2.stderr index d0ca7034ba1c..fbf273b1f1db 100644 --- a/tests/ui/c-variadic/variadic-ffi-2.stderr +++ b/tests/ui/c-variadic/variadic-ffi-2.stderr @@ -1,4 +1,4 @@ -error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `aapcs`, `win64`, `sysv64` or `efiapi` +error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `system`, `aapcs`, `win64`, `sysv64` or `efiapi` --> $DIR/variadic-ffi-2.rs:4:11 | LL | fn baz(f: extern "stdcall" fn(usize, ...)) { diff --git a/tests/ui/cfg/cfg-false-feature.stderr b/tests/ui/cfg/cfg-false-feature.stderr index 34093036205f..9309b59ca591 100644 --- a/tests/ui/cfg/cfg-false-feature.stderr +++ b/tests/ui/cfg/cfg-false-feature.stderr @@ -6,6 +6,7 @@ LL | trait A = Clone; | = note: see issue #41517 for more information = help: add `#![feature(trait_alias)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 @@ -17,6 +18,7 @@ LL | let box _ = Box::new(0); | = note: see issue #29641 for more information = help: add `#![feature(box_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 diff --git a/tests/ui/cfg/diagnostics-cross-crate.rs b/tests/ui/cfg/diagnostics-cross-crate.rs index d2725c94b083..ad4e47b7b2e0 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.rs +++ b/tests/ui/cfg/diagnostics-cross-crate.rs @@ -14,9 +14,9 @@ fn main() { // The module isn't found - we would like to get a diagnostic, but currently don't due to // the awkward way the resolver diagnostics are currently implemented. - // FIXME(Nilstrieb): Also add a note to the cfg diagnostic here cfged_out::inner::doesnt_exist::hello(); //~ ERROR failed to resolve //~^ NOTE could not find `doesnt_exist` in `inner` + //~| NOTE found an item that was configured out // It should find the one in the right module, not the wrong one. cfged_out::inner::right::meow(); //~ ERROR cannot find function diff --git a/tests/ui/cfg/diagnostics-cross-crate.stderr b/tests/ui/cfg/diagnostics-cross-crate.stderr index 046929bc2602..8a238f364044 100644 --- a/tests/ui/cfg/diagnostics-cross-crate.stderr +++ b/tests/ui/cfg/diagnostics-cross-crate.stderr @@ -1,8 +1,14 @@ error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner` - --> $DIR/diagnostics-cross-crate.rs:18:23 + --> $DIR/diagnostics-cross-crate.rs:17:23 | LL | cfged_out::inner::doesnt_exist::hello(); | ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner` + | +note: found an item that was configured out + --> $DIR/auxiliary/cfged_out.rs:6:13 + | +LL | pub mod doesnt_exist { + | ^^^^^^^^^^^^ error[E0425]: cannot find function `uwu` in crate `cfged_out` --> $DIR/diagnostics-cross-crate.rs:7:16 diff --git a/tests/ui/cfg/diagnostics-same-crate.rs b/tests/ui/cfg/diagnostics-same-crate.rs index f76ace06a762..2d0907c6dfb8 100644 --- a/tests/ui/cfg/diagnostics-same-crate.rs +++ b/tests/ui/cfg/diagnostics-same-crate.rs @@ -4,7 +4,7 @@ pub mod inner { //~^ NOTE found an item that was configured out #[cfg(FALSE)] - pub mod doesnt_exist { + pub mod doesnt_exist { //~ NOTE found an item that was configured out pub fn hello() {} } @@ -34,7 +34,6 @@ fn main() { // The module isn't found - we would like to get a diagnostic, but currently don't due to // the awkward way the resolver diagnostics are currently implemented. - // FIXME(Nilstrieb): Also add a note to the cfg diagnostic here inner::doesnt_exist::hello(); //~ ERROR failed to resolve //~| NOTE could not find `doesnt_exist` in `inner` diff --git a/tests/ui/cfg/diagnostics-same-crate.stderr b/tests/ui/cfg/diagnostics-same-crate.stderr index 30ee6479bd26..62a9d132de09 100644 --- a/tests/ui/cfg/diagnostics-same-crate.stderr +++ b/tests/ui/cfg/diagnostics-same-crate.stderr @@ -1,8 +1,14 @@ error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner` - --> $DIR/diagnostics-same-crate.rs:38:12 + --> $DIR/diagnostics-same-crate.rs:37:12 | LL | inner::doesnt_exist::hello(); | ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner` + | +note: found an item that was configured out + --> $DIR/diagnostics-same-crate.rs:7:13 + | +LL | pub mod doesnt_exist { + | ^^^^^^^^^^^^ error[E0425]: cannot find function `uwu` in module `inner` --> $DIR/diagnostics-same-crate.rs:32:12 @@ -17,7 +23,7 @@ LL | pub fn uwu() {} | ^^^ error[E0425]: cannot find function `meow` in module `inner::right` - --> $DIR/diagnostics-same-crate.rs:42:19 + --> $DIR/diagnostics-same-crate.rs:41:19 | LL | inner::right::meow(); | ^^^^ not found in `inner::right` @@ -36,7 +42,7 @@ LL | uwu(); | ^^^ not found in this scope error[E0425]: cannot find function `vanished` in this scope - --> $DIR/diagnostics-same-crate.rs:49:5 + --> $DIR/diagnostics-same-crate.rs:48:5 | LL | vanished(); | ^^^^^^^^ not found in this scope diff --git a/tests/ui/check-cfg/invalid-arguments.cfg_none.stderr b/tests/ui/check-cfg/invalid-arguments.cfg_none.stderr new file mode 100644 index 000000000000..7992dbdff005 --- /dev/null +++ b/tests/ui/check-cfg/invalid-arguments.cfg_none.stderr @@ -0,0 +1,2 @@ +error: invalid `--check-cfg` argument: `cfg(none())` (`cfg()` arguments must be simple identifiers, `any()` or `values(...)`) + diff --git a/tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr b/tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr index 0dc44d9ac76c..90308bdcd235 100644 --- a/tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr +++ b/tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr @@ -1,2 +1,2 @@ -error: invalid `--check-cfg` argument: `cfg(foo,values(bar))` (`values()` arguments must be string literals or `any()`) +error: invalid `--check-cfg` argument: `cfg(foo,values(bar))` (`values()` arguments must be string literals, `none()` or `any()`) diff --git a/tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr b/tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr index d0a1453e3c40..16f92a504a5f 100644 --- a/tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr +++ b/tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr @@ -1,2 +1,2 @@ -error: invalid `--check-cfg` argument: `cfg(foo,values("bar",bar,"bar"))` (`values()` arguments must be string literals or `any()`) +error: invalid `--check-cfg` argument: `cfg(foo,values("bar",bar,"bar"))` (`values()` arguments must be string literals, `none()` or `any()`) diff --git a/tests/ui/check-cfg/invalid-arguments.none_not_empty.stderr b/tests/ui/check-cfg/invalid-arguments.none_not_empty.stderr new file mode 100644 index 000000000000..0a6c6ffd42f2 --- /dev/null +++ b/tests/ui/check-cfg/invalid-arguments.none_not_empty.stderr @@ -0,0 +1,2 @@ +error: invalid `--check-cfg` argument: `cfg(foo,values(none("test")))` (`none()` must be empty) + diff --git a/tests/ui/check-cfg/invalid-arguments.rs b/tests/ui/check-cfg/invalid-arguments.rs index 90c62fa38070..60ba6315558d 100644 --- a/tests/ui/check-cfg/invalid-arguments.rs +++ b/tests/ui/check-cfg/invalid-arguments.rs @@ -7,6 +7,7 @@ // revisions: values_any_missing_values values_any_before_ident ident_in_values_1 // revisions: ident_in_values_2 unknown_meta_item_1 unknown_meta_item_2 unknown_meta_item_3 // revisions: mixed_values_any mixed_any any_values giberich unterminated +// revisions: none_not_empty cfg_none // // compile-flags: -Z unstable-options // [anything_else]compile-flags: --check-cfg=anything_else(...) @@ -24,9 +25,11 @@ // [unknown_meta_item_1]compile-flags: --check-cfg=abc() // [unknown_meta_item_2]compile-flags: --check-cfg=cfg(foo,test()) // [unknown_meta_item_3]compile-flags: --check-cfg=cfg(foo,values(test())) +// [none_not_empty]compile-flags: --check-cfg=cfg(foo,values(none("test"))) // [mixed_values_any]compile-flags: --check-cfg=cfg(foo,values("bar",any())) // [mixed_any]compile-flags: --check-cfg=cfg(any(),values(any())) // [any_values]compile-flags: --check-cfg=cfg(any(),values()) +// [cfg_none]compile-flags: --check-cfg=cfg(none()) // [giberich]compile-flags: --check-cfg=cfg(...) // [unterminated]compile-flags: --check-cfg=cfg( diff --git a/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr index 2441e2537b74..a023779b35a7 100644 --- a/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr +++ b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr @@ -1,2 +1,2 @@ -error: invalid `--check-cfg` argument: `cfg(foo,values(test()))` (`values()` arguments must be string literals or `any()`) +error: invalid `--check-cfg` argument: `cfg(foo,values(test()))` (`values()` arguments must be string literals, `none()` or `any()`) diff --git a/tests/ui/check-cfg/no-expected-values.rs b/tests/ui/check-cfg/no-expected-values.rs index 9f34c019ea53..4f8481315df6 100644 --- a/tests/ui/check-cfg/no-expected-values.rs +++ b/tests/ui/check-cfg/no-expected-values.rs @@ -6,7 +6,7 @@ // compile-flags: --check-cfg=cfg(values,simple,mixed,empty) // [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature) // [mixed]compile-flags: --check-cfg=cfg(test,feature) -// [empty]compile-flags: --check-cfg=cfg(test,feature,values()) +// [empty]compile-flags: --check-cfg=cfg(test,feature,values(none())) #[cfg(feature = "foo")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/values-none.explicit.stderr b/tests/ui/check-cfg/values-none.explicit.stderr new file mode 100644 index 000000000000..a025ff441b70 --- /dev/null +++ b/tests/ui/check-cfg/values-none.explicit.stderr @@ -0,0 +1,27 @@ +warning: unexpected `cfg` condition value: `too` + --> $DIR/values-none.rs:11:7 + | +LL | #[cfg(foo = "too")] + | ^^^-------- + | | + | help: remove the value + | + = note: no expected value for `foo` + = help: to expect this configuration use `--check-cfg=cfg(foo, values("too"))` + = note: see for more information about checking conditional configuration + = note: `#[warn(unexpected_cfgs)]` on by default + +warning: unexpected `cfg` condition value: `bar` + --> $DIR/values-none.rs:16:7 + | +LL | #[cfg(foo = "bar")] + | ^^^-------- + | | + | help: remove the value + | + = note: no expected value for `foo` + = help: to expect this configuration use `--check-cfg=cfg(foo, values("bar"))` + = note: see for more information about checking conditional configuration + +warning: 2 warnings emitted + diff --git a/tests/ui/check-cfg/values-none.implicit.stderr b/tests/ui/check-cfg/values-none.implicit.stderr new file mode 100644 index 000000000000..a025ff441b70 --- /dev/null +++ b/tests/ui/check-cfg/values-none.implicit.stderr @@ -0,0 +1,27 @@ +warning: unexpected `cfg` condition value: `too` + --> $DIR/values-none.rs:11:7 + | +LL | #[cfg(foo = "too")] + | ^^^-------- + | | + | help: remove the value + | + = note: no expected value for `foo` + = help: to expect this configuration use `--check-cfg=cfg(foo, values("too"))` + = note: see for more information about checking conditional configuration + = note: `#[warn(unexpected_cfgs)]` on by default + +warning: unexpected `cfg` condition value: `bar` + --> $DIR/values-none.rs:16:7 + | +LL | #[cfg(foo = "bar")] + | ^^^-------- + | | + | help: remove the value + | + = note: no expected value for `foo` + = help: to expect this configuration use `--check-cfg=cfg(foo, values("bar"))` + = note: see for more information about checking conditional configuration + +warning: 2 warnings emitted + diff --git a/tests/ui/check-cfg/values-none.rs b/tests/ui/check-cfg/values-none.rs new file mode 100644 index 000000000000..957ed43a2e23 --- /dev/null +++ b/tests/ui/check-cfg/values-none.rs @@ -0,0 +1,23 @@ +// check-pass +// +// revisions: explicit implicit +// compile-flags: -Zunstable-options +// [explicit]compile-flags: --check-cfg=cfg(foo,values(none())) +// [implicit]compile-flags: --check-cfg=cfg(foo) +// [simple] compile-flags: --check-cfg=cfg(foo,values(none(),"too")) +// [concat_1]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values("too")) +// [concat_2]compile-flags: --check-cfg=cfg(foo,values("too")) --check-cfg=cfg(foo) + +#[cfg(foo = "too")] +//[explicit]~^ WARNING unexpected `cfg` condition value +//[implicit]~^^ WARNING unexpected `cfg` condition value +fn foo_too() {} + +#[cfg(foo = "bar")] +//~^ WARNING unexpected `cfg` condition value +fn foo_bar() {} + +#[cfg(foo)] +fn foo() {} + +fn main() {} diff --git a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs index 2bcbd792e3a8..191cb4c7236e 100644 --- a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs +++ b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.rs @@ -8,6 +8,7 @@ fn main() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr index 129b26456ce1..d7582dcfcc74 100644 --- a/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr +++ b/tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr @@ -6,9 +6,10 @@ LL | let mut c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/arrays-completely-captured.rs:11:5 + --> $DIR/arrays-completely-captured.rs:12:5 | LL | / || { LL | | @@ -20,18 +21,18 @@ LL | | }; | |_____^ | note: Capturing m[] -> MutBorrow - --> $DIR/arrays-completely-captured.rs:14:9 + --> $DIR/arrays-completely-captured.rs:15:9 | LL | m[0] += 10; | ^ note: Capturing m[] -> MutBorrow - --> $DIR/arrays-completely-captured.rs:17:9 + --> $DIR/arrays-completely-captured.rs:18:9 | LL | m[1] += 40; | ^ error: Min Capture analysis includes: - --> $DIR/arrays-completely-captured.rs:11:5 + --> $DIR/arrays-completely-captured.rs:12:5 | LL | / || { LL | | @@ -43,7 +44,7 @@ LL | | }; | |_____^ | note: Min Capture m[] -> MutBorrow - --> $DIR/arrays-completely-captured.rs:14:9 + --> $DIR/arrays-completely-captured.rs:15:9 | LL | m[0] += 10; | ^ diff --git a/tests/ui/closures/2229_closure_analysis/by_value.rs b/tests/ui/closures/2229_closure_analysis/by_value.rs index d8d3bbee200d..d3bde3cea639 100644 --- a/tests/ui/closures/2229_closure_analysis/by_value.rs +++ b/tests/ui/closures/2229_closure_analysis/by_value.rs @@ -18,6 +18,7 @@ fn big_box() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/by_value.stderr b/tests/ui/closures/2229_closure_analysis/by_value.stderr index 097462253aae..0dd9991cf840 100644 --- a/tests/ui/closures/2229_closure_analysis/by_value.stderr +++ b/tests/ui/closures/2229_closure_analysis/by_value.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/by_value.rs:21:5 + --> $DIR/by_value.rs:22:5 | LL | / || { LL | | @@ -20,18 +21,18 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0),Deref,(0, 0)] -> ByValue - --> $DIR/by_value.rs:24:17 + --> $DIR/by_value.rs:25:17 | LL | let p = t.0.0; | ^^^^^ note: Capturing t[(1, 0)] -> ImmBorrow - --> $DIR/by_value.rs:27:29 + --> $DIR/by_value.rs:28:29 | LL | println!("{} {:?}", t.1, p); | ^^^ error: Min Capture analysis includes: - --> $DIR/by_value.rs:21:5 + --> $DIR/by_value.rs:22:5 | LL | / || { LL | | @@ -43,12 +44,12 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> ByValue - --> $DIR/by_value.rs:24:17 + --> $DIR/by_value.rs:25:17 | LL | let p = t.0.0; | ^^^^^ note: Min Capture t[(1, 0)] -> ImmBorrow - --> $DIR/by_value.rs:27:29 + --> $DIR/by_value.rs:28:29 | LL | println!("{} {:?}", t.1, p); | ^^^ diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs index dc53b31768ec..1a800b6b7f28 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.rs @@ -15,6 +15,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr index fceafb9c84ee..d2409c9367ce 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-1.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/capture-analysis-1.rs:18:5 + --> $DIR/capture-analysis-1.rs:19:5 | LL | / || { LL | | @@ -20,28 +21,28 @@ LL | | }; | |_____^ | note: Capturing p[] -> ImmBorrow - --> $DIR/capture-analysis-1.rs:21:26 + --> $DIR/capture-analysis-1.rs:22:26 | LL | println!("{:?}", p); | ^ note: Capturing p[(0, 0)] -> ImmBorrow - --> $DIR/capture-analysis-1.rs:24:26 + --> $DIR/capture-analysis-1.rs:25:26 | LL | println!("{:?}", p.x); | ^^^ note: Capturing q[(0, 0)] -> ImmBorrow - --> $DIR/capture-analysis-1.rs:27:26 + --> $DIR/capture-analysis-1.rs:28:26 | LL | println!("{:?}", q.x); | ^^^ note: Capturing q[] -> ImmBorrow - --> $DIR/capture-analysis-1.rs:29:26 + --> $DIR/capture-analysis-1.rs:30:26 | LL | println!("{:?}", q); | ^ error: Min Capture analysis includes: - --> $DIR/capture-analysis-1.rs:18:5 + --> $DIR/capture-analysis-1.rs:19:5 | LL | / || { LL | | @@ -53,12 +54,12 @@ LL | | }; | |_____^ | note: Min Capture p[] -> ImmBorrow - --> $DIR/capture-analysis-1.rs:21:26 + --> $DIR/capture-analysis-1.rs:22:26 | LL | println!("{:?}", p); | ^ note: Min Capture q[] -> ImmBorrow - --> $DIR/capture-analysis-1.rs:29:26 + --> $DIR/capture-analysis-1.rs:30:26 | LL | println!("{:?}", q); | ^ diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs index 99d12f8d8f1d..9b1825e90428 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.rs @@ -14,6 +14,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr index cb44ca266529..7049c708bb87 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-2.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/capture-analysis-2.rs:17:5 + --> $DIR/capture-analysis-2.rs:18:5 | LL | / || { LL | | @@ -20,18 +21,18 @@ LL | | }; | |_____^ | note: Capturing p[(0, 0)] -> ByValue - --> $DIR/capture-analysis-2.rs:20:18 + --> $DIR/capture-analysis-2.rs:21:18 | LL | let _x = p.x; | ^^^ note: Capturing p[] -> ImmBorrow - --> $DIR/capture-analysis-2.rs:23:26 + --> $DIR/capture-analysis-2.rs:24:26 | LL | println!("{:?}", p); | ^ error: Min Capture analysis includes: - --> $DIR/capture-analysis-2.rs:17:5 + --> $DIR/capture-analysis-2.rs:18:5 | LL | / || { LL | | @@ -43,7 +44,7 @@ LL | | }; | |_____^ | note: Min Capture p[] -> ByValue - --> $DIR/capture-analysis-2.rs:20:18 + --> $DIR/capture-analysis-2.rs:21:18 | LL | let _x = p.x; | ^^^ p[] captured as ByValue here diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs index 3f337097dbd2..e9923a81bf63 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.rs @@ -19,6 +19,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr index 71e7bdc354fb..698b51a4fdb9 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-3.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/capture-analysis-3.rs:22:5 + --> $DIR/capture-analysis-3.rs:23:5 | LL | / || { LL | | @@ -20,18 +21,18 @@ LL | | }; | |_____^ | note: Capturing a[(0, 0),(0, 0)] -> ByValue - --> $DIR/capture-analysis-3.rs:25:18 + --> $DIR/capture-analysis-3.rs:26:18 | LL | let _x = a.b.c; | ^^^^^ note: Capturing a[(0, 0)] -> ImmBorrow - --> $DIR/capture-analysis-3.rs:28:26 + --> $DIR/capture-analysis-3.rs:29:26 | LL | println!("{:?}", a.b); | ^^^ error: Min Capture analysis includes: - --> $DIR/capture-analysis-3.rs:22:5 + --> $DIR/capture-analysis-3.rs:23:5 | LL | / || { LL | | @@ -43,7 +44,7 @@ LL | | }; | |_____^ | note: Min Capture a[(0, 0)] -> ByValue - --> $DIR/capture-analysis-3.rs:25:18 + --> $DIR/capture-analysis-3.rs:26:18 | LL | let _x = a.b.c; | ^^^^^ a[(0, 0)] captured as ByValue here diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs index bc46ec997360..8c1963455a50 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.rs @@ -19,6 +19,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr index 7e6e625bc7d4..9cd0dcf720e4 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-analysis-4.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/capture-analysis-4.rs:22:5 + --> $DIR/capture-analysis-4.rs:23:5 | LL | / || { LL | | @@ -20,18 +21,18 @@ LL | | }; | |_____^ | note: Capturing a[(0, 0)] -> ByValue - --> $DIR/capture-analysis-4.rs:25:18 + --> $DIR/capture-analysis-4.rs:26:18 | LL | let _x = a.b; | ^^^ note: Capturing a[(0, 0),(0, 0)] -> ImmBorrow - --> $DIR/capture-analysis-4.rs:28:26 + --> $DIR/capture-analysis-4.rs:29:26 | LL | println!("{:?}", a.b.c); | ^^^^^ error: Min Capture analysis includes: - --> $DIR/capture-analysis-4.rs:22:5 + --> $DIR/capture-analysis-4.rs:23:5 | LL | / || { LL | | @@ -43,7 +44,7 @@ LL | | }; | |_____^ | note: Min Capture a[(0, 0)] -> ByValue - --> $DIR/capture-analysis-4.rs:25:18 + --> $DIR/capture-analysis-4.rs:26:18 | LL | let _x = a.b; | ^^^ diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs index 6fd151553316..2bf127ed5e83 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.rs @@ -13,6 +13,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr index 0f64ecf3a0cc..92a719d6098d 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-struct.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/capture-disjoint-field-struct.rs:16:5 + --> $DIR/capture-disjoint-field-struct.rs:17:5 | LL | / || { LL | | @@ -20,13 +21,13 @@ LL | | }; | |_____^ | note: Capturing p[(0, 0)] -> ImmBorrow - --> $DIR/capture-disjoint-field-struct.rs:19:24 + --> $DIR/capture-disjoint-field-struct.rs:20:24 | LL | println!("{}", p.x); | ^^^ error: Min Capture analysis includes: - --> $DIR/capture-disjoint-field-struct.rs:16:5 + --> $DIR/capture-disjoint-field-struct.rs:17:5 | LL | / || { LL | | @@ -38,7 +39,7 @@ LL | | }; | |_____^ | note: Min Capture p[(0, 0)] -> ImmBorrow - --> $DIR/capture-disjoint-field-struct.rs:19:24 + --> $DIR/capture-disjoint-field-struct.rs:20:24 | LL | println!("{}", p.x); | ^^^ diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs index 8d3bb3262fb2..bf36de634a9b 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.rs @@ -8,6 +8,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr index a8ca9622a6a6..d5333bf71db3 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-disjoint-field-tuple.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/capture-disjoint-field-tuple.rs:11:5 + --> $DIR/capture-disjoint-field-tuple.rs:12:5 | LL | / || { LL | | @@ -20,13 +21,13 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0)] -> ImmBorrow - --> $DIR/capture-disjoint-field-tuple.rs:14:24 + --> $DIR/capture-disjoint-field-tuple.rs:15:24 | LL | println!("{}", t.0); | ^^^ error: Min Capture analysis includes: - --> $DIR/capture-disjoint-field-tuple.rs:11:5 + --> $DIR/capture-disjoint-field-tuple.rs:12:5 | LL | / || { LL | | @@ -38,7 +39,7 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> ImmBorrow - --> $DIR/capture-disjoint-field-tuple.rs:14:24 + --> $DIR/capture-disjoint-field-tuple.rs:15:24 | LL | println!("{}", t.0); | ^^^ diff --git a/tests/ui/closures/2229_closure_analysis/capture-enums.rs b/tests/ui/closures/2229_closure_analysis/capture-enums.rs index 322ae99b8613..47926e27f0c3 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-enums.rs +++ b/tests/ui/closures/2229_closure_analysis/capture-enums.rs @@ -16,6 +16,7 @@ fn multi_variant_enum() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: @@ -47,6 +48,7 @@ fn single_variant_enum() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ First Pass analysis includes: //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/capture-enums.stderr b/tests/ui/closures/2229_closure_analysis/capture-enums.stderr index 8a6ba8444a80..8b258569d95d 100644 --- a/tests/ui/closures/2229_closure_analysis/capture-enums.stderr +++ b/tests/ui/closures/2229_closure_analysis/capture-enums.stderr @@ -6,18 +6,20 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/capture-enums.rs:47:13 + --> $DIR/capture-enums.rs:48:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/capture-enums.rs:19:5 + --> $DIR/capture-enums.rs:20:5 | LL | / || { LL | | @@ -29,28 +31,28 @@ LL | | }; | |_____^ | note: Capturing point[] -> ImmBorrow - --> $DIR/capture-enums.rs:22:41 + --> $DIR/capture-enums.rs:23:41 | LL | if let Info::Point(_, _, str) = point { | ^^^^^ note: Capturing point[(2, 0)] -> ByValue - --> $DIR/capture-enums.rs:22:41 + --> $DIR/capture-enums.rs:23:41 | LL | if let Info::Point(_, _, str) = point { | ^^^^^ note: Capturing meta[] -> ImmBorrow - --> $DIR/capture-enums.rs:29:35 + --> $DIR/capture-enums.rs:30:35 | LL | if let Info::Meta(_, v) = meta { | ^^^^ note: Capturing meta[(1, 1)] -> ByValue - --> $DIR/capture-enums.rs:29:35 + --> $DIR/capture-enums.rs:30:35 | LL | if let Info::Meta(_, v) = meta { | ^^^^ error: Min Capture analysis includes: - --> $DIR/capture-enums.rs:19:5 + --> $DIR/capture-enums.rs:20:5 | LL | / || { LL | | @@ -62,18 +64,18 @@ LL | | }; | |_____^ | note: Min Capture point[] -> ByValue - --> $DIR/capture-enums.rs:22:41 + --> $DIR/capture-enums.rs:23:41 | LL | if let Info::Point(_, _, str) = point { | ^^^^^ note: Min Capture meta[] -> ByValue - --> $DIR/capture-enums.rs:29:35 + --> $DIR/capture-enums.rs:30:35 | LL | if let Info::Meta(_, v) = meta { | ^^^^ error: First Pass analysis includes: - --> $DIR/capture-enums.rs:50:5 + --> $DIR/capture-enums.rs:52:5 | LL | / || { LL | | @@ -85,13 +87,13 @@ LL | | }; | |_____^ | note: Capturing point[(2, 0)] -> ByValue - --> $DIR/capture-enums.rs:53:47 + --> $DIR/capture-enums.rs:55:47 | LL | let SingleVariant::Point(_, _, str) = point; | ^^^^^ error: Min Capture analysis includes: - --> $DIR/capture-enums.rs:50:5 + --> $DIR/capture-enums.rs:52:5 | LL | / || { LL | | @@ -103,7 +105,7 @@ LL | | }; | |_____^ | note: Min Capture point[(2, 0)] -> ByValue - --> $DIR/capture-enums.rs:53:47 + --> $DIR/capture-enums.rs:55:47 | LL | let SingleVariant::Point(_, _, str) = point; | ^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs index 3341166e22b9..18697a79cffb 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.rs @@ -34,6 +34,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr index 29e1af0431ec..55ba416dfd96 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-struct.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/deep-multilevel-struct.rs:37:5 + --> $DIR/deep-multilevel-struct.rs:38:5 | LL | / || { LL | | @@ -20,23 +21,23 @@ LL | | }; | |_____^ | note: Capturing p[(0, 0),(0, 0),(0, 0)] -> ImmBorrow - --> $DIR/deep-multilevel-struct.rs:40:18 + --> $DIR/deep-multilevel-struct.rs:41:18 | LL | let x = &p.a.p.x; | ^^^^^^^ note: Capturing p[(1, 0),(1, 0),(1, 0)] -> MutBorrow - --> $DIR/deep-multilevel-struct.rs:42:9 + --> $DIR/deep-multilevel-struct.rs:43:9 | LL | p.b.q.y = 9; | ^^^^^^^ note: Capturing p[] -> ImmBorrow - --> $DIR/deep-multilevel-struct.rs:45:26 + --> $DIR/deep-multilevel-struct.rs:46:26 | LL | println!("{:?}", p); | ^ error: Min Capture analysis includes: - --> $DIR/deep-multilevel-struct.rs:37:5 + --> $DIR/deep-multilevel-struct.rs:38:5 | LL | / || { LL | | @@ -48,7 +49,7 @@ LL | | }; | |_____^ | note: Min Capture p[] -> MutBorrow - --> $DIR/deep-multilevel-struct.rs:42:9 + --> $DIR/deep-multilevel-struct.rs:43:9 | LL | p.b.q.y = 9; | ^^^^^^^ p[] captured as MutBorrow here diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs index 34b0132f3cb0..2f899f8c60aa 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.rs @@ -8,6 +8,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr index e917516765c8..5e45fe1ca8b6 100644 --- a/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr +++ b/tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/deep-multilevel-tuple.rs:11:5 + --> $DIR/deep-multilevel-tuple.rs:12:5 | LL | / || { LL | | @@ -20,23 +21,23 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0),(0, 0),(0, 0)] -> ImmBorrow - --> $DIR/deep-multilevel-tuple.rs:14:18 + --> $DIR/deep-multilevel-tuple.rs:15:18 | LL | let x = &t.0.0.0; | ^^^^^^^ note: Capturing t[(1, 0),(1, 0),(1, 0)] -> MutBorrow - --> $DIR/deep-multilevel-tuple.rs:16:9 + --> $DIR/deep-multilevel-tuple.rs:17:9 | LL | t.1.1.1 = 9; | ^^^^^^^ note: Capturing t[] -> ImmBorrow - --> $DIR/deep-multilevel-tuple.rs:19:26 + --> $DIR/deep-multilevel-tuple.rs:20:26 | LL | println!("{:?}", t); | ^ error: Min Capture analysis includes: - --> $DIR/deep-multilevel-tuple.rs:11:5 + --> $DIR/deep-multilevel-tuple.rs:12:5 | LL | / || { LL | | @@ -48,7 +49,7 @@ LL | | }; | |_____^ | note: Min Capture t[] -> MutBorrow - --> $DIR/deep-multilevel-tuple.rs:16:9 + --> $DIR/deep-multilevel-tuple.rs:17:9 | LL | t.1.1.1 = 9; | ^^^^^^^ t[] captured as MutBorrow here diff --git a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs index 6c65a7bf87b9..a0b949e1351b 100644 --- a/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/destructure_patterns.rs @@ -10,6 +10,7 @@ fn arrays() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -38,6 +39,7 @@ fn structs() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -58,6 +60,7 @@ fn tuples() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr b/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr index 44fbe6d8158f..7fc85de499f8 100644 --- a/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr +++ b/tests/ui/closures/2229_closure_analysis/destructure_patterns.stderr @@ -6,27 +6,30 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/destructure_patterns.rs:38:13 + --> $DIR/destructure_patterns.rs:39:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/destructure_patterns.rs:58:13 + --> $DIR/destructure_patterns.rs:60:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/destructure_patterns.rs:13:5 + --> $DIR/destructure_patterns.rs:14:5 | LL | / || { LL | | @@ -38,23 +41,23 @@ LL | | }; | |_____^ | note: Capturing arr[Index] -> ByValue - --> $DIR/destructure_patterns.rs:16:29 + --> $DIR/destructure_patterns.rs:17:29 | LL | let [a, b, .., e] = arr; | ^^^ note: Capturing arr[Index] -> ByValue - --> $DIR/destructure_patterns.rs:16:29 + --> $DIR/destructure_patterns.rs:17:29 | LL | let [a, b, .., e] = arr; | ^^^ note: Capturing arr[Index] -> ByValue - --> $DIR/destructure_patterns.rs:16:29 + --> $DIR/destructure_patterns.rs:17:29 | LL | let [a, b, .., e] = arr; | ^^^ error: Min Capture analysis includes: - --> $DIR/destructure_patterns.rs:13:5 + --> $DIR/destructure_patterns.rs:14:5 | LL | / || { LL | | @@ -66,13 +69,13 @@ LL | | }; | |_____^ | note: Min Capture arr[] -> ByValue - --> $DIR/destructure_patterns.rs:16:29 + --> $DIR/destructure_patterns.rs:17:29 | LL | let [a, b, .., e] = arr; | ^^^ error: First Pass analysis includes: - --> $DIR/destructure_patterns.rs:41:5 + --> $DIR/destructure_patterns.rs:43:5 | LL | / || { LL | | @@ -84,18 +87,18 @@ LL | | }; | |_____^ | note: Capturing p[(0, 0)] -> MutBorrow - --> $DIR/destructure_patterns.rs:44:58 + --> $DIR/destructure_patterns.rs:46:58 | LL | let Point { x: ref mut x, y: _, id: moved_id } = p; | ^ note: Capturing p[(2, 0)] -> ByValue - --> $DIR/destructure_patterns.rs:44:58 + --> $DIR/destructure_patterns.rs:46:58 | LL | let Point { x: ref mut x, y: _, id: moved_id } = p; | ^ error: Min Capture analysis includes: - --> $DIR/destructure_patterns.rs:41:5 + --> $DIR/destructure_patterns.rs:43:5 | LL | / || { LL | | @@ -107,18 +110,18 @@ LL | | }; | |_____^ | note: Min Capture p[(0, 0)] -> MutBorrow - --> $DIR/destructure_patterns.rs:44:58 + --> $DIR/destructure_patterns.rs:46:58 | LL | let Point { x: ref mut x, y: _, id: moved_id } = p; | ^ note: Min Capture p[(2, 0)] -> ByValue - --> $DIR/destructure_patterns.rs:44:58 + --> $DIR/destructure_patterns.rs:46:58 | LL | let Point { x: ref mut x, y: _, id: moved_id } = p; | ^ error: First Pass analysis includes: - --> $DIR/destructure_patterns.rs:61:5 + --> $DIR/destructure_patterns.rs:64:5 | LL | / || { LL | | @@ -130,23 +133,23 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0)] -> MutBorrow - --> $DIR/destructure_patterns.rs:64:54 + --> $DIR/destructure_patterns.rs:67:54 | LL | let (ref mut x, ref ref_str, (moved_s, _)) = t; | ^ note: Capturing t[(1, 0)] -> ImmBorrow - --> $DIR/destructure_patterns.rs:64:54 + --> $DIR/destructure_patterns.rs:67:54 | LL | let (ref mut x, ref ref_str, (moved_s, _)) = t; | ^ note: Capturing t[(2, 0),(0, 0)] -> ByValue - --> $DIR/destructure_patterns.rs:64:54 + --> $DIR/destructure_patterns.rs:67:54 | LL | let (ref mut x, ref ref_str, (moved_s, _)) = t; | ^ error: Min Capture analysis includes: - --> $DIR/destructure_patterns.rs:61:5 + --> $DIR/destructure_patterns.rs:64:5 | LL | / || { LL | | @@ -158,17 +161,17 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> MutBorrow - --> $DIR/destructure_patterns.rs:64:54 + --> $DIR/destructure_patterns.rs:67:54 | LL | let (ref mut x, ref ref_str, (moved_s, _)) = t; | ^ note: Min Capture t[(1, 0)] -> ImmBorrow - --> $DIR/destructure_patterns.rs:64:54 + --> $DIR/destructure_patterns.rs:67:54 | LL | let (ref mut x, ref ref_str, (moved_s, _)) = t; | ^ note: Min Capture t[(2, 0),(0, 0)] -> ByValue - --> $DIR/destructure_patterns.rs:64:54 + --> $DIR/destructure_patterns.rs:67:54 | LL | let (ref mut x, ref ref_str, (moved_s, _)) = t; | ^ diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs index 269cf76e6735..26990b4305f8 100644 --- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs +++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.rs @@ -8,6 +8,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr index b936c5ee35a4..4e76070dcf7c 100644 --- a/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr +++ b/tests/ui/closures/2229_closure_analysis/feature-gate-capture_disjoint_fields.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/feature-gate-capture_disjoint_fields.rs:11:5 + --> $DIR/feature-gate-capture_disjoint_fields.rs:12:5 | LL | / || { LL | | @@ -20,13 +21,13 @@ LL | | }; | |_____^ | note: Capturing s[] -> ImmBorrow - --> $DIR/feature-gate-capture_disjoint_fields.rs:14:69 + --> $DIR/feature-gate-capture_disjoint_fields.rs:15:69 | LL | println!("This uses new capture analyysis to capture s={}", s); | ^ error: Min Capture analysis includes: - --> $DIR/feature-gate-capture_disjoint_fields.rs:11:5 + --> $DIR/feature-gate-capture_disjoint_fields.rs:12:5 | LL | / || { LL | | @@ -38,7 +39,7 @@ LL | | }; | |_____^ | note: Min Capture s[] -> ImmBorrow - --> $DIR/feature-gate-capture_disjoint_fields.rs:14:69 + --> $DIR/feature-gate-capture_disjoint_fields.rs:15:69 | LL | println!("This uses new capture analyysis to capture s={}", s); | ^ diff --git a/tests/ui/closures/2229_closure_analysis/issue-87378.rs b/tests/ui/closures/2229_closure_analysis/issue-87378.rs index 75901a5718ba..f0707b51bbb6 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-87378.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-87378.rs @@ -14,6 +14,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/issue-87378.stderr b/tests/ui/closures/2229_closure_analysis/issue-87378.stderr index 16c3f7c976dd..19c0c59170b3 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-87378.stderr +++ b/tests/ui/closures/2229_closure_analysis/issue-87378.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/issue-87378.rs:17:5 + --> $DIR/issue-87378.rs:18:5 | LL | / || { LL | | @@ -20,13 +21,13 @@ LL | | }; | |_____^ | note: Capturing u[(0, 0)] -> ImmBorrow - --> $DIR/issue-87378.rs:20:17 + --> $DIR/issue-87378.rs:21:17 | LL | unsafe { u.value } | ^^^^^^^ error: Min Capture analysis includes: - --> $DIR/issue-87378.rs:17:5 + --> $DIR/issue-87378.rs:18:5 | LL | / || { LL | | @@ -38,7 +39,7 @@ LL | | }; | |_____^ | note: Min Capture u[] -> ImmBorrow - --> $DIR/issue-87378.rs:20:17 + --> $DIR/issue-87378.rs:21:17 | LL | unsafe { u.value } | ^^^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/issue-88476.rs b/tests/ui/closures/2229_closure_analysis/issue-88476.rs index f5906d306007..58d86283f908 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-88476.rs +++ b/tests/ui/closures/2229_closure_analysis/issue-88476.rs @@ -20,6 +20,7 @@ pub fn test1() { let x = #[rustc_capture_analysis] move || { //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date //~| ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: println!("{:?}", f.0); @@ -47,6 +48,7 @@ fn test2() { let c = #[rustc_capture_analysis] move || { //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date //~| ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: println!("{}", character.hp) diff --git a/tests/ui/closures/2229_closure_analysis/issue-88476.stderr b/tests/ui/closures/2229_closure_analysis/issue-88476.stderr index c7c9ecbbb0e8..d02017571572 100644 --- a/tests/ui/closures/2229_closure_analysis/issue-88476.stderr +++ b/tests/ui/closures/2229_closure_analysis/issue-88476.stderr @@ -6,15 +6,17 @@ LL | let x = #[rustc_capture_analysis] move || { | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/issue-88476.rs:47:13 + --> $DIR/issue-88476.rs:48:13 | LL | let c = #[rustc_capture_analysis] move || { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: --> $DIR/issue-88476.rs:20:39 @@ -30,7 +32,7 @@ LL | | }; | |_____^ | note: Capturing f[(0, 0)] -> ImmBorrow - --> $DIR/issue-88476.rs:25:26 + --> $DIR/issue-88476.rs:26:26 | LL | println!("{:?}", f.0); | ^^^ @@ -49,13 +51,13 @@ LL | | }; | |_____^ | note: Min Capture f[] -> ByValue - --> $DIR/issue-88476.rs:25:26 + --> $DIR/issue-88476.rs:26:26 | LL | println!("{:?}", f.0); | ^^^ error: First Pass analysis includes: - --> $DIR/issue-88476.rs:47:39 + --> $DIR/issue-88476.rs:48:39 | LL | let c = #[rustc_capture_analysis] move || { | _______________________________________^ @@ -68,13 +70,13 @@ LL | | }; | |_____^ | note: Capturing character[(0, 0)] -> ImmBorrow - --> $DIR/issue-88476.rs:52:24 + --> $DIR/issue-88476.rs:54:24 | LL | println!("{}", character.hp) | ^^^^^^^^^^^^ error: Min Capture analysis includes: - --> $DIR/issue-88476.rs:47:39 + --> $DIR/issue-88476.rs:48:39 | LL | let c = #[rustc_capture_analysis] move || { | _______________________________________^ @@ -87,7 +89,7 @@ LL | | }; | |_____^ | note: Min Capture character[(0, 0)] -> ByValue - --> $DIR/issue-88476.rs:52:24 + --> $DIR/issue-88476.rs:54:24 | LL | println!("{}", character.hp) | ^^^^^^^^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/move_closure.rs b/tests/ui/closures/2229_closure_analysis/move_closure.rs index b542fa2430c3..31e04fa6d5c5 100644 --- a/tests/ui/closures/2229_closure_analysis/move_closure.rs +++ b/tests/ui/closures/2229_closure_analysis/move_closure.rs @@ -12,6 +12,7 @@ fn simple_move_closure() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -30,6 +31,7 @@ fn simple_ref() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -51,6 +53,7 @@ fn struct_contains_ref_to_another_struct_1() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -74,6 +77,7 @@ fn struct_contains_ref_to_another_struct_2() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -96,6 +100,7 @@ fn struct_contains_ref_to_another_struct_3() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -117,6 +122,7 @@ fn truncate_box_derefs() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -133,6 +139,7 @@ fn truncate_box_derefs() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -150,6 +157,7 @@ fn truncate_box_derefs() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date move || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -172,6 +180,7 @@ fn box_mut_1() { let c = #[rustc_capture_analysis] move || box_p_foo.x += 10; //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date //~| First Pass analysis includes: //~| NOTE: Capturing box_p_foo[Deref,Deref,(0, 0)] -> MutBorrow //~| Min Capture analysis includes: @@ -189,6 +198,7 @@ fn box_mut_2() { let c = #[rustc_capture_analysis] move || p_foo.x += 10; //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date //~| First Pass analysis includes: //~| NOTE: Capturing p_foo[Deref,Deref,(0, 0)] -> MutBorrow //~| Min Capture analysis includes: @@ -202,6 +212,7 @@ fn returned_closure_owns_copy_type_data() -> impl Fn() -> i32 { let c = #[rustc_capture_analysis] move || x; //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date //~| First Pass analysis includes: //~| NOTE: Capturing x[] -> ImmBorrow //~| Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/move_closure.stderr b/tests/ui/closures/2229_closure_analysis/move_closure.stderr index fd80e05c6893..7e9e3c5fed38 100644 --- a/tests/ui/closures/2229_closure_analysis/move_closure.stderr +++ b/tests/ui/closures/2229_closure_analysis/move_closure.stderr @@ -6,123 +6,134 @@ LL | let mut c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:30:17 + --> $DIR/move_closure.rs:31:17 | LL | let mut c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:51:17 + --> $DIR/move_closure.rs:53:17 | LL | let mut c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:74:17 + --> $DIR/move_closure.rs:77:17 | LL | let mut c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:96:17 + --> $DIR/move_closure.rs:100:17 | LL | let mut c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:117:13 + --> $DIR/move_closure.rs:122:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:133:13 + --> $DIR/move_closure.rs:139:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:150:13 + --> $DIR/move_closure.rs:157:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:172:13 + --> $DIR/move_closure.rs:180:13 | LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:189:13 + --> $DIR/move_closure.rs:198:13 | LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/move_closure.rs:202:13 + --> $DIR/move_closure.rs:212:13 | LL | let c = #[rustc_capture_analysis] move || x; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/move_closure.rs:202:39 + --> $DIR/move_closure.rs:212:39 | LL | let c = #[rustc_capture_analysis] move || x; | ^^^^^^^^^ | note: Capturing x[] -> ImmBorrow - --> $DIR/move_closure.rs:202:47 + --> $DIR/move_closure.rs:212:47 | LL | let c = #[rustc_capture_analysis] move || x; | ^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:202:39 + --> $DIR/move_closure.rs:212:39 | LL | let c = #[rustc_capture_analysis] move || x; | ^^^^^^^^^ | note: Min Capture x[] -> ByValue - --> $DIR/move_closure.rs:202:47 + --> $DIR/move_closure.rs:212:47 | LL | let c = #[rustc_capture_analysis] move || x; | ^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:15:5 + --> $DIR/move_closure.rs:16:5 | LL | / move || { LL | | @@ -134,13 +145,13 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0),(0, 0)] -> MutBorrow - --> $DIR/move_closure.rs:18:9 + --> $DIR/move_closure.rs:19:9 | LL | t.0.0 = "new S".into(); | ^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:15:5 + --> $DIR/move_closure.rs:16:5 | LL | / move || { LL | | @@ -152,13 +163,13 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0),(0, 0)] -> ByValue - --> $DIR/move_closure.rs:18:9 + --> $DIR/move_closure.rs:19:9 | LL | t.0.0 = "new S".into(); | ^^^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:33:5 + --> $DIR/move_closure.rs:35:5 | LL | / move || { LL | | @@ -170,13 +181,13 @@ LL | | }; | |_____^ | note: Capturing ref_s[Deref] -> MutBorrow - --> $DIR/move_closure.rs:36:9 + --> $DIR/move_closure.rs:38:9 | LL | *ref_s += 10; | ^^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:33:5 + --> $DIR/move_closure.rs:35:5 | LL | / move || { LL | | @@ -188,13 +199,13 @@ LL | | }; | |_____^ | note: Min Capture ref_s[] -> ByValue - --> $DIR/move_closure.rs:36:9 + --> $DIR/move_closure.rs:38:9 | LL | *ref_s += 10; | ^^^^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:54:5 + --> $DIR/move_closure.rs:57:5 | LL | / move || { LL | | @@ -206,13 +217,13 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0),Deref,(0, 0)] -> MutBorrow - --> $DIR/move_closure.rs:57:9 + --> $DIR/move_closure.rs:60:9 | LL | t.0.0 = "new s".into(); | ^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:54:5 + --> $DIR/move_closure.rs:57:5 | LL | / move || { LL | | @@ -224,13 +235,13 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> ByValue - --> $DIR/move_closure.rs:57:9 + --> $DIR/move_closure.rs:60:9 | LL | t.0.0 = "new s".into(); | ^^^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:77:5 + --> $DIR/move_closure.rs:81:5 | LL | / move || { LL | | @@ -242,13 +253,13 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow - --> $DIR/move_closure.rs:80:18 + --> $DIR/move_closure.rs:84:18 | LL | let _t = t.0.0; | ^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:77:5 + --> $DIR/move_closure.rs:81:5 | LL | / move || { LL | | @@ -260,13 +271,13 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> ByValue - --> $DIR/move_closure.rs:80:18 + --> $DIR/move_closure.rs:84:18 | LL | let _t = t.0.0; | ^^^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:99:5 + --> $DIR/move_closure.rs:104:5 | LL | / move || { LL | | @@ -278,13 +289,13 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0),Deref,(0, 0)] -> ByValue - --> $DIR/move_closure.rs:102:18 + --> $DIR/move_closure.rs:107:18 | LL | let _t = t.0.0; | ^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:99:5 + --> $DIR/move_closure.rs:104:5 | LL | / move || { LL | | @@ -296,13 +307,13 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> ByValue - --> $DIR/move_closure.rs:102:18 + --> $DIR/move_closure.rs:107:18 | LL | let _t = t.0.0; | ^^^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:120:5 + --> $DIR/move_closure.rs:126:5 | LL | / move || { LL | | @@ -314,13 +325,13 @@ LL | | }; | |_____^ | note: Capturing b[Deref,(0, 0)] -> ImmBorrow - --> $DIR/move_closure.rs:123:18 + --> $DIR/move_closure.rs:129:18 | LL | let _t = b.0; | ^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:120:5 + --> $DIR/move_closure.rs:126:5 | LL | / move || { LL | | @@ -332,13 +343,13 @@ LL | | }; | |_____^ | note: Min Capture b[] -> ByValue - --> $DIR/move_closure.rs:123:18 + --> $DIR/move_closure.rs:129:18 | LL | let _t = b.0; | ^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:136:5 + --> $DIR/move_closure.rs:143:5 | LL | / move || { LL | | @@ -350,13 +361,13 @@ LL | | }; | |_____^ | note: Capturing b[Deref,(0, 0)] -> ImmBorrow - --> $DIR/move_closure.rs:139:24 + --> $DIR/move_closure.rs:146:24 | LL | println!("{}", b.0); | ^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:136:5 + --> $DIR/move_closure.rs:143:5 | LL | / move || { LL | | @@ -368,13 +379,13 @@ LL | | }; | |_____^ | note: Min Capture b[] -> ByValue - --> $DIR/move_closure.rs:139:24 + --> $DIR/move_closure.rs:146:24 | LL | println!("{}", b.0); | ^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:153:5 + --> $DIR/move_closure.rs:161:5 | LL | / move || { LL | | @@ -386,13 +397,13 @@ LL | | }; | |_____^ | note: Capturing t[(1, 0),Deref,(0, 0)] -> ImmBorrow - --> $DIR/move_closure.rs:156:24 + --> $DIR/move_closure.rs:164:24 | LL | println!("{}", t.1.0); | ^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:153:5 + --> $DIR/move_closure.rs:161:5 | LL | / move || { LL | | @@ -404,55 +415,55 @@ LL | | }; | |_____^ | note: Min Capture t[(1, 0)] -> ByValue - --> $DIR/move_closure.rs:156:24 + --> $DIR/move_closure.rs:164:24 | LL | println!("{}", t.1.0); | ^^^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:172:39 + --> $DIR/move_closure.rs:180:39 | LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: Capturing box_p_foo[Deref,Deref,(0, 0)] -> MutBorrow - --> $DIR/move_closure.rs:172:47 + --> $DIR/move_closure.rs:180:47 | LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10; | ^^^^^^^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:172:39 + --> $DIR/move_closure.rs:180:39 | LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: Min Capture box_p_foo[] -> ByValue - --> $DIR/move_closure.rs:172:47 + --> $DIR/move_closure.rs:180:47 | LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10; | ^^^^^^^^^^^ error: First Pass analysis includes: - --> $DIR/move_closure.rs:189:39 + --> $DIR/move_closure.rs:198:39 | LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10; | ^^^^^^^^^^^^^^^^^^^^^ | note: Capturing p_foo[Deref,Deref,(0, 0)] -> MutBorrow - --> $DIR/move_closure.rs:189:47 + --> $DIR/move_closure.rs:198:47 | LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10; | ^^^^^^^ error: Min Capture analysis includes: - --> $DIR/move_closure.rs:189:39 + --> $DIR/move_closure.rs:198:39 | LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10; | ^^^^^^^^^^^^^^^^^^^^^ | note: Min Capture p_foo[] -> ByValue - --> $DIR/move_closure.rs:189:47 + --> $DIR/move_closure.rs:198:47 | LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10; | ^^^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs index a8a2acfa78d2..8a6ecfbb9be8 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.rs @@ -22,6 +22,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr index 29ad1c59198c..118a7dacec6a 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-1.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/multilevel-path-1.rs:25:5 + --> $DIR/multilevel-path-1.rs:26:5 | LL | / || { LL | | @@ -20,13 +21,13 @@ LL | | }; | |_____^ | note: Capturing w[(0, 0)] -> ImmBorrow - --> $DIR/multilevel-path-1.rs:28:19 + --> $DIR/multilevel-path-1.rs:29:19 | LL | let wp = &w.p; | ^^^ error: Min Capture analysis includes: - --> $DIR/multilevel-path-1.rs:25:5 + --> $DIR/multilevel-path-1.rs:26:5 | LL | / || { LL | | @@ -38,7 +39,7 @@ LL | | }; | |_____^ | note: Min Capture w[(0, 0)] -> ImmBorrow - --> $DIR/multilevel-path-1.rs:28:19 + --> $DIR/multilevel-path-1.rs:29:19 | LL | let wp = &w.p; | ^^^ diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs index e21fe318cd10..fff80f9c855f 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.rs @@ -17,6 +17,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr index 929cba113146..a7112531d9a2 100644 --- a/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr +++ b/tests/ui/closures/2229_closure_analysis/multilevel-path-2.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/multilevel-path-2.rs:20:5 + --> $DIR/multilevel-path-2.rs:21:5 | LL | / || { LL | | @@ -20,13 +21,13 @@ LL | | }; | |_____^ | note: Capturing w[(0, 0),(0, 0)] -> ImmBorrow - --> $DIR/multilevel-path-2.rs:23:24 + --> $DIR/multilevel-path-2.rs:24:24 | LL | println!("{}", w.p.x); | ^^^^^ error: Min Capture analysis includes: - --> $DIR/multilevel-path-2.rs:20:5 + --> $DIR/multilevel-path-2.rs:21:5 | LL | / || { LL | | @@ -38,7 +39,7 @@ LL | | }; | |_____^ | note: Min Capture w[(0, 0),(0, 0)] -> ImmBorrow - --> $DIR/multilevel-path-2.rs:23:24 + --> $DIR/multilevel-path-2.rs:24:24 | LL | println!("{}", w.p.x); | ^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/nested-closure.rs b/tests/ui/closures/2229_closure_analysis/nested-closure.rs index 22eae744b808..a7e3ef3b39c9 100644 --- a/tests/ui/closures/2229_closure_analysis/nested-closure.rs +++ b/tests/ui/closures/2229_closure_analysis/nested-closure.rs @@ -19,6 +19,7 @@ fn main() { let mut c1 = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -29,6 +30,7 @@ fn main() { let mut c2 = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || p.y += incr; //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/nested-closure.stderr b/tests/ui/closures/2229_closure_analysis/nested-closure.stderr index a50d0c6a182b..256bfd58597b 100644 --- a/tests/ui/closures/2229_closure_analysis/nested-closure.stderr +++ b/tests/ui/closures/2229_closure_analysis/nested-closure.stderr @@ -6,52 +6,54 @@ LL | let mut c1 = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/nested-closure.rs:29:22 + --> $DIR/nested-closure.rs:30:22 | LL | let mut c2 = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/nested-closure.rs:32:9 + --> $DIR/nested-closure.rs:34:9 | LL | || p.y += incr; | ^^^^^^^^^^^^^^ | note: Capturing p[(1, 0)] -> MutBorrow - --> $DIR/nested-closure.rs:32:12 + --> $DIR/nested-closure.rs:34:12 | LL | || p.y += incr; | ^^^ note: Capturing incr[] -> ImmBorrow - --> $DIR/nested-closure.rs:32:19 + --> $DIR/nested-closure.rs:34:19 | LL | || p.y += incr; | ^^^^ error: Min Capture analysis includes: - --> $DIR/nested-closure.rs:32:9 + --> $DIR/nested-closure.rs:34:9 | LL | || p.y += incr; | ^^^^^^^^^^^^^^ | note: Min Capture p[(1, 0)] -> MutBorrow - --> $DIR/nested-closure.rs:32:12 + --> $DIR/nested-closure.rs:34:12 | LL | || p.y += incr; | ^^^ note: Min Capture incr[] -> ImmBorrow - --> $DIR/nested-closure.rs:32:19 + --> $DIR/nested-closure.rs:34:19 | LL | || p.y += incr; | ^^^^ error: First Pass analysis includes: - --> $DIR/nested-closure.rs:22:5 + --> $DIR/nested-closure.rs:23:5 | LL | / || { LL | | @@ -63,23 +65,23 @@ LL | | }; | |_____^ | note: Capturing p[(0, 0)] -> ImmBorrow - --> $DIR/nested-closure.rs:25:24 + --> $DIR/nested-closure.rs:26:24 | LL | println!("{}", p.x); | ^^^ note: Capturing p[(1, 0)] -> MutBorrow - --> $DIR/nested-closure.rs:32:12 + --> $DIR/nested-closure.rs:34:12 | LL | || p.y += incr; | ^^^ note: Capturing p[(1, 0)] -> ImmBorrow - --> $DIR/nested-closure.rs:42:24 + --> $DIR/nested-closure.rs:44:24 | LL | println!("{}", p.y); | ^^^ error: Min Capture analysis includes: - --> $DIR/nested-closure.rs:22:5 + --> $DIR/nested-closure.rs:23:5 | LL | / || { LL | | @@ -91,12 +93,12 @@ LL | | }; | |_____^ | note: Min Capture p[(0, 0)] -> ImmBorrow - --> $DIR/nested-closure.rs:25:24 + --> $DIR/nested-closure.rs:26:24 | LL | println!("{}", p.x); | ^^^ note: Min Capture p[(1, 0)] -> MutBorrow - --> $DIR/nested-closure.rs:32:12 + --> $DIR/nested-closure.rs:34:12 | LL | || p.y += incr; | ^^^ diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs index e7edc0bbce39..a7686f3b08f0 100644 --- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs +++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.rs @@ -20,6 +20,7 @@ fn foo<'a, 'b>(m: &'a MyStruct<'b>) -> impl FnMut() + 'static { let c = #[rustc_capture_analysis] || drop(&m.a.0); //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date //~| ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: //~| NOTE: Capturing m[Deref,(0, 0),Deref,(0, 0)] -> ImmBorrow diff --git a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr index 87d5d5bee07d..99159ab58a2b 100644 --- a/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr +++ b/tests/ui/closures/2229_closure_analysis/optimization/edge_case.stderr @@ -6,6 +6,7 @@ LL | let c = #[rustc_capture_analysis] || drop(&m.a.0); | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: --> $DIR/edge_case.rs:20:39 diff --git a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs index 0c10319314a6..b8e2d6651a7f 100644 --- a/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs +++ b/tests/ui/closures/2229_closure_analysis/path-with-array-access.rs @@ -23,6 +23,7 @@ fn main() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr b/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr index 124b7bf6fe27..22bd13617c1b 100644 --- a/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr +++ b/tests/ui/closures/2229_closure_analysis/path-with-array-access.stderr @@ -6,9 +6,10 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/path-with-array-access.rs:26:5 + --> $DIR/path-with-array-access.rs:27:5 | LL | / || { LL | | @@ -20,13 +21,13 @@ LL | | }; | |_____^ | note: Capturing pent[(0, 0)] -> ImmBorrow - --> $DIR/path-with-array-access.rs:29:24 + --> $DIR/path-with-array-access.rs:30:24 | LL | println!("{}", pent.points[5].x); | ^^^^^^^^^^^ error: Min Capture analysis includes: - --> $DIR/path-with-array-access.rs:26:5 + --> $DIR/path-with-array-access.rs:27:5 | LL | / || { LL | | @@ -38,7 +39,7 @@ LL | | }; | |_____^ | note: Min Capture pent[(0, 0)] -> ImmBorrow - --> $DIR/path-with-array-access.rs:29:24 + --> $DIR/path-with-array-access.rs:30:24 | LL | println!("{}", pent.points[5].x); | ^^^^^^^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs index 2f8cddc06bab..26c227a1edd3 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.rs @@ -23,6 +23,7 @@ fn test_one() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: Min Capture analysis includes: //~| ERROR @@ -49,6 +50,7 @@ fn test_two() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: Min Capture analysis includes: //~| ERROR @@ -75,6 +77,7 @@ fn test_three() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: Min Capture analysis includes: //~| ERROR diff --git a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr index 2d1dc8727c25..82f770eafeda 100644 --- a/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr +++ b/tests/ui/closures/2229_closure_analysis/preserve_field_drop_order.stderr @@ -6,27 +6,30 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/preserve_field_drop_order.rs:49:13 + --> $DIR/preserve_field_drop_order.rs:50:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/preserve_field_drop_order.rs:75:13 + --> $DIR/preserve_field_drop_order.rs:77:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/preserve_field_drop_order.rs:26:5 + --> $DIR/preserve_field_drop_order.rs:27:5 | LL | / || { LL | | @@ -38,28 +41,28 @@ LL | | }; | |_____^ | note: Capturing a[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:29:26 + --> $DIR/preserve_field_drop_order.rs:30:26 | LL | println!("{:?}", a.0); | ^^^ note: Capturing a[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:32:26 + --> $DIR/preserve_field_drop_order.rs:33:26 | LL | println!("{:?}", a.1); | ^^^ note: Capturing b[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:36:26 + --> $DIR/preserve_field_drop_order.rs:37:26 | LL | println!("{:?}", b.0); | ^^^ note: Capturing b[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:39:26 + --> $DIR/preserve_field_drop_order.rs:40:26 | LL | println!("{:?}", b.1); | ^^^ error: Min Capture analysis includes: - --> $DIR/preserve_field_drop_order.rs:26:5 + --> $DIR/preserve_field_drop_order.rs:27:5 | LL | / || { LL | | @@ -71,28 +74,28 @@ LL | | }; | |_____^ | note: Min Capture a[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:29:26 + --> $DIR/preserve_field_drop_order.rs:30:26 | LL | println!("{:?}", a.0); | ^^^ note: Min Capture a[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:32:26 + --> $DIR/preserve_field_drop_order.rs:33:26 | LL | println!("{:?}", a.1); | ^^^ note: Min Capture b[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:36:26 + --> $DIR/preserve_field_drop_order.rs:37:26 | LL | println!("{:?}", b.0); | ^^^ note: Min Capture b[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:39:26 + --> $DIR/preserve_field_drop_order.rs:40:26 | LL | println!("{:?}", b.1); | ^^^ error: First Pass analysis includes: - --> $DIR/preserve_field_drop_order.rs:52:5 + --> $DIR/preserve_field_drop_order.rs:54:5 | LL | / || { LL | | @@ -104,28 +107,28 @@ LL | | }; | |_____^ | note: Capturing a[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:55:26 + --> $DIR/preserve_field_drop_order.rs:57:26 | LL | println!("{:?}", a.1); | ^^^ note: Capturing a[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:58:26 + --> $DIR/preserve_field_drop_order.rs:60:26 | LL | println!("{:?}", a.0); | ^^^ note: Capturing b[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:62:26 + --> $DIR/preserve_field_drop_order.rs:64:26 | LL | println!("{:?}", b.1); | ^^^ note: Capturing b[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:65:26 + --> $DIR/preserve_field_drop_order.rs:67:26 | LL | println!("{:?}", b.0); | ^^^ error: Min Capture analysis includes: - --> $DIR/preserve_field_drop_order.rs:52:5 + --> $DIR/preserve_field_drop_order.rs:54:5 | LL | / || { LL | | @@ -137,28 +140,28 @@ LL | | }; | |_____^ | note: Min Capture a[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:58:26 + --> $DIR/preserve_field_drop_order.rs:60:26 | LL | println!("{:?}", a.0); | ^^^ note: Min Capture a[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:55:26 + --> $DIR/preserve_field_drop_order.rs:57:26 | LL | println!("{:?}", a.1); | ^^^ note: Min Capture b[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:65:26 + --> $DIR/preserve_field_drop_order.rs:67:26 | LL | println!("{:?}", b.0); | ^^^ note: Min Capture b[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:62:26 + --> $DIR/preserve_field_drop_order.rs:64:26 | LL | println!("{:?}", b.1); | ^^^ error: First Pass analysis includes: - --> $DIR/preserve_field_drop_order.rs:78:5 + --> $DIR/preserve_field_drop_order.rs:81:5 | LL | / || { LL | | @@ -170,28 +173,28 @@ LL | | }; | |_____^ | note: Capturing b[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:81:26 + --> $DIR/preserve_field_drop_order.rs:84:26 | LL | println!("{:?}", b.1); | ^^^ note: Capturing a[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:84:26 + --> $DIR/preserve_field_drop_order.rs:87:26 | LL | println!("{:?}", a.1); | ^^^ note: Capturing a[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:87:26 + --> $DIR/preserve_field_drop_order.rs:90:26 | LL | println!("{:?}", a.0); | ^^^ note: Capturing b[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:91:26 + --> $DIR/preserve_field_drop_order.rs:94:26 | LL | println!("{:?}", b.0); | ^^^ error: Min Capture analysis includes: - --> $DIR/preserve_field_drop_order.rs:78:5 + --> $DIR/preserve_field_drop_order.rs:81:5 | LL | / || { LL | | @@ -203,22 +206,22 @@ LL | | }; | |_____^ | note: Min Capture b[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:91:26 + --> $DIR/preserve_field_drop_order.rs:94:26 | LL | println!("{:?}", b.0); | ^^^ note: Min Capture b[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:81:26 + --> $DIR/preserve_field_drop_order.rs:84:26 | LL | println!("{:?}", b.1); | ^^^ note: Min Capture a[(0, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:87:26 + --> $DIR/preserve_field_drop_order.rs:90:26 | LL | println!("{:?}", a.0); | ^^^ note: Min Capture a[(1, 0)] -> ImmBorrow - --> $DIR/preserve_field_drop_order.rs:84:26 + --> $DIR/preserve_field_drop_order.rs:87:26 | LL | println!("{:?}", a.1); | ^^^ diff --git a/tests/ui/closures/2229_closure_analysis/repr_packed.rs b/tests/ui/closures/2229_closure_analysis/repr_packed.rs index 8c23454fae98..3ed8587783e4 100644 --- a/tests/ui/closures/2229_closure_analysis/repr_packed.rs +++ b/tests/ui/closures/2229_closure_analysis/repr_packed.rs @@ -14,6 +14,7 @@ fn test_alignment_not_affected() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -44,6 +45,7 @@ fn test_alignment_affected() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -79,6 +81,7 @@ fn test_truncation_when_ref_and_move() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/repr_packed.stderr index 32b3d844c6e7..3bac41d60d56 100644 --- a/tests/ui/closures/2229_closure_analysis/repr_packed.stderr +++ b/tests/ui/closures/2229_closure_analysis/repr_packed.stderr @@ -6,27 +6,30 @@ LL | let mut c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/repr_packed.rs:44:17 + --> $DIR/repr_packed.rs:45:17 | LL | let mut c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/repr_packed.rs:79:13 + --> $DIR/repr_packed.rs:81:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/repr_packed.rs:17:5 + --> $DIR/repr_packed.rs:18:5 | LL | / || { LL | | @@ -38,18 +41,18 @@ LL | | }; | |_____^ | note: Capturing foo[] -> ImmBorrow - --> $DIR/repr_packed.rs:20:24 + --> $DIR/repr_packed.rs:21:24 | LL | let z1: &u8 = &foo.x; | ^^^^^ note: Capturing foo[] -> MutBorrow - --> $DIR/repr_packed.rs:22:32 + --> $DIR/repr_packed.rs:23:32 | LL | let z2: &mut u8 = &mut foo.y; | ^^^^^ error: Min Capture analysis includes: - --> $DIR/repr_packed.rs:17:5 + --> $DIR/repr_packed.rs:18:5 | LL | / || { LL | | @@ -61,13 +64,13 @@ LL | | }; | |_____^ | note: Min Capture foo[] -> MutBorrow - --> $DIR/repr_packed.rs:22:32 + --> $DIR/repr_packed.rs:23:32 | LL | let z2: &mut u8 = &mut foo.y; | ^^^^^ error: First Pass analysis includes: - --> $DIR/repr_packed.rs:47:5 + --> $DIR/repr_packed.rs:49:5 | LL | / || { LL | | @@ -79,18 +82,18 @@ LL | | }; | |_____^ | note: Capturing foo[] -> ImmBorrow - --> $DIR/repr_packed.rs:50:28 + --> $DIR/repr_packed.rs:52:28 | LL | let z1: &String = &foo.x; | ^^^^^ note: Capturing foo[] -> MutBorrow - --> $DIR/repr_packed.rs:52:33 + --> $DIR/repr_packed.rs:54:33 | LL | let z2: &mut u16 = &mut foo.y; | ^^^^^ error: Min Capture analysis includes: - --> $DIR/repr_packed.rs:47:5 + --> $DIR/repr_packed.rs:49:5 | LL | / || { LL | | @@ -102,13 +105,13 @@ LL | | }; | |_____^ | note: Min Capture foo[] -> MutBorrow - --> $DIR/repr_packed.rs:52:33 + --> $DIR/repr_packed.rs:54:33 | LL | let z2: &mut u16 = &mut foo.y; | ^^^^^ error: First Pass analysis includes: - --> $DIR/repr_packed.rs:82:5 + --> $DIR/repr_packed.rs:85:5 | LL | / || { LL | | @@ -120,18 +123,18 @@ LL | | }; | |_____^ | note: Capturing foo[] -> ImmBorrow - --> $DIR/repr_packed.rs:85:24 + --> $DIR/repr_packed.rs:88:24 | LL | println!("{}", foo.x); | ^^^^^ note: Capturing foo[(0, 0)] -> ByValue - --> $DIR/repr_packed.rs:89:18 + --> $DIR/repr_packed.rs:92:18 | LL | let _z = foo.x; | ^^^^^ error: Min Capture analysis includes: - --> $DIR/repr_packed.rs:82:5 + --> $DIR/repr_packed.rs:85:5 | LL | / || { LL | | @@ -143,7 +146,7 @@ LL | | }; | |_____^ | note: Min Capture foo[] -> ByValue - --> $DIR/repr_packed.rs:85:24 + --> $DIR/repr_packed.rs:88:24 | LL | println!("{}", foo.x); | ^^^^^ foo[] used here diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs index 563095d440d2..03b70383e541 100644 --- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs +++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.rs @@ -23,6 +23,7 @@ fn main() { let mut c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr index 05d79797ab3c..247dcbe94bce 100644 --- a/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr +++ b/tests/ui/closures/2229_closure_analysis/simple-struct-min-capture.stderr @@ -6,9 +6,10 @@ LL | let mut c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/simple-struct-min-capture.rs:26:5 + --> $DIR/simple-struct-min-capture.rs:27:5 | LL | / || { LL | | @@ -20,18 +21,18 @@ LL | | }; | |_____^ | note: Capturing p[(0, 0)] -> MutBorrow - --> $DIR/simple-struct-min-capture.rs:29:9 + --> $DIR/simple-struct-min-capture.rs:30:9 | LL | p.x += 10; | ^^^ note: Capturing p[] -> ImmBorrow - --> $DIR/simple-struct-min-capture.rs:32:26 + --> $DIR/simple-struct-min-capture.rs:33:26 | LL | println!("{:?}", p); | ^ error: Min Capture analysis includes: - --> $DIR/simple-struct-min-capture.rs:26:5 + --> $DIR/simple-struct-min-capture.rs:27:5 | LL | / || { LL | | @@ -43,7 +44,7 @@ LL | | }; | |_____^ | note: Min Capture p[] -> MutBorrow - --> $DIR/simple-struct-min-capture.rs:29:9 + --> $DIR/simple-struct-min-capture.rs:30:9 | LL | p.x += 10; | ^^^ p[] captured as MutBorrow here diff --git a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs index eab9f9d08a9f..1f87c9b99925 100644 --- a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs +++ b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.rs @@ -25,6 +25,7 @@ fn unsafe_imm() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || unsafe { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -45,6 +46,7 @@ fn unsafe_mut() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr index e740a4d2d6b8..4f3de075054c 100644 --- a/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr +++ b/tests/ui/closures/2229_closure_analysis/unsafe_ptr.stderr @@ -6,18 +6,20 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/unsafe_ptr.rs:45:13 + --> $DIR/unsafe_ptr.rs:46:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/unsafe_ptr.rs:28:6 + --> $DIR/unsafe_ptr.rs:29:6 | LL | / || unsafe { LL | | @@ -29,13 +31,13 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow - --> $DIR/unsafe_ptr.rs:31:26 + --> $DIR/unsafe_ptr.rs:32:26 | LL | println!("{:?}", (*t.0).s); | ^^^^^^^^ error: Min Capture analysis includes: - --> $DIR/unsafe_ptr.rs:28:6 + --> $DIR/unsafe_ptr.rs:29:6 | LL | / || unsafe { LL | | @@ -47,13 +49,13 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> ImmBorrow - --> $DIR/unsafe_ptr.rs:31:26 + --> $DIR/unsafe_ptr.rs:32:26 | LL | println!("{:?}", (*t.0).s); | ^^^^^^^^ error: First Pass analysis includes: - --> $DIR/unsafe_ptr.rs:48:5 + --> $DIR/unsafe_ptr.rs:50:5 | LL | / || { LL | | @@ -65,13 +67,13 @@ LL | | }; | |_____^ | note: Capturing p[Deref,(0, 0)] -> ImmBorrow - --> $DIR/unsafe_ptr.rs:51:31 + --> $DIR/unsafe_ptr.rs:53:31 | LL | let x = unsafe { &mut (*p).s }; | ^^^^^^ error: Min Capture analysis includes: - --> $DIR/unsafe_ptr.rs:48:5 + --> $DIR/unsafe_ptr.rs:50:5 | LL | / || { LL | | @@ -83,7 +85,7 @@ LL | | }; | |_____^ | note: Min Capture p[] -> ImmBorrow - --> $DIR/unsafe_ptr.rs:51:31 + --> $DIR/unsafe_ptr.rs:53:31 | LL | let x = unsafe { &mut (*p).s }; | ^^^^^^ diff --git a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs index a795088a1d94..12695929fced 100644 --- a/tests/ui/closures/2229_closure_analysis/wild_patterns.rs +++ b/tests/ui/closures/2229_closure_analysis/wild_patterns.rs @@ -22,6 +22,7 @@ fn wild_struct() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -40,6 +41,7 @@ fn wild_tuple() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: @@ -58,6 +60,7 @@ fn wild_arr() { let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are experimental //~| NOTE: see issue #15701 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date || { //~^ ERROR: First Pass analysis includes: //~| ERROR: Min Capture analysis includes: diff --git a/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr b/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr index c64378091e6e..88b48aaaf8c2 100644 --- a/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr +++ b/tests/ui/closures/2229_closure_analysis/wild_patterns.stderr @@ -6,27 +6,30 @@ LL | let c = #[rustc_capture_analysis] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/wild_patterns.rs:40:13 + --> $DIR/wild_patterns.rs:41:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental - --> $DIR/wild_patterns.rs:58:13 + --> $DIR/wild_patterns.rs:60:13 | LL | let c = #[rustc_capture_analysis] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: First Pass analysis includes: - --> $DIR/wild_patterns.rs:25:5 + --> $DIR/wild_patterns.rs:26:5 | LL | / || { LL | | @@ -38,13 +41,13 @@ LL | | }; | |_____^ | note: Capturing p[(0, 0)] -> ImmBorrow - --> $DIR/wild_patterns.rs:29:37 + --> $DIR/wild_patterns.rs:30:37 | LL | let Point { x: _x, y: _ } = p; | ^ error: Min Capture analysis includes: - --> $DIR/wild_patterns.rs:25:5 + --> $DIR/wild_patterns.rs:26:5 | LL | / || { LL | | @@ -56,13 +59,13 @@ LL | | }; | |_____^ | note: Min Capture p[(0, 0)] -> ImmBorrow - --> $DIR/wild_patterns.rs:29:37 + --> $DIR/wild_patterns.rs:30:37 | LL | let Point { x: _x, y: _ } = p; | ^ error: First Pass analysis includes: - --> $DIR/wild_patterns.rs:43:5 + --> $DIR/wild_patterns.rs:45:5 | LL | / || { LL | | @@ -74,13 +77,13 @@ LL | | }; | |_____^ | note: Capturing t[(0, 0)] -> ByValue - --> $DIR/wild_patterns.rs:47:23 + --> $DIR/wild_patterns.rs:49:23 | LL | let (_x, _) = t; | ^ error: Min Capture analysis includes: - --> $DIR/wild_patterns.rs:43:5 + --> $DIR/wild_patterns.rs:45:5 | LL | / || { LL | | @@ -92,13 +95,13 @@ LL | | }; | |_____^ | note: Min Capture t[(0, 0)] -> ByValue - --> $DIR/wild_patterns.rs:47:23 + --> $DIR/wild_patterns.rs:49:23 | LL | let (_x, _) = t; | ^ error: First Pass analysis includes: - --> $DIR/wild_patterns.rs:61:5 + --> $DIR/wild_patterns.rs:64:5 | LL | / || { LL | | @@ -110,13 +113,13 @@ LL | | }; | |_____^ | note: Capturing arr[Index] -> ByValue - --> $DIR/wild_patterns.rs:65:23 + --> $DIR/wild_patterns.rs:68:23 | LL | let [_x, _] = arr; | ^^^ error: Min Capture analysis includes: - --> $DIR/wild_patterns.rs:61:5 + --> $DIR/wild_patterns.rs:64:5 | LL | / || { LL | | @@ -128,7 +131,7 @@ LL | | }; | |_____^ | note: Min Capture arr[] -> ByValue - --> $DIR/wild_patterns.rs:65:23 + --> $DIR/wild_patterns.rs:68:23 | LL | let [_x, _] = arr; | ^^^ diff --git a/tests/ui/closures/binder/disallow-const.stderr b/tests/ui/closures/binder/disallow-const.stderr index d38b233d99a8..fa56ec863126 100644 --- a/tests/ui/closures/binder/disallow-const.stderr +++ b/tests/ui/closures/binder/disallow-const.stderr @@ -6,6 +6,7 @@ LL | for || -> () {}; | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/closures/binder/disallow-ty.stderr b/tests/ui/closures/binder/disallow-ty.stderr index bc6696ad36b4..f8a33e08f75e 100644 --- a/tests/ui/closures/binder/disallow-ty.stderr +++ b/tests/ui/closures/binder/disallow-ty.stderr @@ -6,6 +6,7 @@ LL | for || -> () {}; | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr index 0a5884d38f78..64e9b7cc6395 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-call/gate_test.stderr @@ -6,6 +6,7 @@ LL | core::mem::transmute:: for more information = help: add `#![feature(abi_c_cmse_nonsecure_call)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr index 75a29b317df8..beb9716d5906 100644 --- a/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr +++ b/tests/ui/cmse-nonsecure/cmse-nonsecure-entry/gate_test.stderr @@ -6,6 +6,7 @@ LL | #[cmse_nonsecure_entry] | = note: see issue #75835 for more information = help: add `#![feature(cmse_nonsecure_entry)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0775]: `#[cmse_nonsecure_entry]` is only valid for targets with the TrustZone-M extension --> $DIR/gate_test.rs:4:1 diff --git a/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr b/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr index 82dc43619990..742764fe0efd 100644 --- a/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr +++ b/tests/ui/conditional-compilation/cfg-attr-crate-2.stderr @@ -6,6 +6,7 @@ LL | #![cfg_attr(broken, no_core)] | = note: see issue #29639 for more information = help: add `#![feature(no_core)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr index daba4eb1a63d..7827552096c1 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr +++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-1.stderr @@ -6,6 +6,7 @@ LL | #![cfg_attr(broken, no_core, no_std)] | = note: see issue #29639 for more information = help: add `#![feature(no_core)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr index 675792d2e321..d8768c3f3103 100644 --- a/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr +++ b/tests/ui/conditional-compilation/cfg-attr-multi-invalid-2.stderr @@ -6,6 +6,7 @@ LL | #![cfg_attr(broken, no_std, no_core)] | = note: see issue #29639 for more information = help: add `#![feature(no_core)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/conditional-compilation/cfg-generic-params.stderr b/tests/ui/conditional-compilation/cfg-generic-params.stderr index f733c09c22e6..4143e2019aed 100644 --- a/tests/ui/conditional-compilation/cfg-generic-params.stderr +++ b/tests/ui/conditional-compilation/cfg-generic-params.stderr @@ -36,6 +36,7 @@ LL | type FnBad = for<#[cfg(no)] 'a, #[cfg(yes)] T> fn(); | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: only lifetime parameters can be used in this context --> $DIR/cfg-generic-params.rs:11:51 @@ -45,6 +46,7 @@ LL | type PolyBad = dyn for<#[cfg(no)] 'a, #[cfg(yes)] T> Copy; | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: only lifetime parameters can be used in this context --> $DIR/cfg-generic-params.rs:15:54 @@ -54,6 +56,7 @@ LL | struct WhereBad where for<#[cfg(no)] 'a, #[cfg(yes)] T> u8: Copy; | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 8 previous errors diff --git a/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr b/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr index f03441909767..201f6a13f1fa 100644 --- a/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr +++ b/tests/ui/conditional-compilation/cfg_accessible-unstable.stderr @@ -6,6 +6,7 @@ LL | #[cfg_accessible(std)] | = note: see issue #64797 for more information = help: add `#![feature(cfg_accessible)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr index 4f4e1aa3a046..92dedd74feb5 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013-no-kw.stderr @@ -6,6 +6,7 @@ LL | impl Foo for Bar { | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/issue-89013-no-kw.rs:9:6 diff --git a/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr b/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr index 3d2b98feb39c..801d14b39505 100644 --- a/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr +++ b/tests/ui/const-generics/parser-error-recovery/issue-89013.stderr @@ -18,6 +18,7 @@ LL | impl Foo for Bar { | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0107]: trait takes 1 generic argument but 0 generic arguments were supplied --> $DIR/issue-89013.rs:9:6 diff --git a/tests/ui/consts/async-block.without_feature.stderr b/tests/ui/consts/async-block.without_feature.stderr index 751627c52264..d31e88724bb5 100644 --- a/tests/ui/consts/async-block.without_feature.stderr +++ b/tests/ui/consts/async-block.without_feature.stderr @@ -6,6 +6,7 @@ LL | const _: i32 = { core::mem::ManuallyDrop::new(async { 0 }); 4 }; | = note: see issue #85368 for more information = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `async` blocks are not allowed in statics --> $DIR/async-block.rs:15:51 @@ -15,6 +16,7 @@ LL | static _FUT: &(dyn Future + Sync) = &async {}; | = note: see issue #85368 for more information = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-address-of-interior-mut.stderr b/tests/ui/consts/const-address-of-interior-mut.stderr index 93120753b1a0..12c8917d740f 100644 --- a/tests/ui/consts/const-address-of-interior-mut.stderr +++ b/tests/ui/consts/const-address-of-interior-mut.stderr @@ -6,6 +6,7 @@ LL | const A: () = { let x = Cell::new(2); &raw const x; }; | = note: see issue #80384 for more information = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability --> $DIR/const-address-of-interior-mut.rs:7:40 @@ -15,6 +16,7 @@ LL | static B: () = { let x = Cell::new(2); &raw const x; }; | = note: see issue #80384 for more information = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability --> $DIR/const-address-of-interior-mut.rs:9:44 @@ -24,6 +26,7 @@ LL | static mut C: () = { let x = Cell::new(2); &raw const x; }; | = note: see issue #80384 for more information = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability --> $DIR/const-address-of-interior-mut.rs:13:13 @@ -33,6 +36,7 @@ LL | let y = &raw const x; | = note: see issue #80384 for more information = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/consts/const-address-of-mut.stderr b/tests/ui/consts/const-address-of-mut.stderr index 60cdcc7df744..2a69bb8be97d 100644 --- a/tests/ui/consts/const-address-of-mut.stderr +++ b/tests/ui/consts/const-address-of-mut.stderr @@ -6,6 +6,7 @@ LL | const A: () = { let mut x = 2; &raw mut x; }; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw mutable references are not allowed in statics --> $DIR/const-address-of-mut.rs:5:33 @@ -15,6 +16,7 @@ LL | static B: () = { let mut x = 2; &raw mut x; }; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw mutable references are not allowed in statics --> $DIR/const-address-of-mut.rs:7:37 @@ -24,6 +26,7 @@ LL | static mut C: () = { let mut x = 2; &raw mut x; }; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw mutable references are not allowed in constant functions --> $DIR/const-address-of-mut.rs:11:13 @@ -33,6 +36,7 @@ LL | let y = &raw mut x; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/consts/const-eval/issue-114994-fail.stderr b/tests/ui/consts/const-eval/issue-114994-fail.stderr index 4dae8ea9bcab..70b224b9b4c9 100644 --- a/tests/ui/consts/const-eval/issue-114994-fail.stderr +++ b/tests/ui/consts/const-eval/issue-114994-fail.stderr @@ -6,6 +6,7 @@ LL | const fn use_mut_const_fn(_f: &mut fn(&mut String)) { | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/issue-114994-fail.rs:10:33 @@ -15,6 +16,7 @@ LL | const fn use_mut_const_tuple_fn(_f: (fn(), &mut u32)) { | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-eval/issue-65394.stderr b/tests/ui/consts/const-eval/issue-65394.stderr index ae6f0e937168..1fa4da4a78be 100644 --- a/tests/ui/consts/const-eval/issue-65394.stderr +++ b/tests/ui/consts/const-eval/issue-65394.stderr @@ -6,6 +6,7 @@ LL | let r = &mut x; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0493]: destructor of `Vec` cannot be evaluated at compile-time --> $DIR/issue-65394.rs:7:9 diff --git a/tests/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr b/tests/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr index 4bab466fb95a..29fa90d611c6 100644 --- a/tests/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr +++ b/tests/ui/consts/const-extern-fn/const-extern-fn-min-const-fn.stderr @@ -6,6 +6,7 @@ LL | const unsafe extern "C" fn use_float() { 1.0 + 1.0; } | = note: see issue #57241 for more information = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: pointers cannot be cast to integers during const eval --> $DIR/const-extern-fn-min-const-fn.rs:7:48 diff --git a/tests/ui/consts/const-extern-fn/feature-gate-const_extern_fn.stderr b/tests/ui/consts/const-extern-fn/feature-gate-const_extern_fn.stderr index f8c3107bd221..81fb62e10a72 100644 --- a/tests/ui/consts/const-extern-fn/feature-gate-const_extern_fn.stderr +++ b/tests/ui/consts/const-extern-fn/feature-gate-const_extern_fn.stderr @@ -6,6 +6,7 @@ LL | const extern "cdecl" fn foo4() {} | = note: see issue #64926 for more information = help: add `#![feature(const_extern_fn)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cdecl` as a `const fn` ABI is unstable --> $DIR/feature-gate-const_extern_fn.rs:11:21 @@ -15,6 +16,7 @@ LL | const unsafe extern "cdecl" fn bar4() {} | = note: see issue #64926 for more information = help: add `#![feature(const_extern_fn)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-fn-error.stderr b/tests/ui/consts/const-fn-error.stderr index f735b3d53ce4..68c335c71d95 100644 --- a/tests/ui/consts/const-fn-error.stderr +++ b/tests/ui/consts/const-fn-error.stderr @@ -12,6 +12,7 @@ LL | | } | = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0015]: cannot convert `std::ops::Range` into an iterator in constant functions --> $DIR/const-fn-error.rs:5:14 @@ -32,6 +33,7 @@ LL | for i in 0..x { | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0015]: cannot call non-const fn ` as Iterator>::next` in constant functions --> $DIR/const-fn-error.rs:5:14 diff --git a/tests/ui/consts/const-for-feature-gate.stderr b/tests/ui/consts/const-for-feature-gate.stderr index 0c24bbad7dd4..df79c00f024f 100644 --- a/tests/ui/consts/const-for-feature-gate.stderr +++ b/tests/ui/consts/const-for-feature-gate.stderr @@ -6,6 +6,7 @@ LL | for _ in 0..5 {} | = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/consts/const-multi-ref.stderr b/tests/ui/consts/const-multi-ref.stderr index dd5cadfe2951..516162194cdf 100644 --- a/tests/ui/consts/const-multi-ref.stderr +++ b/tests/ui/consts/const-multi-ref.stderr @@ -6,6 +6,7 @@ LL | let p = &mut a; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability --> $DIR/const-multi-ref.rs:16:13 @@ -15,6 +16,7 @@ LL | let p = &a; | = note: see issue #80384 for more information = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr b/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr index 7d8d062dbbed..212d172fe131 100644 --- a/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr +++ b/tests/ui/consts/const-mut-refs/feature-gate-const_mut_refs.stderr @@ -6,6 +6,7 @@ LL | const fn foo(x: &mut i32) -> i32 { | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr b/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr index 61b00be345fe..dc04d85770e7 100644 --- a/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr +++ b/tests/ui/consts/const-mut-refs/issue-76510.32bit.stderr @@ -12,6 +12,7 @@ LL | const S: &'static mut str = &mut " hello "; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/issue-76510.rs:5:29 diff --git a/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr b/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr index 61b00be345fe..dc04d85770e7 100644 --- a/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr +++ b/tests/ui/consts/const-mut-refs/issue-76510.64bit.stderr @@ -12,6 +12,7 @@ LL | const S: &'static mut str = &mut " hello "; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0596]: cannot borrow data in a `&` reference as mutable --> $DIR/issue-76510.rs:5:29 diff --git a/tests/ui/consts/const-suggest-feature.stderr b/tests/ui/consts/const-suggest-feature.stderr index d4a42a880e32..faa1226ca254 100644 --- a/tests/ui/consts/const-suggest-feature.stderr +++ b/tests/ui/consts/const-suggest-feature.stderr @@ -6,6 +6,7 @@ LL | *std::ptr::null_mut() = 0; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/consts/const-try-feature-gate.stderr b/tests/ui/consts/const-try-feature-gate.stderr index 79c6ec108b96..c5aeed3317cc 100644 --- a/tests/ui/consts/const-try-feature-gate.stderr +++ b/tests/ui/consts/const-try-feature-gate.stderr @@ -6,6 +6,7 @@ LL | Some(())?; | = note: see issue #74935 for more information = help: add `#![feature(const_try)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/consts/const_fn_floating_point_arithmetic.stock.stderr b/tests/ui/consts/const_fn_floating_point_arithmetic.stock.stderr index ef7a60faf3f5..b5b94786ebb9 100644 --- a/tests/ui/consts/const_fn_floating_point_arithmetic.stock.stderr +++ b/tests/ui/consts/const_fn_floating_point_arithmetic.stock.stderr @@ -6,6 +6,7 @@ LL | const fn add(f: f32) -> f32 { f + 2.0 } | = note: see issue #57241 for more information = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: floating point arithmetic is not allowed in constant functions --> $DIR/const_fn_floating_point_arithmetic.rs:10:31 @@ -15,6 +16,7 @@ LL | const fn sub(f: f32) -> f32 { 2.0 - f } | = note: see issue #57241 for more information = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: floating point arithmetic is not allowed in constant functions --> $DIR/const_fn_floating_point_arithmetic.rs:12:39 @@ -24,6 +26,7 @@ LL | const fn mul(f: f32, g: f32) -> f32 { f * g } | = note: see issue #57241 for more information = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: floating point arithmetic is not allowed in constant functions --> $DIR/const_fn_floating_point_arithmetic.rs:14:39 @@ -33,6 +36,7 @@ LL | const fn div(f: f32, g: f32) -> f32 { f / g } | = note: see issue #57241 for more information = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: floating point arithmetic is not allowed in constant functions --> $DIR/const_fn_floating_point_arithmetic.rs:16:31 @@ -42,6 +46,7 @@ LL | const fn neg(f: f32) -> f32 { -f } | = note: see issue #57241 for more information = help: add `#![feature(const_fn_floating_point_arithmetic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors diff --git a/tests/ui/consts/const_let_assign3.stderr b/tests/ui/consts/const_let_assign3.stderr index 89073f975e88..40c11acee5c9 100644 --- a/tests/ui/consts/const_let_assign3.stderr +++ b/tests/ui/consts/const_let_assign3.stderr @@ -6,6 +6,7 @@ LL | const fn foo(&mut self, x: u32) { | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constants --> $DIR/const_let_assign3.rs:14:5 @@ -15,6 +16,7 @@ LL | s.foo(3); | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constants --> $DIR/const_let_assign3.rs:20:13 @@ -24,6 +26,7 @@ LL | let y = &mut x; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/consts/control-flow/loop.stderr b/tests/ui/consts/control-flow/loop.stderr index 5f6ad8c105d7..725adf723392 100644 --- a/tests/ui/consts/control-flow/loop.stderr +++ b/tests/ui/consts/control-flow/loop.stderr @@ -8,6 +8,7 @@ LL | | } | = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `for` is not allowed in a `const` --> $DIR/loop.rs:57:5 @@ -19,6 +20,7 @@ LL | | } | = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/consts/control-flow/try.stderr b/tests/ui/consts/control-flow/try.stderr index 7351f5c0a6f9..f4b88de9dfab 100644 --- a/tests/ui/consts/control-flow/try.stderr +++ b/tests/ui/consts/control-flow/try.stderr @@ -6,6 +6,7 @@ LL | x?; | = note: see issue #74935 for more information = help: add `#![feature(const_try)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/consts/gate-do-not-const-check.stderr b/tests/ui/consts/gate-do-not-const-check.stderr index 27a2c23a6788..74ea71c4ed80 100644 --- a/tests/ui/consts/gate-do-not-const-check.stderr +++ b/tests/ui/consts/gate-do-not-const-check.stderr @@ -5,6 +5,7 @@ LL | #[rustc_do_not_const_check] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/consts/min_const_fn/address_of.stderr b/tests/ui/consts/min_const_fn/address_of.stderr index facc566513c2..4c23ba6cd519 100644 --- a/tests/ui/consts/min_const_fn/address_of.stderr +++ b/tests/ui/consts/min_const_fn/address_of.stderr @@ -6,6 +6,7 @@ LL | let b = &raw mut a; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw mutable references are not allowed in constant functions --> $DIR/address_of.rs:13:17 @@ -15,6 +16,7 @@ LL | let b = &raw mut a; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/consts/min_const_fn/min_const_fn.stderr b/tests/ui/consts/min_const_fn/min_const_fn.stderr index 11c79e8e2d6a..d646c7de8da7 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn.stderr +++ b/tests/ui/consts/min_const_fn/min_const_fn.stderr @@ -14,6 +14,7 @@ LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:39:36 @@ -23,6 +24,7 @@ LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:39:45 @@ -32,6 +34,7 @@ LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0493]: destructor of `Foo` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:46:28 @@ -49,6 +52,7 @@ LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:48:42 @@ -58,6 +62,7 @@ LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:48:51 @@ -67,6 +72,7 @@ LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0493]: destructor of `Foo` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:55:27 @@ -84,6 +90,7 @@ LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:57:38 @@ -93,6 +100,7 @@ LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:57:47 @@ -102,6 +110,7 @@ LL | const fn get_mut_s(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:64:25 @@ -111,6 +120,7 @@ LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:64:39 @@ -120,6 +130,7 @@ LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:64:48 @@ -129,6 +140,7 @@ LL | const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0013]: constant functions cannot refer to statics --> $DIR/min_const_fn.rs:89:27 @@ -190,6 +202,7 @@ LL | const fn inc(x: &mut i32) { *x += 1 } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0493]: destructor of `AlanTuring` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:122:19 diff --git a/tests/ui/consts/min_const_fn/min_const_fn_unsafe_bad.stderr b/tests/ui/consts/min_const_fn/min_const_fn_unsafe_bad.stderr index e68376e7b87f..13d733494d21 100644 --- a/tests/ui/consts/min_const_fn/min_const_fn_unsafe_bad.stderr +++ b/tests/ui/consts/min_const_fn/min_const_fn_unsafe_bad.stderr @@ -6,6 +6,7 @@ LL | const fn bad_const_fn_deref_raw(x: *mut usize) -> &'static usize { unsafe { | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: dereferencing raw mutable pointers in constant functions is unstable --> $DIR/min_const_fn_unsafe_bad.rs:4:70 @@ -15,6 +16,7 @@ LL | const unsafe fn bad_const_unsafe_deref_raw(x: *mut usize) -> usize { *x } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: dereferencing raw mutable pointers in constant functions is unstable --> $DIR/min_const_fn_unsafe_bad.rs:7:83 @@ -24,6 +26,7 @@ LL | const unsafe fn bad_const_unsafe_deref_raw_ref(x: *mut usize) -> &'static u | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: dereferencing raw mutable pointers in constant functions is unstable --> $DIR/min_const_fn_unsafe_bad.rs:10:80 @@ -33,6 +36,7 @@ LL | const unsafe fn bad_const_unsafe_deref_raw_underscore(x: *mut usize) { let | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/consts/min_const_fn/mutable_borrow.stderr b/tests/ui/consts/min_const_fn/mutable_borrow.stderr index 8e95a4c68a2a..31653602c75d 100644 --- a/tests/ui/consts/min_const_fn/mutable_borrow.stderr +++ b/tests/ui/consts/min_const_fn/mutable_borrow.stderr @@ -6,6 +6,7 @@ LL | let b = &mut a; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/mutable_borrow.rs:12:17 @@ -15,6 +16,7 @@ LL | let b = &mut a; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr b/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr index c6e5b07e3b70..e9fe82d2f87a 100644 --- a/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr +++ b/tests/ui/consts/static_mut_containing_mut_ref2.stock.stderr @@ -21,6 +21,7 @@ LL | *(&mut STDERR_BUFFER_SPACE) = 42; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/consts/write_to_mut_ref_dest.stock.stderr b/tests/ui/consts/write_to_mut_ref_dest.stock.stderr index bb1059276063..688d48ec707c 100644 --- a/tests/ui/consts/write_to_mut_ref_dest.stock.stderr +++ b/tests/ui/consts/write_to_mut_ref_dest.stock.stderr @@ -6,6 +6,7 @@ LL | let b: *mut u32 = &mut a; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: dereferencing raw mutable pointers in constants is unstable --> $DIR/write_to_mut_ref_dest.rs:12:18 @@ -15,6 +16,7 @@ LL | unsafe { *b = 5; } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/coroutine/async_gen_fn.e2024.stderr b/tests/ui/coroutine/async_gen_fn.e2024.stderr index d24cdbbc30d2..37dc674a7e3a 100644 --- a/tests/ui/coroutine/async_gen_fn.e2024.stderr +++ b/tests/ui/coroutine/async_gen_fn.e2024.stderr @@ -6,6 +6,7 @@ LL | async gen fn foo() {} | = note: see issue #117078 for more information = help: add `#![feature(gen_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/coroutine/gen_block.e2024.stderr b/tests/ui/coroutine/gen_block.e2024.stderr index e32f80dafa0c..2b9eb4a820b6 100644 --- a/tests/ui/coroutine/gen_block.e2024.stderr +++ b/tests/ui/coroutine/gen_block.e2024.stderr @@ -6,6 +6,7 @@ LL | let _ = || yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0282]: type annotations needed --> $DIR/gen_block.rs:6:13 diff --git a/tests/ui/coroutine/gen_block.none.stderr b/tests/ui/coroutine/gen_block.none.stderr index 012a8308c7f7..78a8c5e798ad 100644 --- a/tests/ui/coroutine/gen_block.none.stderr +++ b/tests/ui/coroutine/gen_block.none.stderr @@ -32,6 +32,7 @@ LL | let _ = || yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: yield syntax is experimental --> $DIR/gen_block.rs:15:16 @@ -41,6 +42,7 @@ LL | let _ = || yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: aborting due to 6 previous errors diff --git a/tests/ui/coroutine/gen_fn.e2024.stderr b/tests/ui/coroutine/gen_fn.e2024.stderr index 9ad890af3e1e..9c1843a0f526 100644 --- a/tests/ui/coroutine/gen_fn.e2024.stderr +++ b/tests/ui/coroutine/gen_fn.e2024.stderr @@ -6,6 +6,7 @@ LL | gen fn foo() {} | = note: see issue #117078 for more information = help: add `#![feature(gen_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/delegation/bad-resolve.rs b/tests/ui/delegation/bad-resolve.rs new file mode 100644 index 000000000000..df456f94507b --- /dev/null +++ b/tests/ui/delegation/bad-resolve.rs @@ -0,0 +1,47 @@ +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +trait Trait { + const C: u32 = 0; + type Type; + fn bar() {} + fn foo(&self, x: i32) -> i32 { x } +} + +struct F; +impl Trait for F { + type Type = i32; +} + +impl F { + fn foo(&self, x: i32) -> i32 { x } +} + +struct S(F); + +impl Trait for S { +//~^ ERROR not all trait items implemented, missing: `Type` + reuse ::C; + //~^ ERROR item `C` is an associated method, which doesn't match its trait `Trait` + //~| ERROR expected function, found associated constant `Trait::C` + reuse ::Type; + //~^ ERROR item `Type` is an associated method, which doesn't match its trait `Trait` + //~| ERROR expected method or associated constant, found associated type `Trait::Type` + reuse ::baz; + //~^ ERROR method `baz` is not a member of trait `Trait` + //~| ERROR cannot find method or associated constant `baz` in trait `Trait` + reuse ::bar; + + reuse foo { &self.0 } + //~^ ERROR cannot find function `foo` in this scope + reuse F::foo { &self.0 } + //~^ ERROR cannot find function `foo` in `F` + //~| ERROR duplicate definitions with name `foo` +} + +impl S { + reuse F::foo { &self.0 } + //~^ ERROR cannot find function `foo` in `F` +} + +fn main() {} diff --git a/tests/ui/delegation/bad-resolve.stderr b/tests/ui/delegation/bad-resolve.stderr new file mode 100644 index 000000000000..d52066373100 --- /dev/null +++ b/tests/ui/delegation/bad-resolve.stderr @@ -0,0 +1,102 @@ +error[E0324]: item `C` is an associated method, which doesn't match its trait `Trait` + --> $DIR/bad-resolve.rs:24:5 + | +LL | const C: u32 = 0; + | ----------------- item in trait +... +LL | reuse ::C; + | ^^^^^^^^^^^^^^^^^^^^^^ does not match trait + +error[E0324]: item `Type` is an associated method, which doesn't match its trait `Trait` + --> $DIR/bad-resolve.rs:27:5 + | +LL | type Type; + | ---------- item in trait +... +LL | reuse ::Type; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait + +error[E0407]: method `baz` is not a member of trait `Trait` + --> $DIR/bad-resolve.rs:30:5 + | +LL | reuse ::baz; + | ^^^^^^^^^^^^^^^^^^^^---^ + | | | + | | help: there is an associated function with a similar name: `bar` + | not a member of trait `Trait` + +error[E0201]: duplicate definitions with name `foo`: + --> $DIR/bad-resolve.rs:37:5 + | +LL | fn foo(&self, x: i32) -> i32 { x } + | ---------------------------------- item in trait +... +LL | reuse foo { &self.0 } + | --------------------- previous definition here +LL | +LL | reuse F::foo { &self.0 } + | ^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definition + +error[E0423]: expected function, found associated constant `Trait::C` + --> $DIR/bad-resolve.rs:24:11 + | +LL | reuse ::C; + | ^^^^^^^^^^^^^^^ not a function + +error[E0575]: expected method or associated constant, found associated type `Trait::Type` + --> $DIR/bad-resolve.rs:27:11 + | +LL | reuse ::Type; + | ^^^^^^^^^^^^^^^^^^ + | + = note: can't use a type alias as a constructor + +error[E0576]: cannot find method or associated constant `baz` in trait `Trait` + --> $DIR/bad-resolve.rs:30:25 + | +LL | fn bar() {} + | -------- similarly named associated function `bar` defined here +... +LL | reuse ::baz; + | ^^^ help: an associated function with a similar name exists: `bar` + +error[E0425]: cannot find function `foo` in this scope + --> $DIR/bad-resolve.rs:35:11 + | +LL | reuse foo { &self.0 } + | ^^^ not found in this scope + +error[E0425]: cannot find function `foo` in `F` + --> $DIR/bad-resolve.rs:37:14 + | +LL | reuse F::foo { &self.0 } + | ^^^ not found in `F` + +error[E0425]: cannot find function `foo` in `F` + --> $DIR/bad-resolve.rs:43:14 + | +LL | reuse F::foo { &self.0 } + | ^^^ not found in `F` + +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/bad-resolve.rs:1:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +error[E0046]: not all trait items implemented, missing: `Type` + --> $DIR/bad-resolve.rs:22:1 + | +LL | type Type; + | --------- `Type` from trait +... +LL | impl Trait for S { + | ^^^^^^^^^^^^^^^^ missing `Type` in implementation + +error: aborting due to 11 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0046, E0201, E0324, E0407, E0423, E0425, E0575, E0576. +For more information about an error, try `rustc --explain E0046`. diff --git a/tests/ui/delegation/explicit-paths-in-traits-pass.rs b/tests/ui/delegation/explicit-paths-in-traits-pass.rs new file mode 100644 index 000000000000..5c41c2ff49c8 --- /dev/null +++ b/tests/ui/delegation/explicit-paths-in-traits-pass.rs @@ -0,0 +1,27 @@ +// run-pass + +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +trait ToReuse { + fn foo(&self, x: i32) -> i32 { x } + fn foo1(x: i32) -> i32 { x } +} + +fn foo2() -> i32 { 42 } + +trait Trait: ToReuse { + reuse ToReuse::foo; + reuse ::foo1; + reuse foo2; +} + +struct S; +impl ToReuse for S {} +impl Trait for S {} + +fn main() { + assert_eq!(::foo(&S, 1), 1); + assert_eq!(::foo1(1), 1); + assert_eq!(::foo2(), 42); +} diff --git a/tests/ui/delegation/explicit-paths-in-traits-pass.stderr b/tests/ui/delegation/explicit-paths-in-traits-pass.stderr new file mode 100644 index 000000000000..8a320b44e63d --- /dev/null +++ b/tests/ui/delegation/explicit-paths-in-traits-pass.stderr @@ -0,0 +1,11 @@ +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/explicit-paths-in-traits-pass.rs:3:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/delegation/explicit-paths-pass.rs b/tests/ui/delegation/explicit-paths-pass.rs new file mode 100644 index 000000000000..331e06d9a887 --- /dev/null +++ b/tests/ui/delegation/explicit-paths-pass.rs @@ -0,0 +1,64 @@ +// run-pass + +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +trait Trait { + fn bar(&self, x: i32) -> i32 { x } + fn description(&self) -> &str { + "hello world!" + } + fn static_method(x: i32) -> i32 { x } + fn static_method2(x: i32, y: i32) -> i32 { x + y } + fn baz<'a>(&self, x: &'a i32) -> &'a i32 { x } +} + +struct F; +impl Trait for F {} + +mod to_reuse { + pub fn foo(x: i32) -> i32 { x + 1 } + pub fn zero_args() -> i32 { 15 } +} + +reuse to_reuse::zero_args { self } + +struct S(F); +impl Trait for S { + reuse Trait::bar { &self.0 } + reuse Trait::description { &self.0 } + reuse ::static_method; + reuse ::static_method2 { S::static_method(self) } + reuse Trait::baz { &self.0 } +} + +impl S { + reuse Trait::baz { &self.0 } + reuse ::static_method { to_reuse::foo(self) } +} + +impl std::fmt::Display for S { + reuse ::fmt { self.description() } +} + +fn main() { + let s = S(F); + assert_eq!(42, s.bar(42)); + assert_eq!("hello world!", format!("{s}")); + assert_eq!(43, S::static_method(42)); + assert_eq!(42, ::static_method(42)); + assert_eq!(21, S::static_method2(10, 10)); + + reuse ::static_method; + reuse ::static_method2 { static_method(self) } + #[inline] + reuse to_reuse::foo; + assert_eq!(42, static_method(42)); + assert_eq!(21, static_method2(10, 10)); + assert_eq!(43, foo(42)); + assert_eq!(15, zero_args()); + + let x: i32 = 15; + assert_eq!(&x, ::baz(&s, &x)); + assert_eq!(&x, S::baz(&s, &x)); +} diff --git a/tests/ui/delegation/explicit-paths-pass.stderr b/tests/ui/delegation/explicit-paths-pass.stderr new file mode 100644 index 000000000000..6d25fb4a5a57 --- /dev/null +++ b/tests/ui/delegation/explicit-paths-pass.stderr @@ -0,0 +1,11 @@ +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/explicit-paths-pass.rs:3:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/delegation/explicit-paths-signature-pass.rs b/tests/ui/delegation/explicit-paths-signature-pass.rs new file mode 100644 index 000000000000..826107130eb0 --- /dev/null +++ b/tests/ui/delegation/explicit-paths-signature-pass.rs @@ -0,0 +1,39 @@ +// run-pass + +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +mod to_reuse { + use crate::S; + + pub fn foo<'a>(#[cfg(FALSE)] a: u8, _b: &'a S) -> u32 { + 1 + } +} + +reuse to_reuse::foo; + +trait Trait { + fn foo(&self) -> u32 { 0 } + fn bar(self: Box) -> u32 { 2 } + fn baz(a: (i32, i32)) -> i32 { a.0 + a.1 } +} + +struct F; +impl Trait for F {} + +struct S(F); + +impl Trait for S { + reuse to_reuse::foo { self } + reuse Trait::bar { Box::new(self.0) } + reuse ::baz; +} + +fn main() { + let s = S(F); + assert_eq!(1, foo(&s)); + assert_eq!(1, s.foo()); + assert_eq!(2, Box::new(s).bar()); + assert_eq!(4, S::baz((2, 2))); +} diff --git a/tests/ui/delegation/explicit-paths-signature-pass.stderr b/tests/ui/delegation/explicit-paths-signature-pass.stderr new file mode 100644 index 000000000000..6c81a2ea0af7 --- /dev/null +++ b/tests/ui/delegation/explicit-paths-signature-pass.stderr @@ -0,0 +1,11 @@ +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/explicit-paths-signature-pass.rs:3:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/delegation/explicit-paths.rs b/tests/ui/delegation/explicit-paths.rs new file mode 100644 index 000000000000..1feaaa73f79e --- /dev/null +++ b/tests/ui/delegation/explicit-paths.rs @@ -0,0 +1,25 @@ +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +trait Trait { + fn bar(&self) -> i32 { 42 } +} + +struct F; +impl Trait for F {} + +struct S(F); + +impl Trait for S { + reuse ::bar; + //~^ ERROR mismatched types +} + +struct S2(F); + +impl Trait for S2 { + reuse ::bar { &self.0 } + //~^ ERROR mismatched types +} + +fn main() {} diff --git a/tests/ui/delegation/explicit-paths.stderr b/tests/ui/delegation/explicit-paths.stderr new file mode 100644 index 000000000000..2994b2390ded --- /dev/null +++ b/tests/ui/delegation/explicit-paths.stderr @@ -0,0 +1,38 @@ +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/explicit-paths.rs:1:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +error[E0308]: mismatched types + --> $DIR/explicit-paths.rs:14:25 + | +LL | reuse ::bar; + | --------------^^^ + | | | + | | expected `&F`, found `&S` + | arguments to this function are incorrect + | + = note: expected reference `&F` + found reference `&S` +note: method defined here + --> $DIR/explicit-paths.rs:5:8 + | +LL | fn bar(&self) -> i32 { 42 } + | ^^^ ----- + +error[E0308]: mismatched types + --> $DIR/explicit-paths.rs:21:32 + | +LL | reuse ::bar { &self.0 } + | ^^^^^^^ expected `&S2`, found `&F` + | + = note: expected reference `&S2` + found reference `&F` + +error: aborting due to 2 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/delegation/not-supported.rs b/tests/ui/delegation/not-supported.rs new file mode 100644 index 000000000000..23081b1e1fc8 --- /dev/null +++ b/tests/ui/delegation/not-supported.rs @@ -0,0 +1,111 @@ +#![feature(c_variadic)] +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +mod generics { + trait GenericTrait { + fn bar(&self, x: T) -> T { x } + fn bar1() {} + } + trait Trait { + fn foo(&self, x: i32) -> i32 { x } + fn foo1<'a>(&self, x: &'a i32) -> &'a i32 { x } + fn foo2(&self, x: T) -> T { x } + fn foo3<'a: 'a>(_: &'a u32) {} + + reuse GenericTrait::bar; + //~^ delegation with early bound generics is not supported yet + reuse GenericTrait::bar1; + //~^ delegation with early bound generics is not supported yet + } + + struct F; + impl Trait for F {} + impl GenericTrait for F {} + + struct S(F); + + impl GenericTrait for S { + reuse >::bar { &self.0 } + //~^ ERROR delegation with early bound generics is not supported yet + reuse GenericTrait::::bar1; + //~^ ERROR delegation with early bound generics is not supported yet + } + + impl GenericTrait<()> for () { + reuse GenericTrait::bar { &F } + //~^ ERROR delegation with early bound generics is not supported yet + reuse GenericTrait::bar1; + //~^ ERROR delegation with early bound generics is not supported yet + } + + impl Trait for &S { + reuse Trait::foo; + //~^ ERROR delegation with early bound generics is not supported yet + } + + impl Trait for S { + reuse Trait::foo1 { &self.0 } + reuse Trait::foo2 { &self.0 } + //~^ ERROR delegation with early bound generics is not supported yet + //~| ERROR method `foo2` has 0 type parameters but its trait declaration has 1 type parameter + reuse ::foo3; + //~^ ERROR delegation with early bound generics is not supported yet + //~| ERROR lifetime parameters or bounds on method `foo3` do not match the trait declaration + } + + struct GenericS(T); + impl Trait for GenericS { + reuse Trait::foo { &self.0 } + //~^ ERROR delegation with early bound generics is not supported yet + } +} + +mod opaque { + trait Trait {} + impl Trait for () {} + + mod to_reuse { + use super::Trait; + + pub fn opaque_arg(_: impl Trait) -> i32 { 0 } + pub fn opaque_ret() -> impl Trait { unimplemented!() } + } + reuse to_reuse::opaque_arg; + //~^ ERROR delegation with early bound generics is not supported yet + reuse to_reuse::opaque_ret; + //~^ ERROR delegation to a function with opaque type is not supported yet +} + +mod fn_header { + mod to_reuse { + pub unsafe fn unsafe_fn() {} + pub extern "C" fn extern_fn() {} + pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {} + pub const fn const_fn() {} + } + + reuse to_reuse::unsafe_fn; + //~^ ERROR delegation to unsafe functions is not supported yet + reuse to_reuse::extern_fn; + //~^ ERROR delegation to non Rust ABI functions is not supported yet + reuse to_reuse::variadic_fn; + //~^ ERROR delegation to variadic functions is not supported yet + reuse to_reuse::const_fn; + //~^ ERROR delegation to const functions is not supported yet +} + +mod recursive { + mod to_reuse1 { + pub mod to_reuse2 { + pub fn foo() {} + } + + pub reuse to_reuse2::foo; + } + + reuse to_reuse1::foo; + //~^ ERROR recursive delegation is not supported yet +} + +fn main() {} diff --git a/tests/ui/delegation/not-supported.stderr b/tests/ui/delegation/not-supported.stderr new file mode 100644 index 000000000000..f235767d50af --- /dev/null +++ b/tests/ui/delegation/not-supported.stderr @@ -0,0 +1,184 @@ +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/not-supported.rs:2:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:16:29 + | +LL | fn bar(&self, x: T) -> T { x } + | ------------------------ callee defined here +... +LL | reuse GenericTrait::bar; + | ^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:18:29 + | +LL | fn bar1() {} + | --------- callee defined here +... +LL | reuse GenericTrait::bar1; + | ^^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:29:39 + | +LL | fn bar(&self, x: T) -> T { x } + | ------------------------ callee defined here +... +LL | reuse >::bar { &self.0 } + | ^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:31:34 + | +LL | fn bar1() {} + | --------- callee defined here +... +LL | reuse GenericTrait::::bar1; + | ^^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:36:29 + | +LL | fn bar(&self, x: T) -> T { x } + | ------------------------ callee defined here +... +LL | reuse GenericTrait::bar { &F } + | ^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:38:29 + | +LL | fn bar1() {} + | --------- callee defined here +... +LL | reuse GenericTrait::bar1; + | ^^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:43:22 + | +LL | fn foo(&self, x: i32) -> i32 { x } + | ---------------------------- callee defined here +... +LL | reuse Trait::foo; + | ^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:49:22 + | +LL | fn foo2(&self, x: T) -> T { x } + | ---------------------------- callee defined here +... +LL | reuse Trait::foo2 { &self.0 } + | ^^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:52:29 + | +LL | fn foo3<'a: 'a>(_: &'a u32) {} + | --------------------------- callee defined here +... +LL | reuse ::foo3; + | ^^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:59:22 + | +LL | fn foo(&self, x: i32) -> i32 { x } + | ---------------------------- callee defined here +... +LL | reuse Trait::foo { &self.0 } + | ^^^ + +error: delegation with early bound generics is not supported yet + --> $DIR/not-supported.rs:74:21 + | +LL | pub fn opaque_arg(_: impl Trait) -> i32 { 0 } + | --------------------------------------- callee defined here +... +LL | reuse to_reuse::opaque_arg; + | ^^^^^^^^^^ + +error: delegation to a function with opaque type is not supported yet + --> $DIR/not-supported.rs:76:21 + | +LL | pub fn opaque_ret() -> impl Trait { unimplemented!() } + | --------------------------------- callee defined here +... +LL | reuse to_reuse::opaque_ret; + | ^^^^^^^^^^ + +error: delegation to unsafe functions is not supported yet + --> $DIR/not-supported.rs:88:21 + | +LL | pub unsafe fn unsafe_fn() {} + | ------------------------- callee defined here +... +LL | reuse to_reuse::unsafe_fn; + | ^^^^^^^^^ + +error: delegation to non Rust ABI functions is not supported yet + --> $DIR/not-supported.rs:90:21 + | +LL | pub extern "C" fn extern_fn() {} + | ----------------------------- callee defined here +... +LL | reuse to_reuse::extern_fn; + | ^^^^^^^^^ + +error: delegation to variadic functions is not supported yet + --> $DIR/not-supported.rs:92:21 + | +LL | pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {} + | ------------------------------------------------------------- callee defined here +... +LL | reuse to_reuse::variadic_fn; + | ^^^^^^^^^^^ + +error: delegation to const functions is not supported yet + --> $DIR/not-supported.rs:94:21 + | +LL | pub const fn const_fn() {} + | ----------------------- callee defined here +... +LL | reuse to_reuse::const_fn; + | ^^^^^^^^ + +error: recursive delegation is not supported yet + --> $DIR/not-supported.rs:107:22 + | +LL | pub reuse to_reuse2::foo; + | --- callee defined here +... +LL | reuse to_reuse1::foo; + | ^^^ + +error[E0049]: method `foo2` has 0 type parameters but its trait declaration has 1 type parameter + --> $DIR/not-supported.rs:49:22 + | +LL | fn foo2(&self, x: T) -> T { x } + | - expected 1 type parameter +... +LL | reuse Trait::foo2 { &self.0 } + | ^^^^ found 0 type parameters + +error[E0195]: lifetime parameters or bounds on method `foo3` do not match the trait declaration + --> $DIR/not-supported.rs:52:29 + | +LL | fn foo3<'a: 'a>(_: &'a u32) {} + | -------- lifetimes in impl do not match this method in trait +... +LL | reuse ::foo3; + | ^^^^ lifetimes do not match method in trait + +error: aborting due to 19 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0049, E0195. +For more information about an error, try `rustc --explain E0049`. diff --git a/tests/ui/delegation/parse.rs b/tests/ui/delegation/parse.rs new file mode 100644 index 000000000000..791cc1630ff7 --- /dev/null +++ b/tests/ui/delegation/parse.rs @@ -0,0 +1,42 @@ +// check-pass + +#![feature(decl_macro)] +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +macro_rules! reuse { {} => {} } + +mod reuse { + pub fn to_unsafe(x: i32) -> i32 { x + 1 } + pub fn to_pub() {} + pub fn to_pub2() {} + + mod inner { + #[allow(non_camel_case_types)] + struct reuse { + a: i32, + b: i32, + c: i32, + } + + impl reuse { + reuse!(); + } + + fn baz() { + let (a, b, c) = (0, 0, 0); + reuse {a, b, c}; + } + } + + pub macro my_macro() {} +} + +reuse!(); +reuse::my_macro!(); + +#[inline] +pub reuse reuse::to_pub; +pub reuse crate::reuse::to_pub2; + +fn main() {} diff --git a/tests/ui/delegation/parse.stderr b/tests/ui/delegation/parse.stderr new file mode 100644 index 000000000000..1e420ceeec7f --- /dev/null +++ b/tests/ui/delegation/parse.stderr @@ -0,0 +1,11 @@ +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/parse.rs:4:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/delegation/target-expr-pass.rs b/tests/ui/delegation/target-expr-pass.rs new file mode 100644 index 000000000000..56068dfce01d --- /dev/null +++ b/tests/ui/delegation/target-expr-pass.rs @@ -0,0 +1,37 @@ +// run-pass + +#![feature(fn_delegation)] +//~^ WARN the feature `fn_delegation` is incomplete + +mod to_reuse { + pub fn foo(x: i32) -> i32 { x } + pub mod inner {} +} + +reuse to_reuse::foo {{ + use self::to_reuse::foo; + let x = foo(12); + x + self +}} + +trait Trait { + fn bar(&self, x: i32) -> i32 { x } +} + +struct F; +impl Trait for F {} + +struct S(F); +impl Trait for S { + reuse ::bar { + #[allow(unused_imports)] + use self::to_reuse::{foo, inner::self}; + let x = foo(12); + assert_eq!(x, 12); + &self.0 + } +} + +fn main() { + assert_eq!(foo(12), 24); +} diff --git a/tests/ui/delegation/target-expr-pass.stderr b/tests/ui/delegation/target-expr-pass.stderr new file mode 100644 index 000000000000..ea594f8a26a5 --- /dev/null +++ b/tests/ui/delegation/target-expr-pass.stderr @@ -0,0 +1,11 @@ +warning: the feature `fn_delegation` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/target-expr-pass.rs:3:12 + | +LL | #![feature(fn_delegation)] + | ^^^^^^^^^^^^^ + | + = note: see issue #118212 for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/diagnostic_namespace/feature-gate-diagnostic_namespace.stderr b/tests/ui/diagnostic_namespace/feature-gate-diagnostic_namespace.stderr index 017d00e2c8e5..38424c13d861 100644 --- a/tests/ui/diagnostic_namespace/feature-gate-diagnostic_namespace.stderr +++ b/tests/ui/diagnostic_namespace/feature-gate-diagnostic_namespace.stderr @@ -6,6 +6,7 @@ LL | #[diagnostic::non_existing_attribute] | = note: see issue #111996 for more information = help: add `#![feature(diagnostic_namespace)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[diagnostic]` attribute name space is experimental --> $DIR/feature-gate-diagnostic_namespace.rs:7:3 @@ -15,6 +16,7 @@ LL | #[diagnostic::non_existing_attribute(with_option = "foo")] | = note: see issue #111996 for more information = help: add `#![feature(diagnostic_namespace)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown diagnostic attribute --> $DIR/feature-gate-diagnostic_namespace.rs:1:15 diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr index 82e3b709f70d..719322fa0f55 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/feature-gate-diagnostic_on_unimplemented.stderr @@ -6,6 +6,7 @@ LL | #[diagnostic::on_unimplemented(message = "Foo")] | = note: see issue #111996 for more information = help: add `#![feature(diagnostic_namespace)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/dyn-star/feature-gate-dyn_star.stderr b/tests/ui/dyn-star/feature-gate-dyn_star.stderr index d8fe25b84bd3..c3e99b20d06a 100644 --- a/tests/ui/dyn-star/feature-gate-dyn_star.stderr +++ b/tests/ui/dyn-star/feature-gate-dyn_star.stderr @@ -6,6 +6,7 @@ LL | pub fn dyn_star_parameter(_: &dyn* Send) { | = note: see issue #102425 for more information = help: add `#![feature(dyn_star)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/dyn-star/gated-span.stderr b/tests/ui/dyn-star/gated-span.stderr index da5afa2d5784..8ba6d7969fc4 100644 --- a/tests/ui/dyn-star/gated-span.stderr +++ b/tests/ui/dyn-star/gated-span.stderr @@ -6,6 +6,7 @@ LL | t!(dyn* Send); | = note: see issue #102425 for more information = help: add `#![feature(dyn_star)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/dyn-star/no-explicit-dyn-star-cast.stderr b/tests/ui/dyn-star/no-explicit-dyn-star-cast.stderr index 78af9c7a3895..bb4c612cedd9 100644 --- a/tests/ui/dyn-star/no-explicit-dyn-star-cast.stderr +++ b/tests/ui/dyn-star/no-explicit-dyn-star-cast.stderr @@ -6,6 +6,7 @@ LL | let dyn_i: dyn* Debug = i as dyn* Debug; | = note: see issue #102425 for more information = help: add `#![feature(dyn_star)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `dyn*` trait objects are experimental --> $DIR/no-explicit-dyn-star-cast.rs:5:34 @@ -15,6 +16,7 @@ LL | let dyn_i: dyn* Debug = i as dyn* Debug; | = note: see issue #102425 for more information = help: add `#![feature(dyn_star)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0606]: casting `usize` as `dyn* Debug` is invalid --> $DIR/no-explicit-dyn-star-cast.rs:5:29 diff --git a/tests/ui/error-codes/E0017.stderr b/tests/ui/error-codes/E0017.stderr index ea6055da1c1f..2a70f2ee0ae8 100644 --- a/tests/ui/error-codes/E0017.stderr +++ b/tests/ui/error-codes/E0017.stderr @@ -42,6 +42,7 @@ LL | static STATIC_REF: &'static mut i32 = &mut X; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/E0017.rs:8:39 diff --git a/tests/ui/error-codes/E0388.stderr b/tests/ui/error-codes/E0388.stderr index b51aa263d5e1..1f7b688899ed 100644 --- a/tests/ui/error-codes/E0388.stderr +++ b/tests/ui/error-codes/E0388.stderr @@ -27,6 +27,7 @@ LL | static STATIC_REF: &'static mut i32 = &mut X; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0764]: mutable references are not allowed in the final value of statics --> $DIR/E0388.rs:6:39 diff --git a/tests/ui/error-codes/E0396.stderr b/tests/ui/error-codes/E0396.stderr index a84a1216e0a9..ac1e7d65ce84 100644 --- a/tests/ui/error-codes/E0396.stderr +++ b/tests/ui/error-codes/E0396.stderr @@ -6,6 +6,7 @@ LL | const VALUE: u8 = unsafe { *REG_ADDR }; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: dereferencing raw mutable pointers in constant functions is unstable --> $DIR/E0396.rs:10:11 @@ -15,6 +16,7 @@ LL | match *INFALLIBLE {} | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: dereferencing raw mutable pointers in constant functions is unstable --> $DIR/E0396.rs:10:11 @@ -24,6 +26,7 @@ LL | match *INFALLIBLE {} | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0658]: dereferencing raw mutable pointers in constants is unstable @@ -34,6 +37,7 @@ LL | const BAD: () = unsafe { match *INFALLIBLE {} }; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: dereferencing raw mutable pointers in constants is unstable --> $DIR/E0396.rs:14:36 @@ -43,6 +47,7 @@ LL | const BAD: () = unsafe { match *INFALLIBLE {} }; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: aborting due to 5 previous errors diff --git a/tests/ui/error-codes/E0658.stderr b/tests/ui/error-codes/E0658.stderr index 686394b6d225..e1e812940ec5 100644 --- a/tests/ui/error-codes/E0658.stderr +++ b/tests/ui/error-codes/E0658.stderr @@ -6,6 +6,7 @@ LL | enum Foo { | = note: see issue #56071 for more information = help: add `#![feature(repr128)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/explore-issue-38412.stderr b/tests/ui/explore-issue-38412.stderr index d8b485c9dc34..a45ec6888559 100644 --- a/tests/ui/explore-issue-38412.stderr +++ b/tests/ui/explore-issue-38412.stderr @@ -6,6 +6,7 @@ LL | let Record { a_stable_pub: _, a_unstable_declared_pub: _, a_unstable_un | = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:28:5 @@ -15,6 +16,7 @@ LL | r.a_unstable_undeclared_pub; | = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0616]: field `b_crate` of struct `Record` is private --> $DIR/explore-issue-38412.rs:29:7 @@ -42,6 +44,7 @@ LL | t.2; | = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0616]: field `3` of struct `pub_and_stability::Tuple` is private --> $DIR/explore-issue-38412.rs:36:7 @@ -69,6 +72,7 @@ LL | r.unstable_undeclared_trait_method(); | = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:46:7 @@ -78,6 +82,7 @@ LL | r.unstable_undeclared(); | = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0624]: method `pub_crate` is private --> $DIR/explore-issue-38412.rs:48:7 @@ -120,6 +125,7 @@ LL | t.unstable_undeclared_trait_method(); | = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_undeclared' --> $DIR/explore-issue-38412.rs:59:7 @@ -129,6 +135,7 @@ LL | t.unstable_undeclared(); | = note: see issue #38412 for more information = help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0624]: method `pub_crate` is private --> $DIR/explore-issue-38412.rs:61:7 diff --git a/tests/ui/expr/if/attrs/stmt-expr-gated.stderr b/tests/ui/expr/if/attrs/stmt-expr-gated.stderr index afc26757c461..b30de4641183 100644 --- a/tests/ui/expr/if/attrs/stmt-expr-gated.stderr +++ b/tests/ui/expr/if/attrs/stmt-expr-gated.stderr @@ -6,6 +6,7 @@ LL | let _ = #[deny(warnings)] if true { | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr b/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr index bdc6755038aa..039e50b5e12d 100644 --- a/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr +++ b/tests/ui/extern/issue-112363-extern-item-where-clauses-debug-ice.stderr @@ -40,6 +40,7 @@ LL | type Item = [T] where [T]: Sized; | = note: see issue #43467 for more information = help: add `#![feature(extern_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors diff --git a/tests/ui/feature-gates/doc-rust-logo.stderr b/tests/ui/feature-gates/doc-rust-logo.stderr index 15398c8505f0..5c64652667ed 100644 --- a/tests/ui/feature-gates/doc-rust-logo.stderr +++ b/tests/ui/feature-gates/doc-rust-logo.stderr @@ -6,6 +6,7 @@ LL | #![doc(rust_logo)] | = note: see issue #90418 for more information = help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.stderr b/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.stderr index d017d03a3853..c6786699de1b 100644 --- a/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.stderr +++ b/tests/ui/feature-gates/feature-gate-abi-avr-interrupt.stderr @@ -6,6 +6,7 @@ LL | extern "avr-non-blocking-interrupt" fn fu() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:13:8 @@ -15,6 +16,7 @@ LL | extern "avr-interrupt" fn f() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:17:12 @@ -24,6 +26,7 @@ LL | extern "avr-interrupt" fn m(); | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:19:12 @@ -33,6 +36,7 @@ LL | extern "avr-non-blocking-interrupt" fn mu(); | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:22:12 @@ -42,6 +46,7 @@ LL | extern "avr-interrupt" fn dm() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:24:12 @@ -51,6 +56,7 @@ LL | extern "avr-non-blocking-interrupt" fn dmu() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:30:12 @@ -60,6 +66,7 @@ LL | extern "avr-interrupt" fn m() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:32:12 @@ -69,6 +76,7 @@ LL | extern "avr-non-blocking-interrupt" fn mu() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:37:12 @@ -78,6 +86,7 @@ LL | extern "avr-interrupt" fn im() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:39:12 @@ -87,6 +96,7 @@ LL | extern "avr-non-blocking-interrupt" fn imu() {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:43:18 @@ -96,6 +106,7 @@ LL | type TA = extern "avr-interrupt" fn(); | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:45:19 @@ -105,6 +116,7 @@ LL | type TAU = extern "avr-non-blocking-interrupt" fn(); | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:48:8 @@ -114,6 +126,7 @@ LL | extern "avr-interrupt" {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-avr-interrupt.rs:50:8 @@ -123,6 +136,7 @@ LL | extern "avr-non-blocking-interrupt" {} | = note: see issue #69664 for more information = help: add `#![feature(abi_avr_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 14 previous errors diff --git a/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr b/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr index c19ec97896ba..5dacc86dcc59 100644 --- a/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr +++ b/tests/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr @@ -6,6 +6,7 @@ LL | extern "msp430-interrupt" fn f() {} | = note: see issue #38487 for more information = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-msp430-interrupt.rs:12:12 @@ -15,6 +16,7 @@ LL | extern "msp430-interrupt" fn m(); | = note: see issue #38487 for more information = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-msp430-interrupt.rs:15:12 @@ -24,6 +26,7 @@ LL | extern "msp430-interrupt" fn dm() {} | = note: see issue #38487 for more information = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-msp430-interrupt.rs:21:12 @@ -33,6 +36,7 @@ LL | extern "msp430-interrupt" fn m() {} | = note: see issue #38487 for more information = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-msp430-interrupt.rs:26:12 @@ -42,6 +46,7 @@ LL | extern "msp430-interrupt" fn im() {} | = note: see issue #38487 for more information = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-msp430-interrupt.rs:30:18 @@ -51,6 +56,7 @@ LL | type TA = extern "msp430-interrupt" fn(); | = note: see issue #38487 for more information = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: msp430-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-msp430-interrupt.rs:33:8 @@ -60,6 +66,7 @@ LL | extern "msp430-interrupt" {} | = note: see issue #38487 for more information = help: add `#![feature(abi_msp430_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 7 previous errors diff --git a/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.stderr b/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.stderr index 60c7fa0ea67b..6b7853a320b0 100644 --- a/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.stderr +++ b/tests/ui/feature-gates/feature-gate-abi-riscv-interrupt.stderr @@ -6,6 +6,7 @@ LL | extern "riscv-interrupt-m" fn f() {} | = note: see issue #111889 for more information = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: riscv-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-riscv-interrupt.rs:13:8 @@ -15,6 +16,7 @@ LL | extern "riscv-interrupt-s" fn f_s() {} | = note: see issue #111889 for more information = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: riscv-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-riscv-interrupt.rs:17:12 @@ -24,6 +26,7 @@ LL | extern "riscv-interrupt-m" fn m(); | = note: see issue #111889 for more information = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: riscv-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-riscv-interrupt.rs:23:12 @@ -33,6 +36,7 @@ LL | extern "riscv-interrupt-m" fn m() {} | = note: see issue #111889 for more information = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: riscv-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-riscv-interrupt.rs:28:12 @@ -42,6 +46,7 @@ LL | extern "riscv-interrupt-m" fn im() {} | = note: see issue #111889 for more information = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: riscv-interrupt ABIs are experimental and subject to change --> $DIR/feature-gate-abi-riscv-interrupt.rs:32:18 @@ -51,6 +56,7 @@ LL | type TA = extern "riscv-interrupt-m" fn(); | = note: see issue #111889 for more information = help: add `#![feature(abi_riscv_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 6 previous errors diff --git a/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.stderr b/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.stderr index 3b727a745e8f..860005cac341 100644 --- a/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.stderr +++ b/tests/ui/feature-gates/feature-gate-abi-x86-interrupt.stderr @@ -6,6 +6,7 @@ LL | extern "x86-interrupt" fn f7() {} | = note: see issue #40180 for more information = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-x86-interrupt.rs:10:12 @@ -15,6 +16,7 @@ LL | extern "x86-interrupt" fn m7(); | = note: see issue #40180 for more information = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-x86-interrupt.rs:11:12 @@ -24,6 +26,7 @@ LL | extern "x86-interrupt" fn dm7() {} | = note: see issue #40180 for more information = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-x86-interrupt.rs:18:12 @@ -33,6 +36,7 @@ LL | extern "x86-interrupt" fn m7() {} | = note: see issue #40180 for more information = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-x86-interrupt.rs:23:12 @@ -42,6 +46,7 @@ LL | extern "x86-interrupt" fn im7() {} | = note: see issue #40180 for more information = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-x86-interrupt.rs:26:18 @@ -51,6 +56,7 @@ LL | type A7 = extern "x86-interrupt" fn(); | = note: see issue #40180 for more information = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: x86-interrupt ABI is experimental and subject to change --> $DIR/feature-gate-abi-x86-interrupt.rs:28:8 @@ -60,6 +66,7 @@ LL | extern "x86-interrupt" {} | = note: see issue #40180 for more information = help: add `#![feature(abi_x86_interrupt)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 7 previous errors diff --git a/tests/ui/feature-gates/feature-gate-abi.stderr b/tests/ui/feature-gates/feature-gate-abi.stderr index e9791b9513f4..d031c2adf50c 100644 --- a/tests/ui/feature-gates/feature-gate-abi.stderr +++ b/tests/ui/feature-gates/feature-gate-abi.stderr @@ -5,6 +5,7 @@ LL | extern "rust-intrinsic" fn f1() {} | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:17:8 @@ -14,6 +15,7 @@ LL | extern "platform-intrinsic" fn f2() {} | = note: see issue #27731 for more information = help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:19:8 @@ -23,6 +25,7 @@ LL | extern "rust-call" fn f4(_: ()) {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:23:12 @@ -31,6 +34,7 @@ LL | extern "rust-intrinsic" fn m1(); | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:25:12 @@ -40,6 +44,7 @@ LL | extern "platform-intrinsic" fn m2(); | = note: see issue #27731 for more information = help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:27:12 @@ -49,6 +54,7 @@ LL | extern "rust-call" fn m4(_: ()); | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:29:12 @@ -58,6 +64,7 @@ LL | extern "rust-call" fn dm4(_: ()) {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:36:12 @@ -66,6 +73,7 @@ LL | extern "rust-intrinsic" fn m1() {} | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:38:12 @@ -75,6 +83,7 @@ LL | extern "platform-intrinsic" fn m2() {} | = note: see issue #27731 for more information = help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:40:12 @@ -84,6 +93,7 @@ LL | extern "rust-call" fn m4(_: ()) {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:45:12 @@ -92,6 +102,7 @@ LL | extern "rust-intrinsic" fn im1() {} | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:47:12 @@ -101,6 +112,7 @@ LL | extern "platform-intrinsic" fn im2() {} | = note: see issue #27731 for more information = help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:49:12 @@ -110,6 +122,7 @@ LL | extern "rust-call" fn im4(_: ()) {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:53:18 @@ -118,6 +131,7 @@ LL | type A1 = extern "rust-intrinsic" fn(); | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:54:18 @@ -127,6 +141,7 @@ LL | type A2 = extern "platform-intrinsic" fn(); | = note: see issue #27731 for more information = help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:55:18 @@ -136,6 +151,7 @@ LL | type A4 = extern "rust-call" fn(_: ()); | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-abi.rs:58:8 @@ -144,6 +160,7 @@ LL | extern "rust-intrinsic" {} | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: platform intrinsics are experimental and possibly buggy --> $DIR/feature-gate-abi.rs:59:8 @@ -153,6 +170,7 @@ LL | extern "platform-intrinsic" {} | = note: see issue #27731 for more information = help: add `#![feature(platform_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-abi.rs:60:8 @@ -162,6 +180,7 @@ LL | extern "rust-call" {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: intrinsic must be in `extern "rust-intrinsic" { ... }` block --> $DIR/feature-gate-abi.rs:23:32 diff --git a/tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.stderr b/tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.stderr index c89ab7bae116..c5ae52c789b6 100644 --- a/tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.stderr +++ b/tests/ui/feature-gates/feature-gate-abi_amdgpu_kernel.stderr @@ -6,6 +6,7 @@ LL | extern "amdgpu-kernel" fn fu() {} | = note: see issue #51575 for more information = help: add `#![feature(abi_amdgpu_kernel)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi_amdgpu_kernel.rs:11:12 @@ -15,6 +16,7 @@ LL | extern "amdgpu-kernel" fn mu(); | = note: see issue #51575 for more information = help: add `#![feature(abi_amdgpu_kernel)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi_amdgpu_kernel.rs:12:12 @@ -24,6 +26,7 @@ LL | extern "amdgpu-kernel" fn dmu() {} | = note: see issue #51575 for more information = help: add `#![feature(abi_amdgpu_kernel)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi_amdgpu_kernel.rs:18:12 @@ -33,6 +36,7 @@ LL | extern "amdgpu-kernel" fn mu() {} | = note: see issue #51575 for more information = help: add `#![feature(abi_amdgpu_kernel)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi_amdgpu_kernel.rs:23:12 @@ -42,6 +46,7 @@ LL | extern "amdgpu-kernel" fn imu() {} | = note: see issue #51575 for more information = help: add `#![feature(abi_amdgpu_kernel)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi_amdgpu_kernel.rs:27:19 @@ -51,6 +56,7 @@ LL | type TAU = extern "amdgpu-kernel" fn(); | = note: see issue #51575 for more information = help: add `#![feature(abi_amdgpu_kernel)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: amdgpu-kernel ABI is experimental and subject to change --> $DIR/feature-gate-abi_amdgpu_kernel.rs:29:8 @@ -60,6 +66,7 @@ LL | extern "amdgpu-kernel" {} | = note: see issue #51575 for more information = help: add `#![feature(abi_amdgpu_kernel)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0570]: `"amdgpu-kernel"` is not a supported ABI for the current target --> $DIR/feature-gate-abi_amdgpu_kernel.rs:29:1 diff --git a/tests/ui/feature-gates/feature-gate-abi_ptx.stderr b/tests/ui/feature-gates/feature-gate-abi_ptx.stderr index 40782d361ee3..22b493e577dd 100644 --- a/tests/ui/feature-gates/feature-gate-abi_ptx.stderr +++ b/tests/ui/feature-gates/feature-gate-abi_ptx.stderr @@ -6,6 +6,7 @@ LL | extern "ptx-kernel" fn fu() {} | = note: see issue #38788 for more information = help: add `#![feature(abi_ptx)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi_ptx.rs:11:12 @@ -15,6 +16,7 @@ LL | extern "ptx-kernel" fn mu(); | = note: see issue #38788 for more information = help: add `#![feature(abi_ptx)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi_ptx.rs:12:12 @@ -24,6 +26,7 @@ LL | extern "ptx-kernel" fn dmu() {} | = note: see issue #38788 for more information = help: add `#![feature(abi_ptx)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi_ptx.rs:17:12 @@ -33,6 +36,7 @@ LL | extern "ptx-kernel" fn mu() {} | = note: see issue #38788 for more information = help: add `#![feature(abi_ptx)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi_ptx.rs:21:12 @@ -42,6 +46,7 @@ LL | extern "ptx-kernel" fn imu() {} | = note: see issue #38788 for more information = help: add `#![feature(abi_ptx)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi_ptx.rs:24:19 @@ -51,6 +56,7 @@ LL | type TAU = extern "ptx-kernel" fn(); | = note: see issue #38788 for more information = help: add `#![feature(abi_ptx)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: PTX ABIs are experimental and subject to change --> $DIR/feature-gate-abi_ptx.rs:26:8 @@ -60,6 +66,7 @@ LL | extern "ptx-kernel" {} | = note: see issue #38788 for more information = help: add `#![feature(abi_ptx)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 7 previous errors diff --git a/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr b/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr index 3cc7b100db2f..1d5fb11cd3d2 100644 --- a/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr +++ b/tests/ui/feature-gates/feature-gate-abi_unadjusted.stderr @@ -5,6 +5,7 @@ LL | extern "unadjusted" fn foo() { | ^^^^^^^^^^^^ | = help: add `#![feature(abi_unadjusted)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr b/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr index 1f22c8c58513..2ebd7cd9b023 100644 --- a/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr +++ b/tests/ui/feature-gates/feature-gate-alloc-error-handler.stderr @@ -6,6 +6,7 @@ LL | #[alloc_error_handler] | = note: see issue #51540 for more information = help: add `#![feature(alloc_error_handler)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-allocator_internals.stderr b/tests/ui/feature-gates/feature-gate-allocator_internals.stderr index 66a1c1be3f4e..905c0252484b 100644 --- a/tests/ui/feature-gates/feature-gate-allocator_internals.stderr +++ b/tests/ui/feature-gates/feature-gate-allocator_internals.stderr @@ -5,6 +5,7 @@ LL | #![default_lib_allocator] | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(allocator_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr b/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr index c2d29db68669..7a0dcb084359 100644 --- a/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr +++ b/tests/ui/feature-gates/feature-gate-allow-internal-unsafe-nested-macro.stderr @@ -8,6 +8,7 @@ LL | bar!(); | ------ in this macro invocation | = help: add `#![feature(allow_internal_unsafe)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr b/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr index c0ab67025b26..4aacfebd6b1f 100644 --- a/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr +++ b/tests/ui/feature-gates/feature-gate-allow-internal-unstable-nested-macro.stderr @@ -8,6 +8,7 @@ LL | bar!(); | ------ in this macro invocation | = help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr b/tests/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr index df7773ba4fb6..28f1a0d6ed5a 100644 --- a/tests/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr +++ b/tests/ui/feature-gates/feature-gate-allow-internal-unstable-struct.stderr @@ -5,6 +5,7 @@ LL | #[allow_internal_unstable()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: attribute should be applied to a macro --> $DIR/feature-gate-allow-internal-unstable-struct.rs:4:1 diff --git a/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr b/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr index cb6cf4699fd8..3e3ecc1e5bab 100644 --- a/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr +++ b/tests/ui/feature-gates/feature-gate-allow-internal-unstable.stderr @@ -5,6 +5,7 @@ LL | #[allow_internal_unstable()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-arbitrary-self-types.stderr b/tests/ui/feature-gates/feature-gate-arbitrary-self-types.stderr index a1c69a5afb61..7f0e02c91f8f 100644 --- a/tests/ui/feature-gates/feature-gate-arbitrary-self-types.stderr +++ b/tests/ui/feature-gates/feature-gate-arbitrary-self-types.stderr @@ -6,6 +6,7 @@ LL | fn foo(self: Ptr) {} | = note: see issue #44874 for more information = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `Box>` cannot be used as the type of `self` without the `arbitrary_self_types` feature @@ -16,6 +17,7 @@ LL | fn bar(self: Box>) {} | = note: see issue #44874 for more information = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `Ptr` cannot be used as the type of `self` without the `arbitrary_self_types` feature @@ -26,6 +28,7 @@ LL | fn foo(self: Ptr); | = note: see issue #44874 for more information = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr b/tests/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr index a9f611b87452..711025ff93b4 100644 --- a/tests/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr +++ b/tests/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr @@ -6,6 +6,7 @@ LL | fn foo(self: *const Self) {} | = note: see issue #44874 for more information = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `*const ()` cannot be used as the type of `self` without the `arbitrary_self_types` feature @@ -16,6 +17,7 @@ LL | fn bar(self: *const Self) {} | = note: see issue #44874 for more information = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error[E0658]: `*const Self` cannot be used as the type of `self` without the `arbitrary_self_types` feature @@ -26,6 +28,7 @@ LL | fn bar(self: *const Self); | = note: see issue #44874 for more information = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-asm_const.stderr b/tests/ui/feature-gates/feature-gate-asm_const.stderr index c248374ec492..4f83fee67593 100644 --- a/tests/ui/feature-gates/feature-gate-asm_const.stderr +++ b/tests/ui/feature-gates/feature-gate-asm_const.stderr @@ -6,6 +6,7 @@ LL | asm!("mov eax, {}", const N + 1); | = note: see issue #93332 for more information = help: add `#![feature(asm_const)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const operands for inline assembly are unstable --> $DIR/feature-gate-asm_const.rs:13:29 @@ -15,6 +16,7 @@ LL | asm!("mov eax, {}", const 123); | = note: see issue #93332 for more information = help: add `#![feature(asm_const)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr index 9db088475a16..d930429779c0 100644 --- a/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr +++ b/tests/ui/feature-gates/feature-gate-asm_experimental_arch.stderr @@ -6,6 +6,7 @@ LL | asm!(""); | = note: see issue #93335 for more information = help: add `#![feature(asm_experimental_arch)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-asm_unwind.stderr b/tests/ui/feature-gates/feature-gate-asm_unwind.stderr index eeabf7a5b0c8..bae263ee3a07 100644 --- a/tests/ui/feature-gates/feature-gate-asm_unwind.stderr +++ b/tests/ui/feature-gates/feature-gate-asm_unwind.stderr @@ -6,6 +6,7 @@ LL | asm!("", options(may_unwind)); | = note: see issue #93334 for more information = help: add `#![feature(asm_unwind)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr b/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr index 2ebaf40dcf6e..d7f4e6da7826 100644 --- a/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr +++ b/tests/ui/feature-gates/feature-gate-assoc-type-defaults.stderr @@ -6,6 +6,7 @@ LL | type Bar = u8; | = note: see issue #29661 for more information = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr b/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr index a5f92b44c41d..5a0fb69b6ba7 100644 --- a/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr +++ b/tests/ui/feature-gates/feature-gate-associated_const_equality.stderr @@ -6,6 +6,7 @@ LL | fn foo>() {} | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr index 4a643d31259f..efab91f25f0d 100644 --- a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr +++ b/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr @@ -6,6 +6,7 @@ LL | type A: Iterator; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:16:22 @@ -15,6 +16,7 @@ LL | type B: Iterator; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:20:20 @@ -24,6 +26,7 @@ LL | struct _St1> { | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:27:18 @@ -33,6 +36,7 @@ LL | enum _En1> { | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:34:19 @@ -42,6 +46,7 @@ LL | union _Un1> { | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:41:37 @@ -51,6 +56,7 @@ LL | type _TaWhere1 where T: Iterator = T; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:44:22 @@ -60,6 +66,7 @@ LL | fn _apit(_: impl Tr1) {} | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:46:26 @@ -69,6 +76,7 @@ LL | fn _apit_dyn(_: &dyn Tr1) {} | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:49:24 @@ -78,6 +86,7 @@ LL | fn _rpit() -> impl Tr1 { S1 } | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:52:31 @@ -87,6 +96,7 @@ LL | fn _rpit_dyn() -> Box> { Box::new(S1) } | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:55:23 @@ -96,6 +106,7 @@ LL | const _cdef: impl Tr1 = S1; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:61:24 @@ -105,6 +116,7 @@ LL | static _sdef: impl Tr1 = S1; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated type bounds are unstable --> $DIR/feature-gate-associated_type_bounds.rs:68:21 @@ -114,6 +126,7 @@ LL | let _: impl Tr1 = S1; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in const types --> $DIR/feature-gate-associated_type_bounds.rs:55:14 diff --git a/tests/ui/feature-gates/feature-gate-auto-traits.stderr b/tests/ui/feature-gates/feature-gate-auto-traits.stderr index e015418161e5..139229ca809b 100644 --- a/tests/ui/feature-gates/feature-gate-auto-traits.stderr +++ b/tests/ui/feature-gates/feature-gate-auto-traits.stderr @@ -6,6 +6,7 @@ LL | auto trait AutoDummyTrait {} | = note: see issue #13231 for more information = help: add `#![feature(auto_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: negative trait bounds are not yet fully implemented; use marker types for now --> $DIR/feature-gate-auto-traits.rs:9:6 @@ -15,6 +16,7 @@ LL | impl !AutoDummyTrait for DummyStruct {} | = note: see issue #68318 for more information = help: add `#![feature(negative_impls)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-box_patterns.stderr b/tests/ui/feature-gates/feature-gate-box_patterns.stderr index da15f698b75c..fb61b2b1810a 100644 --- a/tests/ui/feature-gates/feature-gate-box_patterns.stderr +++ b/tests/ui/feature-gates/feature-gate-box_patterns.stderr @@ -6,6 +6,7 @@ LL | let box x = Box::new('c'); | = note: see issue #29641 for more information = help: add `#![feature(box_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr b/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr index 6601d4cb417a..297363b3de71 100644 --- a/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr +++ b/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr @@ -6,6 +6,7 @@ LL | builtin # offset_of(Foo, v); | = note: see issue #110680 for more information = help: add `#![feature(builtin_syntax)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-c_variadic.stderr b/tests/ui/feature-gates/feature-gate-c_variadic.stderr index a439f297ba33..1b6a8c92af5e 100644 --- a/tests/ui/feature-gates/feature-gate-c_variadic.stderr +++ b/tests/ui/feature-gates/feature-gate-c_variadic.stderr @@ -6,6 +6,7 @@ LL | pub unsafe extern "C" fn test(_: i32, ap: ...) { } | = note: see issue #44930 for more information = help: add `#![feature(c_variadic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr b/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr index bd43e190513f..e107e49b0881 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-relocation-model.stderr @@ -6,6 +6,7 @@ LL | #[cfg(relocation_model = "pic")] | = note: see issue #114929 for more information = help: add `#![feature(cfg_relocation_model)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-cfg-sanitizer_cfi.stderr b/tests/ui/feature-gates/feature-gate-cfg-sanitizer_cfi.stderr index 8c2a8411c7b4..0d49635b2e6f 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-sanitizer_cfi.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-sanitizer_cfi.stderr @@ -6,6 +6,7 @@ LL | #[cfg(sanitizer_cfi_generalize_pointers)] | = note: see issue #89653 for more information = help: add `#![feature(cfg_sanitizer_cfi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(sanitizer_cfi_normalize_integers)` is experimental and subject to change --> $DIR/feature-gate-cfg-sanitizer_cfi.rs:5:7 @@ -15,6 +16,7 @@ LL | #[cfg(sanitizer_cfi_normalize_integers)] | = note: see issue #89653 for more information = help: add `#![feature(cfg_sanitizer_cfi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-abi.stderr b/tests/ui/feature-gates/feature-gate-cfg-target-abi.stderr index 013705d4886d..4829f8572cc5 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-target-abi.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-target-abi.stderr @@ -6,6 +6,7 @@ LL | #[cfg(target_abi = "x")] | = note: see issue #80970 for more information = help: add `#![feature(cfg_target_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_abi)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-abi.rs:4:12 @@ -15,6 +16,7 @@ LL | #[cfg_attr(target_abi = "x", x)] | = note: see issue #80970 for more information = help: add `#![feature(cfg_target_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_abi)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-abi.rs:7:19 @@ -24,6 +26,7 @@ LL | #[cfg(not(any(all(target_abi = "x"))))] | = note: see issue #80970 for more information = help: add `#![feature(cfg_target_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_abi)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-abi.rs:11:10 @@ -33,6 +36,7 @@ LL | cfg!(target_abi = "x"); | = note: see issue #80970 for more information = help: add `#![feature(cfg_target_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-compact.stderr b/tests/ui/feature-gates/feature-gate-cfg-target-compact.stderr index be6fe23ded17..1fd59651957e 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-target-compact.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-target-compact.stderr @@ -6,6 +6,7 @@ LL | #[cfg(target(os = "x"))] | = note: see issue #96901 for more information = help: add `#![feature(cfg_target_compact)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: compact `cfg(target(..))` is experimental and subject to change --> $DIR/feature-gate-cfg-target-compact.rs:4:12 @@ -15,6 +16,7 @@ LL | #[cfg_attr(target(os = "x"), x)] | = note: see issue #96901 for more information = help: add `#![feature(cfg_target_compact)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: compact `cfg(target(..))` is experimental and subject to change --> $DIR/feature-gate-cfg-target-compact.rs:7:19 @@ -24,6 +26,7 @@ LL | #[cfg(not(any(all(target(os = "x")))))] | = note: see issue #96901 for more information = help: add `#![feature(cfg_target_compact)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: compact `cfg(target(..))` is experimental and subject to change --> $DIR/feature-gate-cfg-target-compact.rs:11:10 @@ -33,6 +36,7 @@ LL | cfg!(target(os = "x")); | = note: see issue #96901 for more information = help: add `#![feature(cfg_target_compact)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.stderr b/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.stderr index 8ad3b034aa51..8d5d232ccc48 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.stderr @@ -6,6 +6,7 @@ LL | cfg!(target_has_atomic_equal_alignment = "8"); | = note: see issue #93822 for more information = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:4:10 @@ -15,6 +16,7 @@ LL | cfg!(target_has_atomic_equal_alignment = "16"); | = note: see issue #93822 for more information = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:6:10 @@ -24,6 +26,7 @@ LL | cfg!(target_has_atomic_equal_alignment = "32"); | = note: see issue #93822 for more information = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:8:10 @@ -33,6 +36,7 @@ LL | cfg!(target_has_atomic_equal_alignment = "64"); | = note: see issue #93822 for more information = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:10:10 @@ -42,6 +46,7 @@ LL | cfg!(target_has_atomic_equal_alignment = "128"); | = note: see issue #93822 for more information = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:12:10 @@ -51,6 +56,7 @@ LL | cfg!(target_has_atomic_equal_alignment = "ptr"); | = note: see issue #93822 for more information = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 6 previous errors diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr b/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr index b9e6830a9f0f..f253ec3bef1c 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr @@ -6,6 +6,7 @@ LL | cfg!(target_has_atomic_load_store = "8"); | = note: see issue #94039 for more information = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:4:10 @@ -15,6 +16,7 @@ LL | cfg!(target_has_atomic_load_store = "16"); | = note: see issue #94039 for more information = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:6:10 @@ -24,6 +26,7 @@ LL | cfg!(target_has_atomic_load_store = "32"); | = note: see issue #94039 for more information = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:8:10 @@ -33,6 +36,7 @@ LL | cfg!(target_has_atomic_load_store = "64"); | = note: see issue #94039 for more information = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:10:10 @@ -42,6 +46,7 @@ LL | cfg!(target_has_atomic_load_store = "128"); | = note: see issue #94039 for more information = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change --> $DIR/feature-gate-cfg-target-has-atomic.rs:12:10 @@ -51,6 +56,7 @@ LL | cfg!(target_has_atomic_load_store = "ptr"); | = note: see issue #94039 for more information = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 6 previous errors diff --git a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr index 3400808bb728..0e1fe5572a98 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-target-thread-local.stderr @@ -6,6 +6,7 @@ LL | #[cfg_attr(target_thread_local, thread_local)] | = note: see issue #29594 for more information = help: add `#![feature(cfg_target_thread_local)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-cfg-version.stderr b/tests/ui/feature-gates/feature-gate-cfg-version.stderr index ae899d409ecf..c1c3e8e5897a 100644 --- a/tests/ui/feature-gates/feature-gate-cfg-version.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg-version.stderr @@ -6,6 +6,7 @@ LL | #[cfg(version(42))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: expected a version literal --> $DIR/feature-gate-cfg-version.rs:1:15 @@ -21,6 +22,7 @@ LL | #[cfg(version(1.20))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: expected a version literal --> $DIR/feature-gate-cfg-version.rs:4:15 @@ -36,6 +38,7 @@ LL | #[cfg(version("1.44"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(version)` is experimental and subject to change --> $DIR/feature-gate-cfg-version.rs:10:11 @@ -45,6 +48,7 @@ LL | #[cfg(not(version("1.44")))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(version)` is experimental and subject to change --> $DIR/feature-gate-cfg-version.rs:14:7 @@ -54,6 +58,7 @@ LL | #[cfg(version("1.43", "1.44", "1.45"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: expected single version literal --> $DIR/feature-gate-cfg-version.rs:14:7 @@ -69,6 +74,7 @@ LL | #[cfg(version(false))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: expected a version literal --> $DIR/feature-gate-cfg-version.rs:17:15 @@ -84,6 +90,7 @@ LL | #[cfg(version("foo"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown version literal format, assuming it refers to a future version --> $DIR/feature-gate-cfg-version.rs:20:15 @@ -99,6 +106,7 @@ LL | #[cfg(version("999"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown version literal format, assuming it refers to a future version --> $DIR/feature-gate-cfg-version.rs:23:15 @@ -114,6 +122,7 @@ LL | #[cfg(version("-1"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown version literal format, assuming it refers to a future version --> $DIR/feature-gate-cfg-version.rs:26:15 @@ -129,6 +138,7 @@ LL | #[cfg(version("65536"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown version literal format, assuming it refers to a future version --> $DIR/feature-gate-cfg-version.rs:29:15 @@ -144,6 +154,7 @@ LL | #[cfg(version("0"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown version literal format, assuming it refers to a future version --> $DIR/feature-gate-cfg-version.rs:32:15 @@ -159,6 +170,7 @@ LL | #[cfg(version("1.0"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `cfg(version)` is experimental and subject to change --> $DIR/feature-gate-cfg-version.rs:38:7 @@ -168,6 +180,7 @@ LL | #[cfg(version("1.65536.2"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown version literal format, assuming it refers to a future version --> $DIR/feature-gate-cfg-version.rs:38:15 @@ -183,6 +196,7 @@ LL | #[cfg(version("1.20.0-stable"))] | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown version literal format, assuming it refers to a future version --> $DIR/feature-gate-cfg-version.rs:41:15 @@ -198,6 +212,7 @@ LL | assert!(cfg!(version("1.42"))); | = note: see issue #64796 for more information = help: add `#![feature(cfg_version)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 19 previous errors; 7 warnings emitted diff --git a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr index 22f9af8390d4..d5c0cd5927a8 100644 --- a/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg_overflow_checks.stderr @@ -6,6 +6,7 @@ LL | #[cfg(overflow_checks)] | = note: see issue #111466 for more information = help: add `#![feature(cfg_overflow_checks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr b/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr index b53fc3acdbcc..da29b0c96a3f 100644 --- a/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr +++ b/tests/ui/feature-gates/feature-gate-cfg_sanitize.stderr @@ -6,6 +6,7 @@ LL | #[cfg(not(sanitize = "thread"))] | = note: see issue #39699 for more information = help: add `#![feature(cfg_sanitize)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr b/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr index 04b206499405..ae5efc0275f2 100644 --- a/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr +++ b/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr @@ -6,6 +6,7 @@ LL | #[cfi_encoding = "3Bar"] | = note: see issue #89653 for more information = help: add `#![feature(cfi_encoding)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-closure_lifetime_binder.stderr b/tests/ui/feature-gates/feature-gate-closure_lifetime_binder.stderr index aea5cfeed070..96e428fb9a37 100644 --- a/tests/ui/feature-gates/feature-gate-closure_lifetime_binder.stderr +++ b/tests/ui/feature-gates/feature-gate-closure_lifetime_binder.stderr @@ -6,6 +6,7 @@ LL | for<> || -> () {}; | = note: see issue #97362 for more information = help: add `#![feature(closure_lifetime_binder)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider removing `for<...>` error[E0658]: `for<...>` binders for closures are experimental @@ -16,6 +17,7 @@ LL | for<'a> || -> () {}; | = note: see issue #97362 for more information = help: add `#![feature(closure_lifetime_binder)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider removing `for<...>` error[E0658]: `for<...>` binders for closures are experimental @@ -26,6 +28,7 @@ LL | for<'a, 'b> |_: &'a ()| -> () {}; | = note: see issue #97362 for more information = help: add `#![feature(closure_lifetime_binder)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider removing `for<...>` error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr b/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr index d5ef5d09ed45..17b5e6016a46 100644 --- a/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr +++ b/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr @@ -6,6 +6,7 @@ LL | let _closure = #[track_caller] || {}; | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/feature-gate-closure_track_caller.rs:7:22 @@ -15,6 +16,7 @@ LL | let _coroutine = #[track_caller] || { yield; }; | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[track_caller]` on closures is currently unstable --> $DIR/feature-gate-closure_track_caller.rs:8:19 @@ -24,6 +26,7 @@ LL | let _future = #[track_caller] async {}; | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr b/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr index f0b8fd1f373a..f361a76b4a73 100644 --- a/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr +++ b/tests/ui/feature-gates/feature-gate-collapse_debuginfo.stderr @@ -6,6 +6,7 @@ LL | #[collapse_debuginfo] | = note: see issue #100758 for more information = help: add `#![feature(collapse_debuginfo)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr b/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr index eadc4ddcb286..65137a442b04 100644 --- a/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr +++ b/tests/ui/feature-gates/feature-gate-compiler-builtins.stderr @@ -5,6 +5,7 @@ LL | #![compiler_builtins] | ^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(compiler_builtins)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-concat_bytes.stderr b/tests/ui/feature-gates/feature-gate-concat_bytes.stderr index 69b196335dae..ed9692d36930 100644 --- a/tests/ui/feature-gates/feature-gate-concat_bytes.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_bytes.stderr @@ -6,6 +6,7 @@ LL | let a = concat_bytes!(b'A', b"BC"); | = note: see issue #87555 for more information = help: add `#![feature(concat_bytes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-concat_idents.stderr b/tests/ui/feature-gates/feature-gate-concat_idents.stderr index 0454fd4945cd..eaaef0f2539b 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_idents.stderr @@ -6,6 +6,7 @@ LL | let a = concat_idents!(X, Y_1); | = note: see issue #29599 for more information = help: add `#![feature(concat_idents)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents.rs:6:13 @@ -15,6 +16,7 @@ LL | let b = concat_idents!(X, Y_2); | = note: see issue #29599 for more information = help: add `#![feature(concat_idents)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr b/tests/ui/feature-gates/feature-gate-concat_idents2.stderr index 8663bc7ca7e7..2fe786ff4063 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents2.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_idents2.stderr @@ -6,6 +6,7 @@ LL | concat_idents!(a, b); | = note: see issue #29599 for more information = help: add `#![feature(concat_idents)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0425]: cannot find value `ab` in this scope --> $DIR/feature-gate-concat_idents2.rs:2:5 diff --git a/tests/ui/feature-gates/feature-gate-concat_idents3.stderr b/tests/ui/feature-gates/feature-gate-concat_idents3.stderr index 1316107a3dca..a7daa1f949f0 100644 --- a/tests/ui/feature-gates/feature-gate-concat_idents3.stderr +++ b/tests/ui/feature-gates/feature-gate-concat_idents3.stderr @@ -6,6 +6,7 @@ LL | assert_eq!(10, concat_idents!(X, Y_1)); | = note: see issue #29599 for more information = help: add `#![feature(concat_idents)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'concat_idents': `concat_idents` is not stable enough for use and is subject to change --> $DIR/feature-gate-concat_idents3.rs:6:20 @@ -15,6 +16,7 @@ LL | assert_eq!(20, concat_idents!(X, Y_2)); | = note: see issue #29599 for more information = help: add `#![feature(concat_idents)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr b/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr index 2e529236ad8f..1cef163cef5c 100644 --- a/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr +++ b/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr @@ -6,6 +6,7 @@ LL | yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: yield syntax is experimental --> $DIR/feature-gate-coroutines.rs:9:16 @@ -15,6 +16,7 @@ LL | let _ = || yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0627]: yield expression outside of coroutine literal --> $DIR/feature-gate-coroutines.rs:5:5 diff --git a/tests/ui/feature-gates/feature-gate-coroutines.none.stderr b/tests/ui/feature-gates/feature-gate-coroutines.none.stderr index ab24805e4677..403f0549aef2 100644 --- a/tests/ui/feature-gates/feature-gate-coroutines.none.stderr +++ b/tests/ui/feature-gates/feature-gate-coroutines.none.stderr @@ -6,6 +6,7 @@ LL | yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: yield syntax is experimental --> $DIR/feature-gate-coroutines.rs:9:16 @@ -15,6 +16,7 @@ LL | let _ = || yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: yield syntax is experimental --> $DIR/feature-gate-coroutines.rs:16:5 @@ -24,6 +26,7 @@ LL | yield; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: yield syntax is experimental --> $DIR/feature-gate-coroutines.rs:17:5 @@ -33,6 +36,7 @@ LL | yield 0; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: yield syntax is experimental --> $DIR/feature-gate-coroutines.rs:5:5 @@ -42,6 +46,7 @@ LL | yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0658]: yield syntax is experimental @@ -52,6 +57,7 @@ LL | let _ = || yield true; | = note: see issue #43122 for more information = help: add `#![feature(coroutines)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0627]: yield expression outside of coroutine literal diff --git a/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr b/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr index 0131a19a39dd..00e0f0afbde6 100644 --- a/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr +++ b/tests/ui/feature-gates/feature-gate-coverage-attribute.stderr @@ -14,6 +14,7 @@ LL | #[coverage(off)] | = note: see issue #84605 for more information = help: add `#![feature(coverage_attribute)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-custom_mir.stderr b/tests/ui/feature-gates/feature-gate-custom_mir.stderr index f0f67adcca58..34899e5e66c0 100644 --- a/tests/ui/feature-gates/feature-gate-custom_mir.stderr +++ b/tests/ui/feature-gates/feature-gate-custom_mir.stderr @@ -5,6 +5,7 @@ LL | #[custom_mir(dialect = "built")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(custom_mir)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr b/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr index b65b009a3422..016be980d4d6 100644 --- a/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr +++ b/tests/ui/feature-gates/feature-gate-custom_test_frameworks.stderr @@ -6,6 +6,7 @@ LL | #[test_case] | = note: see issue #50297 for more information = help: add `#![feature(custom_test_frameworks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: custom test frameworks are an unstable feature --> $DIR/feature-gate-custom_test_frameworks.rs:1:1 @@ -15,6 +16,7 @@ LL | #![test_runner(main)] | = note: see issue #50297 for more information = help: add `#![feature(custom_test_frameworks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-decl_macro.stderr b/tests/ui/feature-gates/feature-gate-decl_macro.stderr index 94b609f05262..e76fe3714ea1 100644 --- a/tests/ui/feature-gates/feature-gate-decl_macro.stderr +++ b/tests/ui/feature-gates/feature-gate-decl_macro.stderr @@ -6,6 +6,7 @@ LL | macro m() {} | = note: see issue #39412 for more information = help: add `#![feature(decl_macro)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-deprecated_safe.stderr b/tests/ui/feature-gates/feature-gate-deprecated_safe.stderr index 5e98a1faaa30..415d54463d1a 100644 --- a/tests/ui/feature-gates/feature-gate-deprecated_safe.stderr +++ b/tests/ui/feature-gates/feature-gate-deprecated_safe.stderr @@ -6,6 +6,7 @@ LL | #[deprecated_safe(since = "TBD", note = "...")] | = note: see issue #94978 for more information = help: add `#![feature(deprecated_safe)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[deprecated_safe]` attribute is an experimental feature --> $DIR/feature-gate-deprecated_safe.rs:4:1 @@ -15,6 +16,7 @@ LL | #[deprecated_safe(since = "TBD", note = "...")] | = note: see issue #94978 for more information = help: add `#![feature(deprecated_safe)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-doc_cfg.stderr b/tests/ui/feature-gates/feature-gate-doc_cfg.stderr index 1a313a86f7cc..5315aaeeb3ed 100644 --- a/tests/ui/feature-gates/feature-gate-doc_cfg.stderr +++ b/tests/ui/feature-gates/feature-gate-doc_cfg.stderr @@ -6,6 +6,7 @@ LL | #[doc(cfg(unix))] | = note: see issue #43781 for more information = help: add `#![feature(doc_cfg)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-doc_masked.stderr b/tests/ui/feature-gates/feature-gate-doc_masked.stderr index 96377d8d0364..10607a19757c 100644 --- a/tests/ui/feature-gates/feature-gate-doc_masked.stderr +++ b/tests/ui/feature-gates/feature-gate-doc_masked.stderr @@ -6,6 +6,7 @@ LL | #[doc(masked)] | = note: see issue #44027 for more information = help: add `#![feature(doc_masked)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr b/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr index d19d3fa0ff7f..1b40b9ac18a8 100644 --- a/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr +++ b/tests/ui/feature-gates/feature-gate-doc_notable_trait.stderr @@ -6,6 +6,7 @@ LL | #[doc(notable_trait)] | = note: see issue #45040 for more information = help: add `#![feature(doc_notable_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr b/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr index 4a0c8d7fdc3f..d05971fb0529 100644 --- a/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr +++ b/tests/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr @@ -6,6 +6,7 @@ LL | 0 .. 3 => {} | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-explicit_tail_calls.stderr b/tests/ui/feature-gates/feature-gate-explicit_tail_calls.stderr index b58da19c1745..8447ac41e2ca 100644 --- a/tests/ui/feature-gates/feature-gate-explicit_tail_calls.stderr +++ b/tests/ui/feature-gates/feature-gate-explicit_tail_calls.stderr @@ -6,6 +6,7 @@ LL | become bottom(); | = note: see issue #112788 for more information = help: add `#![feature(explicit_tail_calls)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `become` expression is experimental --> $DIR/feature-gate-explicit_tail_calls.rs:6:5 @@ -15,6 +16,7 @@ LL | become you(); | = note: see issue #112788 for more information = help: add `#![feature(explicit_tail_calls)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-extern_types.stderr b/tests/ui/feature-gates/feature-gate-extern_types.stderr index 17ce01fd59bb..599713b452a6 100644 --- a/tests/ui/feature-gates/feature-gate-extern_types.stderr +++ b/tests/ui/feature-gates/feature-gate-extern_types.stderr @@ -6,6 +6,7 @@ LL | type T; | = note: see issue #43467 for more information = help: add `#![feature(extern_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-ffi_const.stderr b/tests/ui/feature-gates/feature-gate-ffi_const.stderr index c86606f33527..d083b826d6e1 100644 --- a/tests/ui/feature-gates/feature-gate-ffi_const.stderr +++ b/tests/ui/feature-gates/feature-gate-ffi_const.stderr @@ -6,6 +6,7 @@ LL | #[ffi_const] | = note: see issue #58328 for more information = help: add `#![feature(ffi_const)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-ffi_pure.stderr b/tests/ui/feature-gates/feature-gate-ffi_pure.stderr index 4392fb16deb4..6544d450eeb9 100644 --- a/tests/ui/feature-gates/feature-gate-ffi_pure.stderr +++ b/tests/ui/feature-gates/feature-gate-ffi_pure.stderr @@ -6,6 +6,7 @@ LL | #[ffi_pure] | = note: see issue #58329 for more information = help: add `#![feature(ffi_pure)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr b/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr index 7a030d454604..8d19874c36a0 100644 --- a/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr +++ b/tests/ui/feature-gates/feature-gate-ffi_returns_twice.stderr @@ -6,6 +6,7 @@ LL | #[ffi_returns_twice] | = note: see issue #58314 for more information = help: add `#![feature(ffi_returns_twice)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-fn_align.stderr b/tests/ui/feature-gates/feature-gate-fn_align.stderr index 3351ceaf2f01..eec332792b76 100644 --- a/tests/ui/feature-gates/feature-gate-fn_align.stderr +++ b/tests/ui/feature-gates/feature-gate-fn_align.stderr @@ -6,6 +6,7 @@ LL | #[repr(align(16))] | = note: see issue #82232 for more information = help: add `#![feature(fn_align)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-fn_delegation.rs b/tests/ui/feature-gates/feature-gate-fn_delegation.rs index 6ac367120903..5352b2d8cadb 100644 --- a/tests/ui/feature-gates/feature-gate-fn_delegation.rs +++ b/tests/ui/feature-gates/feature-gate-fn_delegation.rs @@ -1,3 +1,8 @@ -todo!(); //~ ERROR +mod to_reuse { + pub fn foo() {} +} + +reuse to_reuse::foo; +//~^ ERROR functions delegation is not yet fully implemented fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-fn_delegation.stderr b/tests/ui/feature-gates/feature-gate-fn_delegation.stderr index 14d85c5263e0..d7f8040803a4 100644 --- a/tests/ui/feature-gates/feature-gate-fn_delegation.stderr +++ b/tests/ui/feature-gates/feature-gate-fn_delegation.stderr @@ -1,13 +1,13 @@ -error: expected one of `!` or `::`, found `(` - --> $DIR/feature-gate-fn_delegation.rs:1:1 +error[E0658]: functions delegation is not yet fully implemented + --> $DIR/feature-gate-fn_delegation.rs:5:1 | -LL | todo!(); - | ^^^^^^^ - | | - | expected one of `!` or `::` - | in this macro invocation +LL | reuse to_reuse::foo; + | ^^^^^^^^^^^^^^^^^^^^ | - = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: see issue #118212 for more information + = help: add `#![feature(fn_delegation)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/feature-gates/feature-gate-format_args_nl.stderr b/tests/ui/feature-gates/feature-gate-format_args_nl.stderr index 35a712aad8a1..f72d34d9b0bc 100644 --- a/tests/ui/feature-gates/feature-gate-format_args_nl.stderr +++ b/tests/ui/feature-gates/feature-gate-format_args_nl.stderr @@ -5,6 +5,7 @@ LL | format_args_nl!(""); | ^^^^^^^^^^^^^^ | = help: add `#![feature(format_args_nl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-fundamental.stderr b/tests/ui/feature-gates/feature-gate-fundamental.stderr index 14ee169bdaa2..61b30dfb29cd 100644 --- a/tests/ui/feature-gates/feature-gate-fundamental.stderr +++ b/tests/ui/feature-gates/feature-gate-fundamental.stderr @@ -6,6 +6,7 @@ LL | #[fundamental] | = note: see issue #29635 for more information = help: add `#![feature(fundamental)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr index 526354f6cfbd..7cdcaeaee575 100644 --- a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr +++ b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr @@ -6,6 +6,7 @@ LL | gen {}; | = note: see issue #117078 for more information = help: add `#![feature(gen_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: gen blocks are experimental --> $DIR/feature-gate-gen_blocks.rs:12:5 @@ -15,6 +16,7 @@ LL | async gen {}; | = note: see issue #117078 for more information = help: add `#![feature(gen_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: gen blocks are experimental --> $DIR/feature-gate-gen_blocks.rs:22:5 @@ -24,6 +26,7 @@ LL | gen {}; | = note: see issue #117078 for more information = help: add `#![feature(gen_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: gen blocks are experimental --> $DIR/feature-gate-gen_blocks.rs:25:5 @@ -33,6 +36,7 @@ LL | async gen {}; | = note: see issue #117078 for more information = help: add `#![feature(gen_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0282]: type annotations needed --> $DIR/feature-gate-gen_blocks.rs:5:5 diff --git a/tests/ui/feature-gates/feature-gate-generic_arg_infer.normal.stderr b/tests/ui/feature-gates/feature-gate-generic_arg_infer.normal.stderr index 56123a983b34..bc022476c19c 100644 --- a/tests/ui/feature-gates/feature-gate-generic_arg_infer.normal.stderr +++ b/tests/ui/feature-gates/feature-gate-generic_arg_infer.normal.stderr @@ -18,6 +18,7 @@ LL | let _y: [u8; _] = [0; 3]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0747]: type provided when a constant was expected --> $DIR/feature-gate-generic_arg_infer.rs:20:20 @@ -36,6 +37,7 @@ LL | let _x: [u8; 3] = [0; _]; | = note: see issue #85077 for more information = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors diff --git a/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr b/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr index e5265b67eaba..a5ab1b0d6313 100644 --- a/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr +++ b/tests/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr @@ -5,6 +5,7 @@ LL | #[rustc_error] | ^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr index 420363ced6f7..7dfd79c72864 100644 --- a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr +++ b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr @@ -6,6 +6,7 @@ LL | type Bar = impl std::fmt::Debug; | = note: see issue #63063 for more information = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl Trait` in associated types is unstable --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:16 @@ -15,6 +16,7 @@ LL | type Bop = impl std::fmt::Debug; | = note: see issue #63063 for more information = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: inherent associated types are unstable --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:5 @@ -24,6 +26,7 @@ LL | type Bop = impl std::fmt::Debug; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: unconstrained opaque type --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:6:16 diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr index dacf1ca4c37c..d939d8c5c28e 100644 --- a/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr +++ b/tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr @@ -7,6 +7,7 @@ LL | fn f() -> impl Fn() -> impl Sized { || () } = note: `impl Trait` is only allowed in arguments and return types of functions and methods = note: see issue #99697 for more information = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in the return type of `Fn` trait bounds --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:3:32 @@ -17,6 +18,7 @@ LL | fn g() -> &'static dyn Fn() -> impl Sized { &|| () } = note: `impl Trait` is only allowed in arguments and return types of functions and methods = note: see issue #99697 for more information = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-imported_main.stderr b/tests/ui/feature-gates/feature-gate-imported_main.stderr index 94cb74047c85..987bda7059c8 100644 --- a/tests/ui/feature-gates/feature-gate-imported_main.stderr +++ b/tests/ui/feature-gates/feature-gate-imported_main.stderr @@ -6,6 +6,7 @@ LL | use foo::bar as main; | = note: see issue #28937 for more information = help: add `#![feature(imported_main)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr b/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr index 8e117422a796..0eb7558b08ff 100644 --- a/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr +++ b/tests/ui/feature-gates/feature-gate-inherent_associated_types.stderr @@ -6,6 +6,7 @@ LL | type Bar = isize; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-inline_const.stderr b/tests/ui/feature-gates/feature-gate-inline_const.stderr index 3cb4aad003f4..6cf675065f34 100644 --- a/tests/ui/feature-gates/feature-gate-inline_const.stderr +++ b/tests/ui/feature-gates/feature-gate-inline_const.stderr @@ -6,6 +6,7 @@ LL | let _ = const { | = note: see issue #76001 for more information = help: add `#![feature(inline_const)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr b/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr index eab024dde662..7d7376fa818b 100644 --- a/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr +++ b/tests/ui/feature-gates/feature-gate-inline_const_pat.stderr @@ -6,6 +6,7 @@ LL | let const { () } = (); | = note: see issue #76001 for more information = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-intrinsics.stderr b/tests/ui/feature-gates/feature-gate-intrinsics.stderr index 8f943d357ce0..ebd0f41715ea 100644 --- a/tests/ui/feature-gates/feature-gate-intrinsics.stderr +++ b/tests/ui/feature-gates/feature-gate-intrinsics.stderr @@ -5,6 +5,7 @@ LL | extern "rust-intrinsic" { | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: intrinsics are subject to change --> $DIR/feature-gate-intrinsics.rs:5:8 @@ -13,6 +14,7 @@ LL | extern "rust-intrinsic" fn baz() {} | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0093]: unrecognized intrinsic function: `bar` --> $DIR/feature-gate-intrinsics.rs:2:5 diff --git a/tests/ui/feature-gates/feature-gate-is_sorted.stderr b/tests/ui/feature-gates/feature-gate-is_sorted.stderr index ccac827076bc..f3e87659b02f 100644 --- a/tests/ui/feature-gates/feature-gate-is_sorted.stderr +++ b/tests/ui/feature-gates/feature-gate-is_sorted.stderr @@ -6,6 +6,7 @@ LL | assert!([1, 2, 2, 9].iter().is_sorted()); | = note: see issue #53485 for more information = help: add `#![feature(is_sorted)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'is_sorted': new API --> $DIR/feature-gate-is_sorted.rs:5:39 @@ -15,6 +16,7 @@ LL | assert!(![-2i32, -1, 0, 3].iter().is_sorted_by_key(|n| n.abs())); | = note: see issue #53485 for more information = help: add `#![feature(is_sorted)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'is_sorted': new API --> $DIR/feature-gate-is_sorted.rs:9:26 @@ -24,6 +26,7 @@ LL | assert!([1, 2, 2, 9].is_sorted()); | = note: see issue #53485 for more information = help: add `#![feature(is_sorted)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'is_sorted': new API --> $DIR/feature-gate-is_sorted.rs:11:32 @@ -33,6 +36,7 @@ LL | assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs())); | = note: see issue #53485 for more information = help: add `#![feature(is_sorted)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/feature-gates/feature-gate-lang-items.stderr b/tests/ui/feature-gates/feature-gate-lang-items.stderr index c2496863fea4..54787e03784e 100644 --- a/tests/ui/feature-gates/feature-gate-lang-items.stderr +++ b/tests/ui/feature-gates/feature-gate-lang-items.stderr @@ -5,6 +5,7 @@ LL | #[lang = "foo"] | ^^^^^^^^^^^^^^^ | = help: add `#![feature(lang_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0522]: definition of an unknown language item: `foo` --> $DIR/feature-gate-lang-items.rs:1:1 diff --git a/tests/ui/feature-gates/feature-gate-large-assignments.stderr b/tests/ui/feature-gates/feature-gate-large-assignments.stderr index c025be4f6365..7b0b4470c4e1 100644 --- a/tests/ui/feature-gates/feature-gate-large-assignments.stderr +++ b/tests/ui/feature-gates/feature-gate-large-assignments.stderr @@ -6,6 +6,7 @@ LL | #![move_size_limit = "42"] | = note: see issue #83518 for more information = help: add `#![feature(large_assignments)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr b/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr index 673835b8b9eb..8cbad78478e1 100644 --- a/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr +++ b/tests/ui/feature-gates/feature-gate-link-arg-attribute.stderr @@ -6,6 +6,7 @@ LL | #[link(kind = "link-arg", name = "foo")] | = note: see issue #99427 for more information = help: add `#![feature(link_arg_attribute)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-link_cfg.stderr b/tests/ui/feature-gates/feature-gate-link_cfg.stderr index 6e42be3954d1..bfe7f74a9213 100644 --- a/tests/ui/feature-gates/feature-gate-link_cfg.stderr +++ b/tests/ui/feature-gates/feature-gate-link_cfg.stderr @@ -5,6 +5,7 @@ LL | #[link(name = "foo", cfg(foo))] | ^^^^^^^^ | = help: add `#![feature(link_cfg)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr b/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr index 0cad260a14a4..686007dcbb7e 100644 --- a/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr +++ b/tests/ui/feature-gates/feature-gate-link_llvm_intrinsics.stderr @@ -6,6 +6,7 @@ LL | fn sqrt(x: f32) -> f32; | = note: see issue #29602 for more information = help: add `#![feature(link_llvm_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-linkage.stderr b/tests/ui/feature-gates/feature-gate-linkage.stderr index ca1f54145689..2044b8a3c247 100644 --- a/tests/ui/feature-gates/feature-gate-linkage.stderr +++ b/tests/ui/feature-gates/feature-gate-linkage.stderr @@ -6,6 +6,7 @@ LL | #[linkage = "extern_weak"] static foo: *mut isize; | = note: see issue #29603 for more information = help: add `#![feature(linkage)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-lint-reasons.stderr b/tests/ui/feature-gates/feature-gate-lint-reasons.stderr index 6d49b7ed2cd0..efcb3a10f32d 100644 --- a/tests/ui/feature-gates/feature-gate-lint-reasons.stderr +++ b/tests/ui/feature-gates/feature-gate-lint-reasons.stderr @@ -6,6 +6,7 @@ LL | #![warn(nonstandard_style, reason = "the standard should be respected")] | = note: see issue #54503 for more information = help: add `#![feature(lint_reasons)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: lint reasons are experimental --> $DIR/feature-gate-lint-reasons.rs:1:28 @@ -15,6 +16,7 @@ LL | #![warn(nonstandard_style, reason = "the standard should be respected")] | = note: see issue #54503 for more information = help: add `#![feature(lint_reasons)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-log_syntax.stderr b/tests/ui/feature-gates/feature-gate-log_syntax.stderr index 500c752e20d0..0eba231a287e 100644 --- a/tests/ui/feature-gates/feature-gate-log_syntax.stderr +++ b/tests/ui/feature-gates/feature-gate-log_syntax.stderr @@ -6,6 +6,7 @@ LL | log_syntax!() | = note: see issue #29598 for more information = help: add `#![feature(log_syntax)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-log_syntax2.stderr b/tests/ui/feature-gates/feature-gate-log_syntax2.stderr index a808a9463a04..e1f92dd60a3c 100644 --- a/tests/ui/feature-gates/feature-gate-log_syntax2.stderr +++ b/tests/ui/feature-gates/feature-gate-log_syntax2.stderr @@ -6,6 +6,7 @@ LL | println!("{:?}", log_syntax!()); | = note: see issue #29598 for more information = help: add `#![feature(log_syntax)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr b/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr index 4555ef1874f3..15888a38589c 100644 --- a/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr +++ b/tests/ui/feature-gates/feature-gate-marker_trait_attr.stderr @@ -6,6 +6,7 @@ LL | #[marker] trait ExplicitMarker {} | = note: see issue #29864 for more information = help: add `#![feature(marker_trait_attr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-may-dangle.stderr b/tests/ui/feature-gates/feature-gate-may-dangle.stderr index c12b3ba517d1..67d00714d95c 100644 --- a/tests/ui/feature-gates/feature-gate-may-dangle.stderr +++ b/tests/ui/feature-gates/feature-gate-may-dangle.stderr @@ -6,6 +6,7 @@ LL | unsafe impl<#[may_dangle] A> Drop for Pt { | = note: see issue #34761 for more information = help: add `#![feature(dropck_eyepatch)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-more-qualified-paths.stderr b/tests/ui/feature-gates/feature-gate-more-qualified-paths.stderr index 80ebcabcf8df..e14ef828a57a 100644 --- a/tests/ui/feature-gates/feature-gate-more-qualified-paths.stderr +++ b/tests/ui/feature-gates/feature-gate-more-qualified-paths.stderr @@ -6,6 +6,7 @@ LL | let ::Assoc { br } = StructStruct { br: 2 }; | = note: see issue #86935 for more information = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: usage of qualified paths in this context is experimental --> $DIR/feature-gate-more-qualified-paths.rs:5:13 @@ -15,6 +16,7 @@ LL | let _ = ::Assoc { br: 2 }; | = note: see issue #86935 for more information = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: usage of qualified paths in this context is experimental --> $DIR/feature-gate-more-qualified-paths.rs:7:9 @@ -24,6 +26,7 @@ LL | let ::V(..) = E::V(0); | = note: see issue #86935 for more information = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr index f6fcf4ee3ed0..8a43d6159633 100644 --- a/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr +++ b/tests/ui/feature-gates/feature-gate-multiple_supertrait_upcastable.stderr @@ -6,6 +6,7 @@ LL | #![deny(multiple_supertrait_upcastable)] | = note: the `multiple_supertrait_upcastable` lint is unstable = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `multiple_supertrait_upcastable` @@ -16,6 +17,7 @@ LL | #![warn(multiple_supertrait_upcastable)] | = note: the `multiple_supertrait_upcastable` lint is unstable = help: add `#![feature(multiple_supertrait_upcastable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: 2 warnings emitted diff --git a/tests/ui/feature-gates/feature-gate-naked_functions.stderr b/tests/ui/feature-gates/feature-gate-naked_functions.stderr index dc6c9138c5d2..e1b826582171 100644 --- a/tests/ui/feature-gates/feature-gate-naked_functions.stderr +++ b/tests/ui/feature-gates/feature-gate-naked_functions.stderr @@ -6,6 +6,7 @@ LL | #[naked] | = note: see issue #90957 for more information = help: add `#![feature(naked_functions)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[naked]` attribute is an experimental feature --> $DIR/feature-gate-naked_functions.rs:11:1 @@ -15,6 +16,7 @@ LL | #[naked] | = note: see issue #90957 for more information = help: add `#![feature(naked_functions)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr index 4c7ae9e2ef5e..216477828e73 100644 --- a/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr +++ b/tests/ui/feature-gates/feature-gate-native_link_modifiers_as_needed.stderr @@ -6,6 +6,7 @@ LL | #[link(name = "foo", kind = "dylib", modifiers = "+as-needed")] | = note: see issue #81490 for more information = help: add `#![feature(native_link_modifiers_as_needed)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-needs-allocator.stderr b/tests/ui/feature-gates/feature-gate-needs-allocator.stderr index ca21f222588d..f26243de25f3 100644 --- a/tests/ui/feature-gates/feature-gate-needs-allocator.stderr +++ b/tests/ui/feature-gates/feature-gate-needs-allocator.stderr @@ -5,6 +5,7 @@ LL | #![needs_allocator] | ^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(allocator_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-never_patterns.stderr b/tests/ui/feature-gates/feature-gate-never_patterns.stderr index dd10829d4959..1b5485d22fbf 100644 --- a/tests/ui/feature-gates/feature-gate-never_patterns.stderr +++ b/tests/ui/feature-gates/feature-gate-never_patterns.stderr @@ -29,6 +29,7 @@ LL | let (Ok(_x) | Err(&!)) = res.as_ref(); | = note: see issue #118155 for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `!` patterns are experimental --> $DIR/feature-gate-never_patterns.rs:15:13 @@ -38,6 +39,7 @@ LL | ! | = note: see issue #118155 for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `!` patterns are experimental --> $DIR/feature-gate-never_patterns.rs:21:13 @@ -47,6 +49,7 @@ LL | ! | = note: see issue #118155 for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `!` patterns are experimental --> $DIR/feature-gate-never_patterns.rs:26:13 @@ -56,6 +59,7 @@ LL | ! => {} | = note: see issue #118155 for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: `match` arm with no body --> $DIR/feature-gate-never_patterns.rs:39:9 @@ -83,6 +87,7 @@ LL | Err(!), | = note: see issue #118155 for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `!` patterns are experimental --> $DIR/feature-gate-never_patterns.rs:55:13 @@ -92,6 +97,7 @@ LL | Err(!) if false, | = note: see issue #118155 for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: `match` arm with no body --> $DIR/feature-gate-never_patterns.rs:65:9 diff --git a/tests/ui/feature-gates/feature-gate-never_type.stderr b/tests/ui/feature-gates/feature-gate-never_type.stderr index 0a59cae9c8c4..0fca58519ce1 100644 --- a/tests/ui/feature-gates/feature-gate-never_type.stderr +++ b/tests/ui/feature-gates/feature-gate-never_type.stderr @@ -6,6 +6,7 @@ LL | type Ma = (u32, !, i32); | = note: see issue #35121 for more information = help: add `#![feature(never_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `!` type is experimental --> $DIR/feature-gate-never_type.rs:8:20 @@ -15,6 +16,7 @@ LL | type Meeshka = Vec; | = note: see issue #35121 for more information = help: add `#![feature(never_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `!` type is experimental --> $DIR/feature-gate-never_type.rs:9:24 @@ -24,6 +26,7 @@ LL | type Mow = &'static fn(!) -> !; | = note: see issue #35121 for more information = help: add `#![feature(never_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `!` type is experimental --> $DIR/feature-gate-never_type.rs:10:27 @@ -33,6 +36,7 @@ LL | type Skwoz = &'static mut !; | = note: see issue #35121 for more information = help: add `#![feature(never_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `!` type is experimental --> $DIR/feature-gate-never_type.rs:13:16 @@ -42,6 +46,7 @@ LL | type Wub = !; | = note: see issue #35121 for more information = help: add `#![feature(never_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors diff --git a/tests/ui/feature-gates/feature-gate-no_core.stderr b/tests/ui/feature-gates/feature-gate-no_core.stderr index e525c95ac36b..f5f04c346aef 100644 --- a/tests/ui/feature-gates/feature-gate-no_core.stderr +++ b/tests/ui/feature-gates/feature-gate-no_core.stderr @@ -6,6 +6,7 @@ LL | #![no_core] | = note: see issue #29639 for more information = help: add `#![feature(no_core)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-no_sanitize.stderr b/tests/ui/feature-gates/feature-gate-no_sanitize.stderr index bb808961eb21..a33bf6a9e40c 100644 --- a/tests/ui/feature-gates/feature-gate-no_sanitize.stderr +++ b/tests/ui/feature-gates/feature-gate-no_sanitize.stderr @@ -6,6 +6,7 @@ LL | #[no_sanitize(address)] | = note: see issue #39699 for more information = help: add `#![feature(no_sanitize)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr index 955d7fe3f3ea..41764c8e018d 100644 --- a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr +++ b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr @@ -7,6 +7,7 @@ LL | #![deny(non_exhaustive_omitted_patterns)] = note: the `non_exhaustive_omitted_patterns` lint is unstable = note: see issue #89554 for more information = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `non_exhaustive_omitted_patterns` @@ -18,6 +19,7 @@ LL | #![allow(non_exhaustive_omitted_patterns)] = note: the `non_exhaustive_omitted_patterns` lint is unstable = note: see issue #89554 for more information = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown lint: `non_exhaustive_omitted_patterns` --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5 @@ -28,6 +30,7 @@ LL | #[allow(non_exhaustive_omitted_patterns)] = note: the `non_exhaustive_omitted_patterns` lint is unstable = note: see issue #89554 for more information = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown lint: `non_exhaustive_omitted_patterns` --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5 @@ -38,6 +41,7 @@ LL | #[allow(non_exhaustive_omitted_patterns)] = note: the `non_exhaustive_omitted_patterns` lint is unstable = note: see issue #89554 for more information = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` warning: unknown lint: `non_exhaustive_omitted_patterns` @@ -49,6 +53,7 @@ LL | #[warn(non_exhaustive_omitted_patterns)] = note: the `non_exhaustive_omitted_patterns` lint is unstable = note: see issue #89554 for more information = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: unknown lint: `non_exhaustive_omitted_patterns` --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:24:5 @@ -59,6 +64,7 @@ LL | #[warn(non_exhaustive_omitted_patterns)] = note: the `non_exhaustive_omitted_patterns` lint is unstable = note: see issue #89554 for more information = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0004]: non-exhaustive patterns: `Foo::C` not covered diff --git a/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr index f727fdae90ec..6dbebc7cf338 100644 --- a/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr +++ b/tests/ui/feature-gates/feature-gate-non_lifetime_binders.stderr @@ -6,6 +6,7 @@ LL | fn foo() where for T:, {} | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr b/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr index 893f78702375..02ee54e8607a 100644 --- a/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr +++ b/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr @@ -15,6 +15,7 @@ LL | offset_of!(Alpha, One); | = note: see issue #106655 for more information = help: add `#![feature(offset_of_enum)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0795]: `One` is an enum variant; expected field at end of `offset_of` --> $DIR/feature-gate-offset-of-enum.rs:12:23 @@ -30,6 +31,7 @@ LL | offset_of!(Alpha, Two.0); | = note: see issue #106655 for more information = help: add `#![feature(offset_of_enum)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr index 86f6040b14ff..2e1d27fb7764 100644 --- a/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr +++ b/tests/ui/feature-gates/feature-gate-omit-gdb-pretty-printer-section.stderr @@ -5,6 +5,7 @@ LL | #[omit_gdb_pretty_printer_section] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(omit_gdb_pretty_printer_section)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr b/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr index a3ced35155f3..815013733a98 100644 --- a/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr +++ b/tests/ui/feature-gates/feature-gate-optimize_attribute.stderr @@ -6,6 +6,7 @@ LL | #[optimize(size)] | = note: see issue #54882 for more information = help: add `#![feature(optimize_attribute)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[optimize]` attribute is an experimental feature --> $DIR/feature-gate-optimize_attribute.rs:10:1 @@ -15,6 +16,7 @@ LL | #[optimize(speed)] | = note: see issue #54882 for more information = help: add `#![feature(optimize_attribute)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[optimize]` attribute is an experimental feature --> $DIR/feature-gate-optimize_attribute.rs:13:1 @@ -24,6 +26,7 @@ LL | #[optimize(banana)] | = note: see issue #54882 for more information = help: add `#![feature(optimize_attribute)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[optimize]` attribute is an experimental feature --> $DIR/feature-gate-optimize_attribute.rs:4:1 @@ -33,6 +36,7 @@ LL | #[optimize(size)] | = note: see issue #54882 for more information = help: add `#![feature(optimize_attribute)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[optimize]` attribute is an experimental feature --> $DIR/feature-gate-optimize_attribute.rs:2:1 @@ -42,6 +46,7 @@ LL | #![optimize(speed)] | = note: see issue #54882 for more information = help: add `#![feature(optimize_attribute)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0722]: invalid argument --> $DIR/feature-gate-optimize_attribute.rs:13:12 diff --git a/tests/ui/feature-gates/feature-gate-prelude_import.stderr b/tests/ui/feature-gates/feature-gate-prelude_import.stderr index b2e2a7c8cc11..3b22c65cd1fc 100644 --- a/tests/ui/feature-gates/feature-gate-prelude_import.stderr +++ b/tests/ui/feature-gates/feature-gate-prelude_import.stderr @@ -5,6 +5,7 @@ LL | #[prelude_import] | ^^^^^^^^^^^^^^^^^ | = help: add `#![feature(prelude_import)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr index f8fa8c54198b..c14d19381c8b 100644 --- a/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr +++ b/tests/ui/feature-gates/feature-gate-proc_macro_byte_character.stderr @@ -6,6 +6,7 @@ LL | Literal::byte_character(b'a'); | = note: see issue #115268 for more information = help: add `#![feature(proc_macro_byte_character)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr b/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr index cc6506c5680e..23792fb09baf 100644 --- a/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr +++ b/tests/ui/feature-gates/feature-gate-profiler-runtime.stderr @@ -5,6 +5,7 @@ LL | #![profiler_runtime] | ^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(profiler_runtime)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-register_tool.stderr b/tests/ui/feature-gates/feature-gate-register_tool.stderr index d72249e02129..a0db6ba74467 100644 --- a/tests/ui/feature-gates/feature-gate-register_tool.stderr +++ b/tests/ui/feature-gates/feature-gate-register_tool.stderr @@ -6,6 +6,7 @@ LL | #![register_tool(tool)] | = note: see issue #66079 for more information = help: add `#![feature(register_tool)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-repr-simd.stderr b/tests/ui/feature-gates/feature-gate-repr-simd.stderr index 5b1270a19845..5b490c0c0c33 100644 --- a/tests/ui/feature-gates/feature-gate-repr-simd.stderr +++ b/tests/ui/feature-gates/feature-gate-repr-simd.stderr @@ -6,6 +6,7 @@ LL | #[repr(simd)] | = note: see issue #27731 for more information = help: add `#![feature(repr_simd)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: SIMD types are experimental and possibly buggy --> $DIR/feature-gate-repr-simd.rs:6:1 @@ -15,6 +16,7 @@ LL | #[repr(simd)] | = note: see issue #27731 for more information = help: add `#![feature(repr_simd)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0566]: conflicting representation hints --> $DIR/feature-gate-repr-simd.rs:4:8 diff --git a/tests/ui/feature-gates/feature-gate-repr128.stderr b/tests/ui/feature-gates/feature-gate-repr128.stderr index 657802632b05..2607032447b3 100644 --- a/tests/ui/feature-gates/feature-gate-repr128.stderr +++ b/tests/ui/feature-gates/feature-gate-repr128.stderr @@ -6,6 +6,7 @@ LL | enum A { | = note: see issue #56071 for more information = help: add `#![feature(repr128)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr index a15b01618f5b..41bd66b13e70 100644 --- a/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr +++ b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr @@ -6,6 +6,7 @@ LL | fn foo>() {} | = note: see issue #109417 for more information = help: add `#![feature(return_type_notation)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: parenthesized generic arguments cannot be used in associated type constraints --> $DIR/feature-gate-return_type_notation.rs:14:17 diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr b/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr index dd6ebb610386..79c626cef35d 100644 --- a/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr +++ b/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr @@ -6,6 +6,7 @@ LL | fn foo>() {} | = note: see issue #109417 for more information = help: add `#![feature(return_type_notation)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 diff --git a/tests/ui/feature-gates/feature-gate-rust_cold_cc.stderr b/tests/ui/feature-gates/feature-gate-rust_cold_cc.stderr index ab7e5f0366da..eeff9534d528 100644 --- a/tests/ui/feature-gates/feature-gate-rust_cold_cc.stderr +++ b/tests/ui/feature-gates/feature-gate-rust_cold_cc.stderr @@ -6,6 +6,7 @@ LL | extern "rust-cold" fn fu() {} | = note: see issue #97544 for more information = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-cold is experimental and subject to change --> $DIR/feature-gate-rust_cold_cc.rs:6:12 @@ -15,6 +16,7 @@ LL | extern "rust-cold" fn mu(); | = note: see issue #97544 for more information = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-cold is experimental and subject to change --> $DIR/feature-gate-rust_cold_cc.rs:7:12 @@ -24,6 +26,7 @@ LL | extern "rust-cold" fn dmu() {} | = note: see issue #97544 for more information = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-cold is experimental and subject to change --> $DIR/feature-gate-rust_cold_cc.rs:12:12 @@ -33,6 +36,7 @@ LL | extern "rust-cold" fn mu() {} | = note: see issue #97544 for more information = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-cold is experimental and subject to change --> $DIR/feature-gate-rust_cold_cc.rs:16:12 @@ -42,6 +46,7 @@ LL | extern "rust-cold" fn imu() {} | = note: see issue #97544 for more information = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-cold is experimental and subject to change --> $DIR/feature-gate-rust_cold_cc.rs:19:19 @@ -51,6 +56,7 @@ LL | type TAU = extern "rust-cold" fn(); | = note: see issue #97544 for more information = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-cold is experimental and subject to change --> $DIR/feature-gate-rust_cold_cc.rs:21:8 @@ -60,6 +66,7 @@ LL | extern "rust-cold" {} | = note: see issue #97544 for more information = help: add `#![feature(rust_cold_cc)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 7 previous errors diff --git a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr index b33721ca43d9..44f7a4bb0e68 100644 --- a/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr +++ b/tests/ui/feature-gates/feature-gate-rustc-allow-const-fn-unstable.stderr @@ -6,6 +6,7 @@ LL | #[rustc_allow_const_fn_unstable()] | = note: see issue #69399 for more information = help: add `#![feature(rustc_allow_const_fn_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-rustc-attrs-1.stderr b/tests/ui/feature-gates/feature-gate-rustc-attrs-1.stderr index 45a095903d2a..8177d5ef6bed 100644 --- a/tests/ui/feature-gates/feature-gate-rustc-attrs-1.stderr +++ b/tests/ui/feature-gates/feature-gate-rustc-attrs-1.stderr @@ -5,6 +5,7 @@ LL | #[rustc_variance] | ^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable --> $DIR/feature-gate-rustc-attrs-1.rs:4:1 @@ -13,6 +14,7 @@ LL | #[rustc_error] | ^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[rustc_nonnull_optimization_guaranteed]` attribute is just used to enable niche optimizations in libcore and libstd and will never be stable --> $DIR/feature-gate-rustc-attrs-1.rs:5:1 @@ -21,6 +23,7 @@ LL | #[rustc_nonnull_optimization_guaranteed] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-rustc-attrs.stderr b/tests/ui/feature-gates/feature-gate-rustc-attrs.stderr index 1517a7a5c731..c7a5ef3e44be 100644 --- a/tests/ui/feature-gates/feature-gate-rustc-attrs.stderr +++ b/tests/ui/feature-gates/feature-gate-rustc-attrs.stderr @@ -41,6 +41,7 @@ LL | #[rustc_dummy] | ^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 7 previous errors diff --git a/tests/ui/feature-gates/feature-gate-rustdoc_internals.stderr b/tests/ui/feature-gates/feature-gate-rustdoc_internals.stderr index c4272a2c04c2..bbb9edd58f09 100644 --- a/tests/ui/feature-gates/feature-gate-rustdoc_internals.stderr +++ b/tests/ui/feature-gates/feature-gate-rustdoc_internals.stderr @@ -6,6 +6,7 @@ LL | #[doc(keyword = "match")] | = note: see issue #90418 for more information = help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[doc(fake_variadic)]` is meant for internal use only --> $DIR/feature-gate-rustdoc_internals.rs:7:1 @@ -15,6 +16,7 @@ LL | #[doc(fake_variadic)] | = note: see issue #90418 for more information = help: add `#![feature(rustdoc_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-simd.stderr b/tests/ui/feature-gates/feature-gate-simd.stderr index fa30d461f9c1..b020db35a51c 100644 --- a/tests/ui/feature-gates/feature-gate-simd.stderr +++ b/tests/ui/feature-gates/feature-gate-simd.stderr @@ -6,6 +6,7 @@ LL | #[repr(simd)] | = note: see issue #27731 for more information = help: add `#![feature(repr_simd)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-start.stderr b/tests/ui/feature-gates/feature-gate-start.stderr index 157bf18c9e87..b1859c43718c 100644 --- a/tests/ui/feature-gates/feature-gate-start.stderr +++ b/tests/ui/feature-gates/feature-gate-start.stderr @@ -6,6 +6,7 @@ LL | fn foo(_: isize, _: *const *const u8) -> isize { 0 } | = note: see issue #29633 for more information = help: add `#![feature(start)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr b/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr index 4ff85dc0797e..67fdae030c04 100644 --- a/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr +++ b/tests/ui/feature-gates/feature-gate-stmt_expr_attributes.stderr @@ -6,6 +6,7 @@ LL | const X: i32 = #[allow(dead_code)] 8; | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-strict_provenance.stderr b/tests/ui/feature-gates/feature-gate-strict_provenance.stderr index 36224ee864b3..82078d576ad6 100644 --- a/tests/ui/feature-gates/feature-gate-strict_provenance.stderr +++ b/tests/ui/feature-gates/feature-gate-strict_provenance.stderr @@ -7,6 +7,7 @@ LL | #![deny(fuzzy_provenance_casts)] = note: the `fuzzy_provenance_casts` lint is unstable = note: see issue #95228 for more information = help: add `#![feature(strict_provenance)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(unknown_lints)]` on by default warning: unknown lint: `lossy_provenance_casts` @@ -18,6 +19,7 @@ LL | #![deny(lossy_provenance_casts)] = note: the `lossy_provenance_casts` lint is unstable = note: see issue #95228 for more information = help: add `#![feature(strict_provenance)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: 2 warnings emitted diff --git a/tests/ui/feature-gates/feature-gate-test_unstable_lint.stderr b/tests/ui/feature-gates/feature-gate-test_unstable_lint.stderr index aec32ac4abb2..5dc303da7420 100644 --- a/tests/ui/feature-gates/feature-gate-test_unstable_lint.stderr +++ b/tests/ui/feature-gates/feature-gate-test_unstable_lint.stderr @@ -6,6 +6,7 @@ LL | #![allow(test_unstable_lint)] | = note: the `test_unstable_lint` lint is unstable = help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(unknown_lints)]` on by default warning: 1 warning emitted diff --git a/tests/ui/feature-gates/feature-gate-thread_local.stderr b/tests/ui/feature-gates/feature-gate-thread_local.stderr index 8fbbfb59a482..de6debafb9d0 100644 --- a/tests/ui/feature-gates/feature-gate-thread_local.stderr +++ b/tests/ui/feature-gates/feature-gate-thread_local.stderr @@ -6,6 +6,7 @@ LL | #[thread_local] | = note: see issue #29594 for more information = help: add `#![feature(thread_local)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-trace_macros.stderr b/tests/ui/feature-gates/feature-gate-trace_macros.stderr index 305186e51173..68d3f75e9959 100644 --- a/tests/ui/feature-gates/feature-gate-trace_macros.stderr +++ b/tests/ui/feature-gates/feature-gate-trace_macros.stderr @@ -6,6 +6,7 @@ LL | trace_macros!(true); | = note: see issue #29598 for more information = help: add `#![feature(trace_macros)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-trait-alias.stderr b/tests/ui/feature-gates/feature-gate-trait-alias.stderr index 919a97673fb0..175c16cf3669 100644 --- a/tests/ui/feature-gates/feature-gate-trait-alias.stderr +++ b/tests/ui/feature-gates/feature-gate-trait-alias.stderr @@ -6,6 +6,7 @@ LL | trait Foo = Default; | = note: see issue #41517 for more information = help: add `#![feature(trait_alias)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-transparent_unions.stderr b/tests/ui/feature-gates/feature-gate-transparent_unions.stderr index 13ea3603a8da..fc1dc12c5714 100644 --- a/tests/ui/feature-gates/feature-gate-transparent_unions.stderr +++ b/tests/ui/feature-gates/feature-gate-transparent_unions.stderr @@ -6,6 +6,7 @@ LL | union OkButUnstableUnion { | = note: see issue #60405 for more information = help: add `#![feature(transparent_unions)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-try_blocks.stderr b/tests/ui/feature-gates/feature-gate-try_blocks.stderr index 028dff34c9d3..dbef7fbe9d25 100644 --- a/tests/ui/feature-gates/feature-gate-try_blocks.stderr +++ b/tests/ui/feature-gates/feature-gate-try_blocks.stderr @@ -10,6 +10,7 @@ LL | | }; | = note: see issue #31436 for more information = help: add `#![feature(try_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-type_ascription.stderr b/tests/ui/feature-gates/feature-gate-type_ascription.stderr index 2c78e4e38320..88da58d07e1a 100644 --- a/tests/ui/feature-gates/feature-gate-type_ascription.stderr +++ b/tests/ui/feature-gates/feature-gate-type_ascription.stderr @@ -6,6 +6,7 @@ LL | let a = type_ascribe!(10, u8); | = note: see issue #23416 for more information = help: add `#![feature(type_ascription)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-type_privacy_lints.stderr b/tests/ui/feature-gates/feature-gate-type_privacy_lints.stderr index 5cc30de9c578..72ac3792fff5 100644 --- a/tests/ui/feature-gates/feature-gate-type_privacy_lints.stderr +++ b/tests/ui/feature-gates/feature-gate-type_privacy_lints.stderr @@ -7,6 +7,7 @@ LL | #![warn(unnameable_types)] = note: the `unnameable_types` lint is unstable = note: see issue #48054 for more information = help: add `#![feature(type_privacy_lints)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(unknown_lints)]` on by default warning: 1 warning emitted diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr index b417dfb506ad..5d598ec2969f 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-manual-impls.stderr @@ -6,6 +6,7 @@ LL | extern "rust-call" fn call(self, args: ()) -> () {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:22:12 @@ -15,6 +16,7 @@ LL | extern "rust-call" fn call_once(self, args: ()) -> () {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:12 @@ -24,6 +26,7 @@ LL | extern "rust-call" fn call_mut(&self, args: ()) -> () {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: rust-call ABI is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:39:12 @@ -33,6 +36,7 @@ LL | extern "rust-call" fn call_once(&self, args: ()) -> () {} | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:9:6 @@ -42,6 +46,7 @@ LL | impl Fn<()> for Foo { | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0183]: manual implementations of `Fn` are experimental --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:9:6 @@ -79,6 +84,7 @@ LL | impl FnMut<()> for Bar { | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0183]: manual implementations of `FnMut` are experimental --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:26:6 @@ -96,6 +102,7 @@ LL | impl FnOnce<()> for Baz { | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0183]: manual implementations of `FnOnce` are experimental --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:6 diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr index c61382c64f5c..0ef732d391b7 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-method-calls.stderr @@ -6,6 +6,7 @@ LL | f.call(()); | = note: see issue #29625 for more information = help: add `#![feature(fn_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-method-calls.rs:5:7 @@ -15,6 +16,7 @@ LL | f.call_mut(()); | = note: see issue #29625 for more information = help: add `#![feature(fn_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-method-calls.rs:6:7 @@ -24,6 +26,7 @@ LL | f.call_once(()); | = note: see issue #29625 for more information = help: add `#![feature(fn_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr index 50eaeecde3d2..f4d75fc6a864 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -6,6 +6,7 @@ LL | Fn::call(&f, ()); | = note: see issue #29625 for more information = help: add `#![feature(fn_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:5:5 @@ -15,6 +16,7 @@ LL | FnMut::call_mut(&mut f, ()); | = note: see issue #29625 for more information = help: add `#![feature(fn_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'fn_traits' --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:6:5 @@ -24,6 +26,7 @@ LL | FnOnce::call_once(f, ()); | = note: see issue #29625 for more information = help: add `#![feature(fn_traits)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/feature-gates/feature-gate-unboxed-closures.stderr b/tests/ui/feature-gates/feature-gate-unboxed-closures.stderr index a763c28de602..52c18ec34c56 100644 --- a/tests/ui/feature-gates/feature-gate-unboxed-closures.stderr +++ b/tests/ui/feature-gates/feature-gate-unboxed-closures.stderr @@ -6,6 +6,7 @@ LL | extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change --> $DIR/feature-gate-unboxed-closures.rs:5:6 @@ -15,6 +16,7 @@ LL | impl FnOnce<(u32, u32)> for Test { | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0183]: manual implementations of `FnOnce` are experimental --> $DIR/feature-gate-unboxed-closures.rs:5:6 diff --git a/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr b/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr index 6fbade424b8e..88c18e726835 100644 --- a/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr +++ b/tests/ui/feature-gates/feature-gate-unix_sigpipe.stderr @@ -6,6 +6,7 @@ LL | #[unix_sigpipe = "inherit"] | = note: see issue #97889 for more information = help: add `#![feature(unix_sigpipe)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-unnamed_fields.stderr b/tests/ui/feature-gates/feature-gate-unnamed_fields.stderr index f026f2c3600b..82f08912bc84 100644 --- a/tests/ui/feature-gates/feature-gate-unnamed_fields.stderr +++ b/tests/ui/feature-gates/feature-gate-unnamed_fields.stderr @@ -6,6 +6,7 @@ LL | _: union { | = note: see issue #49804 for more information = help: add `#![feature(unnamed_fields)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: unnamed fields are not yet fully implemented --> $DIR/feature-gate-unnamed_fields.rs:3:8 @@ -21,6 +22,7 @@ LL | | } | = note: see issue #49804 for more information = help: add `#![feature(unnamed_fields)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: unnamed fields are not yet fully implemented --> $DIR/feature-gate-unnamed_fields.rs:13:5 @@ -30,6 +32,7 @@ LL | _: struct { | = note: see issue #49804 for more information = help: add `#![feature(unnamed_fields)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: unnamed fields are not yet fully implemented --> $DIR/feature-gate-unnamed_fields.rs:13:8 @@ -45,6 +48,7 @@ LL | | } | = note: see issue #49804 for more information = help: add `#![feature(unnamed_fields)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: unnamed fields are not yet fully implemented --> $DIR/feature-gate-unnamed_fields.rs:23:5 @@ -54,6 +58,7 @@ LL | _: S | = note: see issue #49804 for more information = help: add `#![feature(unnamed_fields)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: anonymous unions are unimplemented --> $DIR/feature-gate-unnamed_fields.rs:3:8 diff --git a/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr b/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr index dd5a1cd89e7f..251928658df2 100644 --- a/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr +++ b/tests/ui/feature-gates/feature-gate-unsized_tuple_coercion.stderr @@ -6,6 +6,7 @@ LL | let _ : &(dyn Send,) = &((),); | = note: see issue #42877 for more information = help: add `#![feature(unsized_tuple_coercion)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/feature-gate-used_with_arg.stderr b/tests/ui/feature-gates/feature-gate-used_with_arg.stderr index d115bf4e365a..6288715604f7 100644 --- a/tests/ui/feature-gates/feature-gate-used_with_arg.stderr +++ b/tests/ui/feature-gates/feature-gate-used_with_arg.stderr @@ -6,6 +6,7 @@ LL | #[used(linker)] | = note: see issue #93798 for more information = help: add `#![feature(used_with_arg)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `#[used(compiler)]` is currently unstable --> $DIR/feature-gate-used_with_arg.rs:4:1 @@ -15,6 +16,7 @@ LL | #[used(compiler)] | = note: see issue #93798 for more information = help: add `#![feature(used_with_arg)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-vectorcall.stderr b/tests/ui/feature-gates/feature-gate-vectorcall.stderr index 55ee76ec3f1b..df93e8812c1e 100644 --- a/tests/ui/feature-gates/feature-gate-vectorcall.stderr +++ b/tests/ui/feature-gates/feature-gate-vectorcall.stderr @@ -5,6 +5,7 @@ LL | extern "vectorcall" fn f() {} | ^^^^^^^^^^^^ | = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-vectorcall.rs:15:12 @@ -13,6 +14,7 @@ LL | extern "vectorcall" fn m(); | ^^^^^^^^^^^^ | = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-vectorcall.rs:17:12 @@ -21,6 +23,7 @@ LL | extern "vectorcall" fn dm() {} | ^^^^^^^^^^^^ | = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-vectorcall.rs:22:12 @@ -29,6 +32,7 @@ LL | extern "vectorcall" fn m() {} | ^^^^^^^^^^^^ | = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-vectorcall.rs:26:12 @@ -37,6 +41,7 @@ LL | extern "vectorcall" fn im() {} | ^^^^^^^^^^^^ | = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-vectorcall.rs:29:18 @@ -45,6 +50,7 @@ LL | type TA = extern "vectorcall" fn(); | ^^^^^^^^^^^^ | = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: vectorcall is experimental and subject to change --> $DIR/feature-gate-vectorcall.rs:31:8 @@ -53,6 +59,7 @@ LL | extern "vectorcall" {} | ^^^^^^^^^^^^ | = help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 7 previous errors diff --git a/tests/ui/feature-gates/feature-gate-wasm_abi.stderr b/tests/ui/feature-gates/feature-gate-wasm_abi.stderr index 0140002e350a..973c42af19c5 100644 --- a/tests/ui/feature-gates/feature-gate-wasm_abi.stderr +++ b/tests/ui/feature-gates/feature-gate-wasm_abi.stderr @@ -6,6 +6,7 @@ LL | extern "wasm" fn fu() {} | = note: see issue #83788 for more information = help: add `#![feature(wasm_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: wasm ABI is experimental and subject to change --> $DIR/feature-gate-wasm_abi.rs:11:12 @@ -15,6 +16,7 @@ LL | extern "wasm" fn mu(); | = note: see issue #83788 for more information = help: add `#![feature(wasm_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: wasm ABI is experimental and subject to change --> $DIR/feature-gate-wasm_abi.rs:12:12 @@ -24,6 +26,7 @@ LL | extern "wasm" fn dmu() {} | = note: see issue #83788 for more information = help: add `#![feature(wasm_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: wasm ABI is experimental and subject to change --> $DIR/feature-gate-wasm_abi.rs:17:12 @@ -33,6 +36,7 @@ LL | extern "wasm" fn mu() {} | = note: see issue #83788 for more information = help: add `#![feature(wasm_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: wasm ABI is experimental and subject to change --> $DIR/feature-gate-wasm_abi.rs:21:12 @@ -42,6 +46,7 @@ LL | extern "wasm" fn imu() {} | = note: see issue #83788 for more information = help: add `#![feature(wasm_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: wasm ABI is experimental and subject to change --> $DIR/feature-gate-wasm_abi.rs:24:19 @@ -51,6 +56,7 @@ LL | type TAU = extern "wasm" fn(); | = note: see issue #83788 for more information = help: add `#![feature(wasm_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: wasm ABI is experimental and subject to change --> $DIR/feature-gate-wasm_abi.rs:26:8 @@ -60,6 +66,7 @@ LL | extern "wasm" {} | = note: see issue #83788 for more information = help: add `#![feature(wasm_abi)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 7 previous errors diff --git a/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.stderr b/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.stderr index f90c379bdafe..890517b2506f 100644 --- a/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.stderr +++ b/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.stderr @@ -6,6 +6,7 @@ LL | do yeet | = note: see issue #96373 for more information = help: add `#![feature(yeet_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `do yeet` expression is experimental --> $DIR/feature-gate-yeet_expr-in-cfg.rs:14:5 @@ -15,6 +16,7 @@ LL | do yeet "hello"; | = note: see issue #96373 for more information = help: add `#![feature(yeet_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gate-yeet_expr.stderr b/tests/ui/feature-gates/feature-gate-yeet_expr.stderr index 8d1b92370fbe..4c576714357e 100644 --- a/tests/ui/feature-gates/feature-gate-yeet_expr.stderr +++ b/tests/ui/feature-gates/feature-gate-yeet_expr.stderr @@ -6,6 +6,7 @@ LL | do yeet | = note: see issue #96373 for more information = help: add `#![feature(yeet_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `do yeet` expression is experimental --> $DIR/feature-gate-yeet_expr.rs:8:5 @@ -15,6 +16,7 @@ LL | do yeet "hello"; | = note: see issue #96373 for more information = help: add `#![feature(yeet_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr b/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr index 0053d9d5cff8..b0ed6e607605 100644 --- a/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr +++ b/tests/ui/feature-gates/feature-gated-feature-in-macro-arg.stderr @@ -5,6 +5,7 @@ LL | extern "rust-intrinsic" { | ^^^^^^^^^^^^^^^^ | = help: add `#![feature(intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs index 0f833f793bd8..bd3b69c2b4a6 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs @@ -13,6 +13,7 @@ //~^ ERROR: `macro_export` attribute cannot be used at crate level #![rustc_main] //~ ERROR: the `#[rustc_main]` attribute is used internally to specify //~^ ERROR: `rustc_main` attribute cannot be used at crate level +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date #![start] //~^ ERROR: `start` attribute cannot be used at crate level #![repr()] diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr index f01153dcb96c..89fa2abffc2f 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr @@ -5,9 +5,10 @@ LL | #![rustc_main] | ^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: attribute must be of the form `#[inline]` or `#[inline(always|never)]` - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:47:5 | LL | #[inline = "2100"] fn f() { } | ^^^^^^^^^^^^^^^^^^ @@ -17,37 +18,37 @@ LL | #[inline = "2100"] fn f() { } = note: `#[deny(ill_formed_attribute_input)]` on by default error: `start` attribute can only be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:125:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:126:1 | LL | #[start] | ^^^^^^^^ error: `start` attribute can only be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:128:17 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:129:17 | LL | mod inner { #![start] } | ^^^^^^^^^ error: `start` attribute can only be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:133:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:134:5 | LL | #[start] struct S; | ^^^^^^^^ error: `start` attribute can only be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:136:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:137:5 | LL | #[start] type T = S; | ^^^^^^^^ error: `start` attribute can only be used on functions - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:139:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:140:5 | LL | #[start] impl S { } | ^^^^^^^^ error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:31:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:32:1 | LL | #[inline] | ^^^^^^^^^ @@ -62,7 +63,7 @@ LL | | } | |_- not a function or closure error: attribute should be applied to an `extern crate` item - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:65:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:66:1 | LL | #[no_link] | ^^^^^^^^^^ @@ -77,7 +78,7 @@ LL | | } | |_- not an `extern crate` item error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:91:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:92:1 | LL | #[export_name = "2200"] | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -92,7 +93,7 @@ LL | | } | |_- not a free function, impl method or static error[E0517]: attribute should be applied to a struct, enum, or union - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:143:8 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:144:8 | LL | #[repr(C)] | ^ @@ -107,19 +108,19 @@ LL | | } | |_- not a struct, enum, or union error: attribute should be applied to an `extern crate` item - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:25:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:26:1 | LL | #![no_link] | ^^^^^^^^^^^ not an `extern crate` item error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:27:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:28:1 | LL | #![export_name = "2200"] | ^^^^^^^^^^^^^^^^^^^^^^^^ not a free function, impl method or static error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:29:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:30:1 | LL | #![inline] | ^^^^^^^^^^ not a function or closure @@ -155,7 +156,7 @@ LL + #[rustc_main] | error: `start` attribute cannot be used at crate level - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:16:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:17:1 | LL | #![start] | ^^^^^^^^^ @@ -170,7 +171,7 @@ LL + #[start] | error: `repr` attribute cannot be used at crate level - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:18:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:19:1 | LL | #![repr()] | ^^^^^^^^^^ @@ -185,7 +186,7 @@ LL + #[repr()] | error: `path` attribute cannot be used at crate level - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:20:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:21:1 | LL | #![path = "3800"] | ^^^^^^^^^^^^^^^^^ @@ -200,7 +201,7 @@ LL + #[path = "3800"] | error: `automatically_derived` attribute cannot be used at crate level - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:22:1 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:23:1 | LL | #![automatically_derived] | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -215,115 +216,115 @@ LL + #[automatically_derived] | error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:42:17 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:43:17 | LL | mod inner { #![inline] } | ------------^^^^^^^^^^-- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:52:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:53:5 | LL | #[inline] struct S; | ^^^^^^^^^ --------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:56:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:57:5 | LL | #[inline] type T = S; | ^^^^^^^^^ ----------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:60:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:61:5 | LL | #[inline] impl S { } | ^^^^^^^^^ ---------- not a function or closure error: attribute should be applied to an `extern crate` item - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:70:17 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:71:17 | LL | mod inner { #![no_link] } | ------------^^^^^^^^^^^-- not an `extern crate` item error: attribute should be applied to an `extern crate` item - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:74:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:75:5 | LL | #[no_link] fn f() { } | ^^^^^^^^^^ ---------- not an `extern crate` item error: attribute should be applied to an `extern crate` item - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:78:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:79:5 | LL | #[no_link] struct S; | ^^^^^^^^^^ --------- not an `extern crate` item error: attribute should be applied to an `extern crate` item - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:82:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:83:5 | LL | #[no_link]type T = S; | ^^^^^^^^^^----------- not an `extern crate` item error: attribute should be applied to an `extern crate` item - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:86:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:87:5 | LL | #[no_link] impl S { } | ^^^^^^^^^^ ---------- not an `extern crate` item error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:17 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:97:17 | LL | mod inner { #![export_name="2200"] } | ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:102:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:103:5 | LL | #[export_name = "2200"] struct S; | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:106:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:107:5 | LL | #[export_name = "2200"] type T = S; | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:110:5 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:111:5 | LL | #[export_name = "2200"] impl S { } | ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a free function, impl method or static error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:115:9 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:116:9 | LL | #[export_name = "2200"] fn foo(); | ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static error: attribute should be applied to a free function, impl method or static - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119:9 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:120:9 | LL | #[export_name = "2200"] fn bar() {} | ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static error[E0517]: attribute should be applied to a struct, enum, or union - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:147:25 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:148:25 | LL | mod inner { #![repr(C)] } | --------------------^---- not a struct, enum, or union error[E0517]: attribute should be applied to a struct, enum, or union - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:12 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:152:12 | LL | #[repr(C)] fn f() { } | ^ ---------- not a struct, enum, or union error[E0517]: attribute should be applied to a struct, enum, or union - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:157:12 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:158:12 | LL | #[repr(C)] type T = S; | ^ ----------- not a struct, enum, or union error[E0517]: attribute should be applied to a struct, enum, or union - --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:161:12 + --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:162:12 | LL | #[repr(C)] impl S { } | ^ ---------- not a struct, enum, or union diff --git a/tests/ui/feature-gates/issue-43106-gating-of-derive.stderr b/tests/ui/feature-gates/issue-43106-gating-of-derive.stderr index bb8651ffb095..4dee7a00544e 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-derive.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-derive.stderr @@ -21,6 +21,7 @@ LL | mod inner { #![derive(Debug)] } | = note: see issue #54726 for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0774]: `derive` may only be applied to `struct`s, `enum`s and `union`s --> $DIR/issue-43106-gating-of-derive.rs:7:17 diff --git a/tests/ui/feature-gates/issue-49983-see-issue-0.stderr b/tests/ui/feature-gates/issue-49983-see-issue-0.stderr index 5f9e5d440fb2..8f090c9eef90 100644 --- a/tests/ui/feature-gates/issue-49983-see-issue-0.stderr +++ b/tests/ui/feature-gates/issue-49983-see-issue-0.stderr @@ -5,6 +5,7 @@ LL | #[allow(unused_imports)] use core::ptr::Unique; | ^^^^^^^^^^^^^^^^^ | = help: add `#![feature(ptr_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/rustc-private.stderr b/tests/ui/feature-gates/rustc-private.stderr index 7419af80a323..03397cba763d 100644 --- a/tests/ui/feature-gates/rustc-private.stderr +++ b/tests/ui/feature-gates/rustc-private.stderr @@ -6,6 +6,7 @@ LL | extern crate libc; | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/feature-gates/soft-syntax-gates-with-errors.stderr b/tests/ui/feature-gates/soft-syntax-gates-with-errors.stderr index 49550d811ba5..6f7b402d03b1 100644 --- a/tests/ui/feature-gates/soft-syntax-gates-with-errors.stderr +++ b/tests/ui/feature-gates/soft-syntax-gates-with-errors.stderr @@ -6,6 +6,7 @@ LL | macro a() {} | = note: see issue #39412 for more information = help: add `#![feature(decl_macro)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `macro` is experimental --> $DIR/soft-syntax-gates-with-errors.rs:16:5 @@ -15,6 +16,7 @@ LL | macro c() {} | = note: see issue #39412 for more information = help: add `#![feature(decl_macro)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/feature-gates/soft-syntax-gates-without-errors.stderr b/tests/ui/feature-gates/soft-syntax-gates-without-errors.stderr index 3d9c22e54871..817e28570f21 100644 --- a/tests/ui/feature-gates/soft-syntax-gates-without-errors.stderr +++ b/tests/ui/feature-gates/soft-syntax-gates-without-errors.stderr @@ -6,6 +6,7 @@ LL | macro b() {} | = note: see issue #39412 for more information = help: add `#![feature(decl_macro)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 @@ -17,6 +18,7 @@ LL | macro e() {} | = note: see issue #39412 for more information = help: add `#![feature(decl_macro)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 diff --git a/tests/ui/feature-gates/trace_macros-gate.stderr b/tests/ui/feature-gates/trace_macros-gate.stderr index 1ca10aeece56..1313a0e8ae26 100644 --- a/tests/ui/feature-gates/trace_macros-gate.stderr +++ b/tests/ui/feature-gates/trace_macros-gate.stderr @@ -6,6 +6,7 @@ LL | trace_macros!(); | = note: see issue #29598 for more information = help: add `#![feature(trace_macros)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: trace_macros! accepts only `true` or `false` --> $DIR/trace_macros-gate.rs:4:5 @@ -21,6 +22,7 @@ LL | trace_macros!(true); | = note: see issue #29598 for more information = help: add `#![feature(trace_macros)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'trace_macros': `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:7:5 @@ -30,6 +32,7 @@ LL | trace_macros!(false); | = note: see issue #29598 for more information = help: add `#![feature(trace_macros)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'trace_macros': `trace_macros` is not stable enough for use and is subject to change --> $DIR/trace_macros-gate.rs:10:26 @@ -42,6 +45,7 @@ LL | expando!(true); | = note: see issue #29598 for more information = help: add `#![feature(trace_macros)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `expando` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/tests/ui/generic-const-items/feature-gate-generic_const_items.stderr b/tests/ui/generic-const-items/feature-gate-generic_const_items.stderr index a1fdf5f6ef33..12882bd3470a 100644 --- a/tests/ui/generic-const-items/feature-gate-generic_const_items.stderr +++ b/tests/ui/generic-const-items/feature-gate-generic_const_items.stderr @@ -6,6 +6,7 @@ LL | const ONE: i32; | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/feature-gate-generic_const_items.rs:6:5 @@ -16,6 +17,7 @@ LL | | A: Copy; | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/feature-gate-generic_const_items.rs:11:12 @@ -25,6 +27,7 @@ LL | const CONST: i32 = 0; | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/feature-gate-generic_const_items.rs:14:12 @@ -34,6 +37,7 @@ LL | const EMPTY<>: i32 = 0; | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/feature-gate-generic_const_items.rs:18:1 @@ -44,6 +48,7 @@ LL | | String: Clone; | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/feature-gate-generic_const_items.rs:28:22 @@ -53,6 +58,7 @@ LL | discard! { const FREE: () = (); } | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/feature-gate-generic_const_items.rs:31:33 @@ -62,6 +68,7 @@ LL | discard! { impl () { const ASSOC: () = (); } } | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/feature-gate-generic_const_items.rs:34:43 @@ -71,6 +78,7 @@ LL | discard! { impl () { const ASSOC: i32 = 0 where String: Copy; } } | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 8 previous errors diff --git a/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr b/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr index b44a69525a65..8ae8f052e5be 100644 --- a/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr +++ b/tests/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr @@ -6,6 +6,7 @@ LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; | = note: see issue #67264 for more information = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr index 19ebcaf0f369..e2fab14ffc23 100644 --- a/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr +++ b/tests/ui/half-open-range-patterns/range_pat_interactions1.stderr @@ -20,6 +20,7 @@ LL | if let n @ 2..3|4 = x { | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: exclusive range pattern syntax is experimental --> $DIR/range_pat_interactions1.rs:14:23 @@ -29,6 +30,7 @@ LL | } else if let 2..3 | 4 = x { | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/half-open-range-patterns/range_pat_interactions3.stderr b/tests/ui/half-open-range-patterns/range_pat_interactions3.stderr index f7fda67758fe..fe233496261c 100644 --- a/tests/ui/half-open-range-patterns/range_pat_interactions3.stderr +++ b/tests/ui/half-open-range-patterns/range_pat_interactions3.stderr @@ -6,6 +6,7 @@ LL | y @ 0..const { 5 + 1 } => assert_eq!(y, 5), | = note: see issue #76001 for more information = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: exclusive range pattern syntax is experimental --> $DIR/range_pat_interactions3.rs:10:17 @@ -15,6 +16,7 @@ LL | 1 | -3..0 => first_or.push(x), | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: exclusive range pattern syntax is experimental --> $DIR/range_pat_interactions3.rs:12:18 @@ -24,6 +26,7 @@ LL | y @ (0..5 | 6) => or_two.push(y), | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: exclusive range pattern syntax is experimental --> $DIR/range_pat_interactions3.rs:14:17 @@ -33,6 +36,7 @@ LL | y @ 0..const { 5 + 1 } => assert_eq!(y, 5), | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: exclusive range pattern syntax is experimental --> $DIR/range_pat_interactions3.rs:18:17 @@ -42,6 +46,7 @@ LL | y @ ..-7 => assert_eq!(y, -8), | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors diff --git a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr index 3bca554b1e55..5edd877bee03 100644 --- a/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr +++ b/tests/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr @@ -6,6 +6,7 @@ LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; | = note: see issue #67264 for more information = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: exclusive range pattern syntax is experimental --> $DIR/slice_pattern_syntax_problem1.rs:4:23 @@ -15,6 +16,7 @@ LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: exclusive range pattern syntax is experimental --> $DIR/slice_pattern_syntax_problem1.rs:4:32 @@ -24,6 +26,7 @@ LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; | = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/higher-ranked/trait-bounds/hrtb-wrong-kind.stderr b/tests/ui/higher-ranked/trait-bounds/hrtb-wrong-kind.stderr index 765ea9f78540..b512e0bdb43a 100644 --- a/tests/ui/higher-ranked/trait-bounds/hrtb-wrong-kind.stderr +++ b/tests/ui/higher-ranked/trait-bounds/hrtb-wrong-kind.stderr @@ -6,6 +6,7 @@ LL | fn a() where for T: Copy {} | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: only lifetime parameters can be used in this context --> $DIR/hrtb-wrong-kind.rs:4:24 @@ -15,6 +16,7 @@ LL | fn b() where for [(); C]: Copy {} | = note: see issue #108185 for more information = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr index 046d35e4e4ac..1011fc4163bc 100644 --- a/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr +++ b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr @@ -1,4 +1,6 @@ -error: internal compiler error: no errors encountered even though `span_delayed_bug` issued +note: no errors encountered even though `span_delayed_bug` issued + +note: those delayed bugs will now be shown as internal compiler errors error: internal compiler error: {OpaqueTypeKey { def_id: DefId(rpit::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: no-location (#0), ty: Alias(Opaque, AliasTy { args: [], def_id: DefId(foo::{opaque#0}) }) } }} | @@ -6,24 +8,18 @@ error: internal compiler error: {OpaqueTypeKey { def_id: DefId(rpit::{opaque#0}) error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ProvePredicate { predicate: Binder { value: ProjectionPredicate(AliasTy { args: [FnDef(DefId(rpit), []), ()], def_id: DefId(ops::function::FnOnce::Output) }, Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(foo::{opaque#0}) }))), bound_vars: [] } } } - --> $DIR/equality-in-canonical-query.rs:19:5 + --> $DIR/equality-in-canonical-query.rs:21:5 | LL | same_output(foo, rpit); | ^^^^^^^^^^^^^^^^^^^^^^ | - --> $DIR/equality-in-canonical-query.rs:19:5 + --> $DIR/equality-in-canonical-query.rs:21:5 | LL | same_output(foo, rpit); | ^^^^^^^^^^^^^^^^^^^^^^ - - - - - - query stack during panic: end of query stack -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors diff --git a/tests/ui/impl-trait/equality-in-canonical-query.rs b/tests/ui/impl-trait/equality-in-canonical-query.rs index 672b1eeeab69..31ab94f624e5 100644 --- a/tests/ui/impl-trait/equality-in-canonical-query.rs +++ b/tests/ui/impl-trait/equality-in-canonical-query.rs @@ -1,11 +1,13 @@ // issue: #116877 // revisions: sized clone //[sized] check-pass - //[clone] known-bug: #108498 //[clone] failure-status: 101 //[clone] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" -//[clone] normalize-stderr-test: "(?m)note: .*$" -> "" +//[clone] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" +//[clone] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" +//[clone] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" +//[clone] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" //[clone] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" //[clone] normalize-stderr-test: "(?m)^ *at .*\n" -> "" diff --git a/tests/ui/impl-trait/issues/issue-78722-2.stderr b/tests/ui/impl-trait/issues/issue-78722-2.stderr index 69c734530f2a..c402ce864c74 100644 --- a/tests/ui/impl-trait/issues/issue-78722-2.stderr +++ b/tests/ui/impl-trait/issues/issue-78722-2.stderr @@ -25,6 +25,7 @@ LL | let f: F = async { 1 }; | = note: see issue #85368 for more information = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/impl-trait/issues/issue-78722.stderr b/tests/ui/impl-trait/issues/issue-78722.stderr index 5ad659697314..0bb24fae822b 100644 --- a/tests/ui/impl-trait/issues/issue-78722.stderr +++ b/tests/ui/impl-trait/issues/issue-78722.stderr @@ -6,6 +6,7 @@ LL | let f: F = async { 1 }; | = note: see issue #85368 for more information = help: add `#![feature(const_async_blocks)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0271]: expected `{async block@$DIR/issue-78722.rs:10:13: 10:21}` to be a future that resolves to `u8`, but it resolves to `()` --> $DIR/issue-78722.rs:8:30 diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr index 5e8a8637d048..3e1d4e22272d 100644 --- a/tests/ui/impl-trait/where-allowed.stderr +++ b/tests/ui/impl-trait/where-allowed.stderr @@ -24,6 +24,7 @@ LL | type Out = impl Debug; | = note: see issue #63063 for more information = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/where-allowed.rs:154:23 @@ -33,6 +34,7 @@ LL | type InTypeAlias = impl Debug; | = note: see issue #63063 for more information = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/where-allowed.rs:157:39 @@ -42,6 +44,7 @@ LL | type InReturnInTypeAlias = fn() -> impl Debug; | = note: see issue #63063 for more information = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0562]: `impl Trait` is not allowed in `fn` pointer parameters --> $DIR/where-allowed.rs:18:40 diff --git a/tests/ui/imports/issue-37887.stderr b/tests/ui/imports/issue-37887.stderr index 75185cad3b76..6117fd21af18 100644 --- a/tests/ui/imports/issue-37887.stderr +++ b/tests/ui/imports/issue-37887.stderr @@ -14,6 +14,7 @@ LL | extern crate libc; | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/inference/inference_unstable_forced.stderr b/tests/ui/inference/inference_unstable_forced.stderr index 2301eacc596d..26eaddd27072 100644 --- a/tests/ui/inference/inference_unstable_forced.stderr +++ b/tests/ui/inference/inference_unstable_forced.stderr @@ -6,6 +6,7 @@ LL | assert_eq!('x'.ipu_flatten(), 0); | = note: see issue #99999 for more information = help: add `#![feature(ipu_flatten)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/internal/internal-unstable-noallow.stderr b/tests/ui/internal/internal-unstable-noallow.stderr index b0ceae62aba7..b39456b1caec 100644 --- a/tests/ui/internal/internal-unstable-noallow.stderr +++ b/tests/ui/internal/internal-unstable-noallow.stderr @@ -5,6 +5,7 @@ LL | call_unstable_noallow!(); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `call_unstable_noallow` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'struct_field' @@ -14,6 +15,7 @@ LL | construct_unstable_noallow!(0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(struct_field)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `construct_unstable_noallow` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'method' @@ -23,6 +25,7 @@ LL | |x: internal_unstable::Foo| { call_method_noallow!(x) }; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(method)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `call_method_noallow` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'struct2_field' @@ -32,6 +35,7 @@ LL | |x: internal_unstable::Bar| { access_field_noallow!(x) }; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(struct2_field)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `access_field_noallow` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/internal/internal-unstable-thread-local.stderr b/tests/ui/internal/internal-unstable-thread-local.stderr index 7c07c762827d..58c7b3f67ebe 100644 --- a/tests/ui/internal/internal-unstable-thread-local.stderr +++ b/tests/ui/internal/internal-unstable-thread-local.stderr @@ -5,6 +5,7 @@ LL | thread_local!(static BAR: () = internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/internal/internal-unstable.stderr b/tests/ui/internal/internal-unstable.stderr index b7c47365c2d2..af5ac21e6964 100644 --- a/tests/ui/internal/internal-unstable.stderr +++ b/tests/ui/internal/internal-unstable.stderr @@ -5,6 +5,7 @@ LL | pass_through_allow!(internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:42:27 @@ -13,6 +14,7 @@ LL | pass_through_noallow!(internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:46:22 @@ -21,6 +23,7 @@ LL | println!("{:?}", internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:48:10 @@ -29,6 +32,7 @@ LL | bar!(internal_unstable::unstable()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'function' --> $DIR/internal-unstable.rs:18:9 @@ -40,6 +44,7 @@ LL | bar!(internal_unstable::unstable()); | ----------------------------------- in this macro invocation | = help: add `#![feature(function)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `foo` which comes from the expansion of the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 5 previous errors diff --git a/tests/ui/intrinsics/feature-gate-safe-intrinsic.stderr b/tests/ui/intrinsics/feature-gate-safe-intrinsic.stderr index 8aeb56598ec1..e49880e9bb8d 100644 --- a/tests/ui/intrinsics/feature-gate-safe-intrinsic.stderr +++ b/tests/ui/intrinsics/feature-gate-safe-intrinsic.stderr @@ -5,6 +5,7 @@ LL | #[rustc_safe_intrinsic] | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: attribute should be applied to intrinsic functions --> $DIR/feature-gate-safe-intrinsic.rs:1:1 diff --git a/tests/ui/intrinsics/unchecked_math_unstable.stderr b/tests/ui/intrinsics/unchecked_math_unstable.stderr index a43aa16aedc2..c2a116b62004 100644 --- a/tests/ui/intrinsics/unchecked_math_unstable.stderr +++ b/tests/ui/intrinsics/unchecked_math_unstable.stderr @@ -5,6 +5,7 @@ LL | let add = std::intrinsics::unchecked_add(x, y); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library --> $DIR/unchecked_math_unstable.rs:5:19 @@ -13,6 +14,7 @@ LL | let sub = std::intrinsics::unchecked_sub(x, y); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'core_intrinsics': intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library --> $DIR/unchecked_math_unstable.rs:6:19 @@ -21,6 +23,7 @@ LL | let mul = std::intrinsics::unchecked_mul(x, y); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/issues/issue-20313.stderr b/tests/ui/issues/issue-20313.stderr index f740b0cca06c..a61495440f0f 100644 --- a/tests/ui/issues/issue-20313.stderr +++ b/tests/ui/issues/issue-20313.stderr @@ -6,6 +6,7 @@ LL | fn sqrt(x: f32) -> f32; | = note: see issue #29602 for more information = help: add `#![feature(link_llvm_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/issues/issue-23024.stderr b/tests/ui/issues/issue-23024.stderr index 7d187de1bc44..1672622d8b72 100644 --- a/tests/ui/issues/issue-23024.stderr +++ b/tests/ui/issues/issue-23024.stderr @@ -6,6 +6,7 @@ LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3)); | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0107]: missing generics for trait `Fn` --> $DIR/issue-23024.rs:8:39 diff --git a/tests/ui/issues/issue-32782.stderr b/tests/ui/issues/issue-32782.stderr index 477c01f68640..830d83f6e57b 100644 --- a/tests/ui/issues/issue-32782.stderr +++ b/tests/ui/issues/issue-32782.stderr @@ -8,6 +8,7 @@ LL | foo!(); | ------ in this macro invocation | = help: add `#![feature(allow_internal_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/issues/issue-50582.stderr b/tests/ui/issues/issue-50582.stderr index 9eafd7ab4f0f..7b65fa25ae37 100644 --- a/tests/ui/issues/issue-50582.stderr +++ b/tests/ui/issues/issue-50582.stderr @@ -6,6 +6,7 @@ LL | Vec::<[(); 1 + for x in 0..1 {}]>::new(); | = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0277]: cannot add `()` to `{integer}` --> $DIR/issue-50582.rs:2:18 diff --git a/tests/ui/issues/issue-50585.stderr b/tests/ui/issues/issue-50585.stderr index e43cc20cbb57..13181f1cf7fe 100644 --- a/tests/ui/issues/issue-50585.stderr +++ b/tests/ui/issues/issue-50585.stderr @@ -6,6 +6,7 @@ LL | |y: Vec<[(); for x in 0..2 {}]>| {}; | = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0308]: mismatched types --> $DIR/issue-50585.rs:2:18 diff --git a/tests/ui/issues/issue-52489.stderr b/tests/ui/issues/issue-52489.stderr index 442902bd1c3f..fa88725bcebf 100644 --- a/tests/ui/issues/issue-52489.stderr +++ b/tests/ui/issues/issue-52489.stderr @@ -5,6 +5,7 @@ LL | use issue_52489; | ^^^^^^^^^^^ | = help: add `#![feature(issue_52489_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/lang-items/issue-83471.stderr b/tests/ui/lang-items/issue-83471.stderr index b315df179d01..1f22d966dd7d 100644 --- a/tests/ui/lang-items/issue-83471.stderr +++ b/tests/ui/lang-items/issue-83471.stderr @@ -11,6 +11,7 @@ LL | #[lang = "sized"] | ^^^^^^^^^^^^^^^^^ | = help: add `#![feature(lang_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: language items are subject to change --> $DIR/issue-83471.rs:11:1 @@ -19,6 +20,7 @@ LL | #[lang = "fn"] | ^^^^^^^^^^^^^^ | = help: add `#![feature(lang_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: anonymous parameters are deprecated and will be removed in the next edition --> $DIR/issue-83471.rs:15:13 diff --git a/tests/ui/linkage-attr/linkage4.stderr b/tests/ui/linkage-attr/linkage4.stderr index f76655b3c725..8fbcaf841b66 100644 --- a/tests/ui/linkage-attr/linkage4.stderr +++ b/tests/ui/linkage-attr/linkage4.stderr @@ -6,6 +6,7 @@ LL | #[linkage = "external"] | = note: see issue #29603 for more information = help: add `#![feature(linkage)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/lint/lint-output-format.stderr b/tests/ui/lint/lint-output-format.stderr index 0db79a1564fa..c399b6cdbc25 100644 --- a/tests/ui/lint/lint-output-format.stderr +++ b/tests/ui/lint/lint-output-format.stderr @@ -5,6 +5,7 @@ LL | extern crate lint_output_format; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-output-format.rs:7:26 @@ -13,6 +14,7 @@ LL | use lint_output_format::{foo, bar}; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-output-format.rs:7:31 @@ -21,6 +23,7 @@ LL | use lint_output_format::{foo, bar}; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-output-format.rs:12:14 @@ -29,6 +32,7 @@ LL | let _y = bar(); | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/lint/lint-stability-2.stderr b/tests/ui/lint/lint-stability-2.stderr index 5b7537fa234a..20d49780a919 100644 --- a/tests/ui/lint/lint-stability-2.stderr +++ b/tests/ui/lint/lint-stability-2.stderr @@ -5,6 +5,7 @@ LL | foo.method_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:42:9 @@ -13,6 +14,7 @@ LL | Foo::method_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:44:9 @@ -21,6 +23,7 @@ LL | ::method_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:46:13 @@ -29,6 +32,7 @@ LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:48:9 @@ -37,6 +41,7 @@ LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:51:13 @@ -45,6 +50,7 @@ LL | foo.method_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:53:9 @@ -53,6 +59,7 @@ LL | Foo::method_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:55:9 @@ -61,6 +68,7 @@ LL | ::method_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:57:13 @@ -69,6 +77,7 @@ LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:59:9 @@ -77,6 +86,7 @@ LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:62:13 @@ -85,6 +95,7 @@ LL | foo.method_unstable(); | ^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:63:9 @@ -93,6 +104,7 @@ LL | Foo::method_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:64:9 @@ -101,6 +113,7 @@ LL | ::method_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:65:13 @@ -109,6 +122,7 @@ LL | foo.trait_unstable(); | ^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:66:9 @@ -117,6 +131,7 @@ LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:68:13 @@ -125,6 +140,7 @@ LL | foo.method_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:70:9 @@ -133,6 +149,7 @@ LL | Foo::method_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:72:9 @@ -141,6 +158,7 @@ LL | ::method_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:74:13 @@ -149,6 +167,7 @@ LL | foo.trait_unstable_text(); | ^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:76:9 @@ -157,6 +176,7 @@ LL | ::trait_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:131:13 @@ -165,6 +185,7 @@ LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:133:9 @@ -173,6 +194,7 @@ LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:135:13 @@ -181,6 +203,7 @@ LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:137:9 @@ -189,6 +212,7 @@ LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:139:13 @@ -197,6 +221,7 @@ LL | foo.trait_unstable(); | ^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:140:9 @@ -205,6 +230,7 @@ LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:141:13 @@ -213,6 +239,7 @@ LL | foo.trait_unstable_text(); | ^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:143:9 @@ -221,6 +248,7 @@ LL | ::trait_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:154:13 @@ -229,6 +257,7 @@ LL | foo.trait_deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:156:13 @@ -237,6 +266,7 @@ LL | foo.trait_deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-2.rs:158:13 @@ -245,6 +275,7 @@ LL | foo.trait_unstable(); | ^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability-2.rs:159:13 @@ -253,6 +284,7 @@ LL | foo.trait_unstable_text(); | ^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 32 previous errors diff --git a/tests/ui/lint/lint-stability-fields.stderr b/tests/ui/lint/lint-stability-fields.stderr index 3d2e73c1e8e9..9dffe94c12e6 100644 --- a/tests/ui/lint/lint-stability-fields.stderr +++ b/tests/ui/lint/lint-stability-fields.stderr @@ -5,6 +5,7 @@ LL | let x = Unstable { | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:66:13 @@ -13,6 +14,7 @@ LL | let Unstable { | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:72:13 @@ -21,6 +23,7 @@ LL | let Unstable | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:77:17 @@ -29,6 +32,7 @@ LL | let x = reexport::Unstable2(1, 2, 3); | ^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:79:17 @@ -37,6 +41,7 @@ LL | let x = Unstable2(1, 2, 3); | ^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:85:13 @@ -45,6 +50,7 @@ LL | let Unstable2 | ^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:90:13 @@ -53,6 +59,7 @@ LL | let Unstable2 | ^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:95:17 @@ -61,6 +68,7 @@ LL | let x = Deprecated { | ^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:105:13 @@ -69,6 +77,7 @@ LL | let Deprecated { | ^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:111:13 @@ -77,6 +86,7 @@ LL | let Deprecated | ^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:115:17 @@ -85,6 +95,7 @@ LL | let x = Deprecated2(1, 2, 3); | ^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:121:13 @@ -93,6 +104,7 @@ LL | let Deprecated2 | ^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:126:13 @@ -101,6 +113,7 @@ LL | let Deprecated2 | ^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:21:13 @@ -109,6 +122,7 @@ LL | override1: 2, | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:22:13 @@ -117,6 +131,7 @@ LL | override2: 3, | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:27:17 @@ -125,6 +140,7 @@ LL | let _ = x.override1; | ^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:28:17 @@ -133,6 +149,7 @@ LL | let _ = x.override2; | ^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:33:13 @@ -141,6 +158,7 @@ LL | override1: _, | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:34:13 @@ -149,6 +167,7 @@ LL | override2: _, | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:43:17 @@ -157,6 +176,7 @@ LL | let _ = x.1; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:44:17 @@ -165,6 +185,7 @@ LL | let _ = x.2; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:48:20 @@ -173,6 +194,7 @@ LL | _, | ^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:49:20 @@ -181,6 +203,7 @@ LL | _, | ^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:57:13 @@ -189,6 +212,7 @@ LL | inherit: 1, | ^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:59:13 @@ -197,6 +221,7 @@ LL | override2: 3, | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:62:17 @@ -205,6 +230,7 @@ LL | let _ = x.inherit; | ^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:64:17 @@ -213,6 +239,7 @@ LL | let _ = x.override2; | ^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:67:13 @@ -221,6 +248,7 @@ LL | inherit: _, | ^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:69:13 @@ -229,6 +257,7 @@ LL | override2: _ | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:81:17 @@ -237,6 +266,7 @@ LL | let _ = x.0; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:83:17 @@ -245,6 +275,7 @@ LL | let _ = x.2; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:86:14 @@ -253,6 +284,7 @@ LL | (_, | ^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:88:14 @@ -261,6 +293,7 @@ LL | _) | ^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:96:13 @@ -269,6 +302,7 @@ LL | inherit: 1, | ^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:98:13 @@ -277,6 +311,7 @@ LL | override2: 3, | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:101:17 @@ -285,6 +320,7 @@ LL | let _ = x.inherit; | ^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:103:17 @@ -293,6 +329,7 @@ LL | let _ = x.override2; | ^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:106:13 @@ -301,6 +338,7 @@ LL | inherit: _, | ^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:108:13 @@ -309,6 +347,7 @@ LL | override2: _ | ^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:117:17 @@ -317,6 +356,7 @@ LL | let _ = x.0; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:119:17 @@ -325,6 +365,7 @@ LL | let _ = x.2; | ^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:122:14 @@ -333,6 +374,7 @@ LL | (_, | ^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability-fields.rs:124:14 @@ -341,6 +383,7 @@ LL | _) | ^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 43 previous errors diff --git a/tests/ui/lint/lint-stability.stderr b/tests/ui/lint/lint-stability.stderr index bd1a57dc4cc5..af5816d4564f 100644 --- a/tests/ui/lint/lint-stability.stderr +++ b/tests/ui/lint/lint-stability.stderr @@ -5,6 +5,7 @@ LL | extern crate stability_cfg2; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:45:9 @@ -13,6 +14,7 @@ LL | deprecated_unstable(); | ^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:47:9 @@ -21,6 +23,7 @@ LL | Trait::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:49:9 @@ -29,6 +32,7 @@ LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:52:9 @@ -37,6 +41,7 @@ LL | deprecated_unstable_text(); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:54:9 @@ -45,6 +50,7 @@ LL | Trait::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:56:9 @@ -53,6 +59,7 @@ LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:59:9 @@ -61,6 +68,7 @@ LL | unstable(); | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:60:9 @@ -69,6 +77,7 @@ LL | Trait::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:61:9 @@ -77,6 +86,7 @@ LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability.rs:63:9 @@ -85,6 +95,7 @@ LL | unstable_text(); | ^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability.rs:65:9 @@ -93,6 +104,7 @@ LL | Trait::trait_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability.rs:67:9 @@ -101,6 +113,7 @@ LL | ::trait_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:99:17 @@ -109,6 +122,7 @@ LL | let _ = DeprecatedUnstableStruct { | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:103:17 @@ -117,6 +131,7 @@ LL | let _ = UnstableStruct { i: 0 }; | ^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:107:17 @@ -125,6 +140,7 @@ LL | let _ = DeprecatedUnstableUnitStruct; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:109:17 @@ -133,6 +149,7 @@ LL | let _ = UnstableUnitStruct; | ^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:113:17 @@ -141,6 +158,7 @@ LL | let _ = Enum::DeprecatedUnstableVariant; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:115:17 @@ -149,6 +167,7 @@ LL | let _ = Enum::UnstableVariant; | ^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:119:17 @@ -157,6 +176,7 @@ LL | let _ = DeprecatedUnstableTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:121:17 @@ -165,6 +185,7 @@ LL | let _ = UnstableTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:130:25 @@ -173,6 +194,7 @@ LL | macro_test_arg!(deprecated_unstable_text()); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:144:9 @@ -181,6 +203,7 @@ LL | Trait::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:146:9 @@ -189,6 +212,7 @@ LL | ::trait_deprecated_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:148:9 @@ -197,6 +221,7 @@ LL | Trait::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:150:9 @@ -205,6 +230,7 @@ LL | ::trait_deprecated_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:152:9 @@ -213,6 +239,7 @@ LL | Trait::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:153:9 @@ -221,6 +248,7 @@ LL | ::trait_unstable(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability.rs:154:9 @@ -229,6 +257,7 @@ LL | Trait::trait_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/lint-stability.rs:156:9 @@ -237,6 +266,7 @@ LL | ::trait_unstable_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:172:10 @@ -245,6 +275,7 @@ LL | impl UnstableTrait for S { } | ^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:174:24 @@ -253,6 +284,7 @@ LL | trait LocalTrait : UnstableTrait { } | ^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:179:9 @@ -261,6 +293,7 @@ LL | fn trait_unstable(&self) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:184:5 @@ -269,6 +302,7 @@ LL | extern crate inherited_stability; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:185:9 @@ -277,6 +311,7 @@ LL | use self::inherited_stability::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:188:9 @@ -285,6 +320,7 @@ LL | unstable(); | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:191:9 @@ -293,6 +329,7 @@ LL | stable_mod::unstable(); | ^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:194:9 @@ -301,6 +338,7 @@ LL | unstable_mod::deprecated(); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:195:9 @@ -309,6 +347,7 @@ LL | unstable_mod::unstable(); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:197:17 @@ -317,6 +356,7 @@ LL | let _ = Unstable::UnstableVariant; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:198:17 @@ -325,6 +365,7 @@ LL | let _ = Unstable::StableVariant; | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:88:48 @@ -333,6 +374,7 @@ LL | struct S1(T::TypeUnstable); | ^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/lint-stability.rs:92:13 @@ -341,6 +383,7 @@ LL | TypeUnstable = u8, | ^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 43 previous errors diff --git a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr index 9ec33b1c4903..e28ff2ec7034 100644 --- a/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr +++ b/tests/ui/lint/must_not_suspend/feature-gate-must_not_suspend.stderr @@ -6,6 +6,7 @@ LL | #[must_not_suspend = "You gotta use Umm's, ya know?"] | = note: see issue #83310 for more information = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/lint/must_not_suspend/gated.stderr b/tests/ui/lint/must_not_suspend/gated.stderr index c238c1f3351f..aff1b6a2ac45 100644 --- a/tests/ui/lint/must_not_suspend/gated.stderr +++ b/tests/ui/lint/must_not_suspend/gated.stderr @@ -7,6 +7,7 @@ LL | #![deny(must_not_suspend)] = note: the `must_not_suspend` lint is unstable = note: see issue #83310 for more information = help: add `#![feature(must_not_suspend)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: `#[warn(unknown_lints)]` on by default warning: 1 warning emitted diff --git a/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr b/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr index b8e7d61a1ecc..5d252fdcf5da 100644 --- a/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr +++ b/tests/ui/lint/rfc-2383-lint-reason/expect_missing_feature_gate.stderr @@ -6,6 +6,7 @@ LL | #[expect(unused)] | = note: see issue #54503 for more information = help: add `#![feature(lint_reasons)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/lint/unused/unused-doc-comments-edge-cases.stderr b/tests/ui/lint/unused/unused-doc-comments-edge-cases.stderr index b5aa6215797d..55e4834e6707 100644 --- a/tests/ui/lint/unused/unused-doc-comments-edge-cases.stderr +++ b/tests/ui/lint/unused/unused-doc-comments-edge-cases.stderr @@ -12,6 +12,7 @@ LL | /// useless doc comment | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: `///` is for documentation comments. For a plain comment, use `//`. error: unused doc comment diff --git a/tests/ui/macros/issue-68060.rs b/tests/ui/macros/issue-68060.rs index fb40cd5387b7..1a826bd60e03 100644 --- a/tests/ui/macros/issue-68060.rs +++ b/tests/ui/macros/issue-68060.rs @@ -8,6 +8,7 @@ fn main() { #[track_caller] //~^ ERROR: `#[track_caller]` on closures is currently unstable //~| NOTE: see issue #87417 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date |_| (), //~^ NOTE: not a function ) diff --git a/tests/ui/macros/issue-68060.stderr b/tests/ui/macros/issue-68060.stderr index 52e6ed92e9d2..5724a9ea4384 100644 --- a/tests/ui/macros/issue-68060.stderr +++ b/tests/ui/macros/issue-68060.stderr @@ -21,6 +21,7 @@ LL | #[track_caller] | = note: see issue #87417 for more information = help: add `#![feature(closure_track_caller)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/macros/macro-stability.stderr b/tests/ui/macros/macro-stability.stderr index 2cfdb52b174a..21b6cef5c9ce 100644 --- a/tests/ui/macros/macro-stability.stderr +++ b/tests/ui/macros/macro-stability.stderr @@ -5,6 +5,7 @@ LL | local_unstable!(); | ^^^^^^^^^^^^^^ | = help: add `#![feature(local_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'local_unstable' --> $DIR/macro-stability.rs:23:5 @@ -13,6 +14,7 @@ LL | local_unstable_modern!(); | ^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(local_unstable)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_macros' --> $DIR/macro-stability.rs:24:5 @@ -21,6 +23,7 @@ LL | unstable_macro!(); | ^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_macros)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: use of deprecated macro `deprecated_macro`: deprecation note --> $DIR/macro-stability.rs:27:5 diff --git a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr index 2c2cbb15b728..7f4adb728c0b 100644 --- a/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr +++ b/tests/ui/macros/rfc-3086-metavar-expr/required-feature.stderr @@ -6,6 +6,7 @@ LL | ${ count($e) } | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:11:16 @@ -15,6 +16,7 @@ LL | ( $$( $$any:tt )* ) => { $$( $$any )* }; | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:11:20 @@ -24,6 +26,7 @@ LL | ( $$( $$any:tt )* ) => { $$( $$any )* }; | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:11:39 @@ -33,6 +36,7 @@ LL | ( $$( $$any:tt )* ) => { $$( $$any )* }; | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:11:43 @@ -42,6 +46,7 @@ LL | ( $$( $$any:tt )* ) => { $$( $$any )* }; | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:22:13 @@ -51,6 +56,7 @@ LL | $( ${ignore($e)} ${index()} )* | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:22:27 @@ -60,6 +66,7 @@ LL | $( ${ignore($e)} ${index()} )* | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:30:19 @@ -69,6 +76,7 @@ LL | 0 $( + 1 ${ignore($i)} )* | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:37:13 @@ -78,6 +86,7 @@ LL | $( ${ignore($e)} ${length()} )* | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: meta-variable expressions are unstable --> $DIR/required-feature.rs:37:27 @@ -87,6 +96,7 @@ LL | $( ${ignore($e)} ${length()} )* | = note: see issue #83527 for more information = help: add `#![feature(macro_metavar_expr)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 10 previous errors diff --git a/tests/ui/mir/lint/storage-live.stderr b/tests/ui/mir/lint/storage-live.stderr index 02156dd858db..2eb8d8e70001 100644 --- a/tests/ui/mir/lint/storage-live.stderr +++ b/tests/ui/mir/lint/storage-live.stderr @@ -2,6 +2,12 @@ error: internal compiler error: broken MIR in Item(DefId(0:8 ~ storage_live[HASH StorageLive(_1) which already has storage here --> $DIR/storage-live.rs:22:13 | +LL | StorageLive(a); + | ^^^^^^^^^^^^^^ + | +note: delayed at compiler/rustc_mir_transform/src/lint.rs:97:26 - disabled backtrace + --> $DIR/storage-live.rs:22:13 + | LL | StorageLive(a); | ^^^^^^^^^^^^^^ @@ -9,6 +15,4 @@ aborting due to `-Z treat-err-as-bug=1` error: the compiler unexpectedly panicked. this is a bug. query stack during panic: -#0 [mir_const] preparing `multiple_storage` for borrow checking -#1 [mir_promoted] promoting constants in MIR for `multiple_storage` end of query stack diff --git a/tests/ui/mir/lint/storage-return.rs b/tests/ui/mir/lint/storage-return.rs index a2f63b449b4d..7f5700fc897a 100644 --- a/tests/ui/mir/lint/storage-return.rs +++ b/tests/ui/mir/lint/storage-return.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zlint-mir -Ztreat-err-as-bug +// compile-flags: -Zlint-mir -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs // failure-status: 101 // dont-check-compiler-stderr // error-pattern: has storage when returning diff --git a/tests/ui/never_type/issue-52443.stderr b/tests/ui/never_type/issue-52443.stderr index 59292ed68a30..83afd9ef2f2c 100644 --- a/tests/ui/never_type/issue-52443.stderr +++ b/tests/ui/never_type/issue-52443.stderr @@ -14,6 +14,7 @@ LL | [(); { for _ in 0usize.. {}; 0}]; | = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0308]: mismatched types --> $DIR/issue-52443.rs:2:10 @@ -59,6 +60,7 @@ LL | [(); { for _ in 0usize.. {}; 0}]; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0015]: cannot call non-const fn ` as Iterator>::next` in constants --> $DIR/issue-52443.rs:9:21 diff --git a/tests/ui/offset-of/offset-of-unstable.stderr b/tests/ui/offset-of/offset-of-unstable.stderr index c39882519a5d..4882dee40422 100644 --- a/tests/ui/offset-of/offset-of-unstable.stderr +++ b/tests/ui/offset-of/offset-of-unstable.stderr @@ -5,6 +5,7 @@ LL | Unstable, | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/offset-of-unstable.rs:23:9 @@ -13,6 +14,7 @@ LL | UnstableWithStableFieldType, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/offset-of-unstable.rs:28:9 @@ -21,6 +23,7 @@ LL | UnstableWithStableFieldType, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/offset-of-unstable.rs:12:5 @@ -33,6 +36,7 @@ LL | | ); | |_____^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'unstable_test_feature' @@ -42,6 +46,7 @@ LL | offset_of!(StableWithUnstableField, unstable); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'unstable_test_feature' @@ -51,6 +56,7 @@ LL | offset_of!(StableWithUnstableFieldType, stable.unstable); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'unstable_test_feature' @@ -64,6 +70,7 @@ LL | | ); | |_____^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0658]: use of unstable library feature 'unstable_test_feature' @@ -77,6 +84,7 @@ LL | | ); | |_____^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 8 previous errors diff --git a/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr b/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr index 45ef22f4421f..2733f7478f0a 100644 --- a/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr +++ b/tests/ui/on-unimplemented/feature-gate-on-unimplemented.stderr @@ -5,6 +5,7 @@ LL | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/or-patterns/or-patterns-syntactic-pass.stderr b/tests/ui/or-patterns/or-patterns-syntactic-pass.stderr index c43fe192a73b..a755342ecf3c 100644 --- a/tests/ui/or-patterns/or-patterns-syntactic-pass.stderr +++ b/tests/ui/or-patterns/or-patterns-syntactic-pass.stderr @@ -6,6 +6,7 @@ LL | let (box 0 | 1); // Unstable; we *can* change the precedence if we want | = note: see issue #29641 for more information = help: add `#![feature(box_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 diff --git a/tests/ui/panic-runtime/needs-gate.stderr b/tests/ui/panic-runtime/needs-gate.stderr index e067ccaebcf6..9f66f05bac98 100644 --- a/tests/ui/panic-runtime/needs-gate.stderr +++ b/tests/ui/panic-runtime/needs-gate.stderr @@ -6,6 +6,7 @@ LL | #![panic_runtime] | = note: see issue #32837 for more information = help: add `#![feature(panic_runtime)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the `#[needs_panic_runtime]` attribute is an experimental feature --> $DIR/needs-gate.rs:5:1 @@ -15,6 +16,7 @@ LL | #![needs_panic_runtime] | = note: see issue #32837 for more information = help: add `#![feature(needs_panic_runtime)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr index 7e843c7f4d00..393ed704b419 100644 --- a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr +++ b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr @@ -6,6 +6,7 @@ LL | foo::(); | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 @@ -17,6 +18,7 @@ LL | foo::(); | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 diff --git a/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr b/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr index 5bcbbb9deb75..d23e6027473d 100644 --- a/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr +++ b/tests/ui/parser/impl-item-type-no-body-semantic-fail.stderr @@ -50,6 +50,7 @@ LL | type Y; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: inherent associated types are unstable --> $DIR/impl-item-type-no-body-semantic-fail.rs:9:5 @@ -59,6 +60,7 @@ LL | type Z: Ord; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: inherent associated types are unstable --> $DIR/impl-item-type-no-body-semantic-fail.rs:13:5 @@ -68,6 +70,7 @@ LL | type W: Ord where Self: Eq; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: inherent associated types are unstable --> $DIR/impl-item-type-no-body-semantic-fail.rs:17:5 @@ -77,6 +80,7 @@ LL | type W where Self: Eq; | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0592]: duplicate definitions with name `W` --> $DIR/impl-item-type-no-body-semantic-fail.rs:17:5 diff --git a/tests/ui/parser/issues/issue-118531-ice.stderr b/tests/ui/parser/issues/issue-118531-ice.stderr index a32292dcb0de..68c7ad47b9de 100644 --- a/tests/ui/parser/issues/issue-118531-ice.stderr +++ b/tests/ui/parser/issues/issue-118531-ice.stderr @@ -26,6 +26,7 @@ LL | #[attr] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: cannot find attribute `attr` in this scope --> $DIR/issue-118531-ice.rs:5:7 diff --git a/tests/ui/parser/recover/recover-assoc-const-constraint.stderr b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr index 2d36ce4e9863..02b1c3fe68a9 100644 --- a/tests/ui/parser/recover/recover-assoc-const-constraint.stderr +++ b/tests/ui/parser/recover/recover-assoc-const-constraint.stderr @@ -6,6 +6,7 @@ LL | bar::(); | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: associated const equality is incomplete --> $DIR/recover-assoc-const-constraint.rs:5:11 @@ -15,6 +16,7 @@ LL | bar::(); | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/parser/recover/recover-quantified-closure.stderr b/tests/ui/parser/recover/recover-quantified-closure.stderr index 37e93cbee7be..6e03bbb58695 100644 --- a/tests/ui/parser/recover/recover-quantified-closure.stderr +++ b/tests/ui/parser/recover/recover-quantified-closure.stderr @@ -12,6 +12,7 @@ LL | for<'a> |x: &'a u8| *x + 1; | = note: see issue #97362 for more information = help: add `#![feature(closure_lifetime_binder)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider removing `for<...>` error[E0658]: `for<...>` binders for closures are experimental @@ -22,6 +23,7 @@ LL | for ::Bar in x {} | = note: see issue #97362 for more information = help: add `#![feature(closure_lifetime_binder)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider removing `for<...>` error: implicit types in closure signatures are forbidden when `for<...>` is present diff --git a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr index cddd01212798..c3c9131b63eb 100644 --- a/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr +++ b/tests/ui/pattern/range-pattern-meant-to-be-slice-rest-pattern.stderr @@ -23,6 +23,7 @@ LL | [1, rest..] => println!("{rest:?}"), | = note: see issue #67264 for more information = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/pattern/rest-pat-syntactic.stderr b/tests/ui/pattern/rest-pat-syntactic.stderr index 37019b7d5ba7..4de273051890 100644 --- a/tests/ui/pattern/rest-pat-syntactic.stderr +++ b/tests/ui/pattern/rest-pat-syntactic.stderr @@ -6,6 +6,7 @@ LL | let box ..; | = note: see issue #29641 for more information = help: add `#![feature(box_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 @@ -17,6 +18,7 @@ LL | box .., | = note: see issue #29641 for more information = help: add `#![feature(box_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = warning: unstable syntax can change at any point in the future, causing a hard error! = note: for more information, see issue #65860 diff --git a/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr index 6d74feb7a9f3..1c560aa2ca81 100644 --- a/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr +++ b/tests/ui/pattern/usefulness/issue-119493-type-error-ice.stderr @@ -23,6 +23,7 @@ LL | type U = impl Copy; | = note: see issue #63063 for more information = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr index 93ef05decd26..7da384d613ef 100644 --- a/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr +++ b/tests/ui/pattern/usefulness/issue-119778-type-error-ice.stderr @@ -28,6 +28,7 @@ LL | type U = impl Copy; | = note: see issue #63063 for more information = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/pin-macro/cant_access_internals.stderr b/tests/ui/pin-macro/cant_access_internals.stderr index 9af1cd2a16c9..2737b84f5995 100644 --- a/tests/ui/pin-macro/cant_access_internals.stderr +++ b/tests/ui/pin-macro/cant_access_internals.stderr @@ -5,6 +5,7 @@ LL | mem::take(phantom_pinned.pointer); | ^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unsafe_pin_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/proc-macro/attr-stmt-expr.stderr b/tests/ui/proc-macro/attr-stmt-expr.stderr index 56178259d435..92edc44b2781 100644 --- a/tests/ui/proc-macro/attr-stmt-expr.stderr +++ b/tests/ui/proc-macro/attr-stmt-expr.stderr @@ -6,6 +6,7 @@ LL | #[expect_my_macro_expr] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/attr-stmt-expr.rs:62:5 @@ -15,6 +16,7 @@ LL | #[expect_expr] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/proc-macro/attributes-on-modules-fail.stderr b/tests/ui/proc-macro/attributes-on-modules-fail.stderr index 97521f23aeef..e69ab7872386 100644 --- a/tests/ui/proc-macro/attributes-on-modules-fail.stderr +++ b/tests/ui/proc-macro/attributes-on-modules-fail.stderr @@ -14,6 +14,7 @@ LL | mod module; | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: non-inline modules in proc macro input are unstable --> $DIR/attributes-on-modules-fail.rs:24:5 @@ -23,6 +24,7 @@ LL | mod inner; | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: non-inline modules in proc macro input are unstable --> $DIR/attributes-on-modules-fail.rs:33:9 @@ -32,6 +34,7 @@ LL | mod inner; | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: non-inline modules in proc macro input are unstable --> $DIR/attributes-on-modules-fail.rs:42:5 @@ -41,6 +44,7 @@ LL | mod inner; | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0412]: cannot find type `Y` in this scope --> $DIR/attributes-on-modules-fail.rs:10:14 diff --git a/tests/ui/proc-macro/expand-to-unstable.stderr b/tests/ui/proc-macro/expand-to-unstable.stderr index dda590ee8c7e..9eb701d97025 100644 --- a/tests/ui/proc-macro/expand-to-unstable.stderr +++ b/tests/ui/proc-macro/expand-to-unstable.stderr @@ -5,6 +5,7 @@ LL | #[derive(Unstable)] | ^^^^^^^^ | = help: add `#![feature(core_intrinsics)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the derive macro `Unstable` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error diff --git a/tests/ui/proc-macro/inner-attr-non-inline-mod.stderr b/tests/ui/proc-macro/inner-attr-non-inline-mod.stderr index 36825e5a3984..ccc967aaff97 100644 --- a/tests/ui/proc-macro/inner-attr-non-inline-mod.stderr +++ b/tests/ui/proc-macro/inner-attr-non-inline-mod.stderr @@ -6,6 +6,7 @@ LL | #![print_attr] | = note: see issue #54726 for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: non-inline modules in proc macro input are unstable --> $DIR/inner-attr-non-inline-mod.rs:14:1 @@ -15,6 +16,7 @@ LL | mod module_with_attrs; | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: custom inner attributes are unstable --> $DIR/inner-attr-non-inline-mod.rs:14:1 @@ -24,6 +26,7 @@ LL | mod module_with_attrs; | = note: see issue #54726 for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: custom inner attributes are unstable --> $DIR/module_with_attrs.rs:3:4 diff --git a/tests/ui/proc-macro/issue-83510.stderr b/tests/ui/proc-macro/issue-83510.stderr index e0628a317918..e59b77af3dc3 100644 --- a/tests/ui/proc-macro/issue-83510.stderr +++ b/tests/ui/proc-macro/issue-83510.stderr @@ -30,6 +30,7 @@ LL | issue_83510::dance_like_you_want_to_ice!(); | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this error originates in the macro `issue_83510::dance_like_you_want_to_ice` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 4 previous errors diff --git a/tests/ui/proc-macro/proc-macro-gates.stderr b/tests/ui/proc-macro/proc-macro-gates.stderr index ab98784bfbd1..a05a7d0b185e 100644 --- a/tests/ui/proc-macro/proc-macro-gates.stderr +++ b/tests/ui/proc-macro/proc-macro-gates.stderr @@ -6,6 +6,7 @@ LL | #![empty_attr] | = note: see issue #54726 for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: inner macro attributes are unstable --> $DIR/proc-macro-gates.rs:14:8 @@ -15,6 +16,7 @@ LL | #![empty_attr] | = note: see issue #54726 for more information = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: key-value macro attributes are not supported --> $DIR/proc-macro-gates.rs:17:1 @@ -30,6 +32,7 @@ LL | #[empty_attr] | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: custom attributes cannot be applied to statements --> $DIR/proc-macro-gates.rs:30:5 @@ -39,6 +42,7 @@ LL | #[empty_attr] | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: custom attributes cannot be applied to statements --> $DIR/proc-macro-gates.rs:34:5 @@ -48,6 +52,7 @@ LL | #[empty_attr] | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: custom attributes cannot be applied to expressions --> $DIR/proc-macro-gates.rs:38:14 @@ -57,6 +62,7 @@ LL | let _x = #[identity_attr] 2; | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: custom attributes cannot be applied to expressions --> $DIR/proc-macro-gates.rs:41:15 @@ -66,6 +72,7 @@ LL | let _x = [#[identity_attr] 2]; | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: custom attributes cannot be applied to expressions --> $DIR/proc-macro-gates.rs:44:14 @@ -75,6 +82,7 @@ LL | let _x = #[identity_attr] println!(); | = note: see issue #54727 for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: inner macro attributes are unstable --> $DIR/proc-macro-gates.rs:49:8 diff --git a/tests/ui/raw-ref-op/feature-raw-ref-op.stderr b/tests/ui/raw-ref-op/feature-raw-ref-op.stderr index 1e5fd84ff711..4ffd0c90e48b 100644 --- a/tests/ui/raw-ref-op/feature-raw-ref-op.stderr +++ b/tests/ui/raw-ref-op/feature-raw-ref-op.stderr @@ -6,6 +6,7 @@ LL | &raw const a; | = note: see issue #64490 for more information = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw address of syntax is experimental --> $DIR/feature-raw-ref-op.rs:14:5 @@ -15,6 +16,7 @@ LL | &raw mut a; | = note: see issue #64490 for more information = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw address of syntax is experimental --> $DIR/feature-raw-ref-op.rs:19:13 @@ -24,6 +26,7 @@ LL | let x = &raw const y; | = note: see issue #64490 for more information = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw address of syntax is experimental --> $DIR/feature-raw-ref-op.rs:20:13 @@ -33,6 +36,7 @@ LL | let x = &raw mut y; | = note: see issue #64490 for more information = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw address of syntax is experimental --> $DIR/feature-raw-ref-op.rs:7:10 @@ -42,6 +46,7 @@ LL | is_expr!(&raw const a); | = note: see issue #64490 for more information = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: raw address of syntax is experimental --> $DIR/feature-raw-ref-op.rs:8:10 @@ -51,6 +56,7 @@ LL | is_expr!(&raw mut a); | = note: see issue #64490 for more information = help: add `#![feature(raw_ref_op)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 6 previous errors diff --git a/tests/ui/repr/explicit-rust-repr-conflicts.stderr b/tests/ui/repr/explicit-rust-repr-conflicts.stderr index 7126da574b63..30b667f5f2be 100644 --- a/tests/ui/repr/explicit-rust-repr-conflicts.stderr +++ b/tests/ui/repr/explicit-rust-repr-conflicts.stderr @@ -6,6 +6,7 @@ LL | #[repr(Rust, simd)] | = note: see issue #27731 for more information = help: add `#![feature(repr_simd)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0566]: conflicting representation hints --> $DIR/explicit-rust-repr-conflicts.rs:1:8 diff --git a/tests/ui/rfcs/rfc-0000-never_patterns/ICE-119271-never-arm-attr-in-guard.stderr b/tests/ui/rfcs/rfc-0000-never_patterns/ICE-119271-never-arm-attr-in-guard.stderr index 335e6c6db5f7..a456b686e56e 100644 --- a/tests/ui/rfcs/rfc-0000-never_patterns/ICE-119271-never-arm-attr-in-guard.stderr +++ b/tests/ui/rfcs/rfc-0000-never_patterns/ICE-119271-never-arm-attr-in-guard.stderr @@ -6,6 +6,7 @@ LL | if #[deny(unused_mut)] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `!` patterns are experimental --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:5:14 @@ -15,6 +16,7 @@ LL | Some(!) | = note: see issue #118155 for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: a guard on a never pattern will never be run --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:7:13 diff --git a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr index bd294047919f..f047afa985d5 100644 --- a/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr +++ b/tests/ui/rfcs/rfc-1445-restrict-constants-in-patterns/feature-gate.no_gate.stderr @@ -6,6 +6,7 @@ LL | impl std::marker::StructuralPartialEq for Foo { } | = note: see issue #31434 for more information = help: add `#![feature(structural_match)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'structural_match' --> $DIR/feature-gate.rs:31:6 @@ -15,6 +16,7 @@ LL | impl std::marker::StructuralEq for Foo { } | = note: see issue #31434 for more information = help: add `#![feature(structural_match)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr index 62534b555b27..2341dbbbdbd0 100644 --- a/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr +++ b/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr @@ -154,6 +154,7 @@ LL | () if let 0 = 1 => {} | = note: see issue #51114 for more information = help: add `#![feature(if_let_guard)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: you can write `if matches!(, )` instead of `if let = ` error[E0658]: `if let` guards are experimental @@ -164,6 +165,7 @@ LL | () if true && let 0 = 1 => {} | = note: see issue #51114 for more information = help: add `#![feature(if_let_guard)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: you can write `if matches!(, )` instead of `if let = ` error[E0658]: `if let` guards are experimental @@ -174,6 +176,7 @@ LL | () if let 0 = 1 && true => {} | = note: see issue #51114 for more information = help: add `#![feature(if_let_guard)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: you can write `if matches!(, )` instead of `if let = ` error[E0658]: `if let` guards are experimental @@ -184,6 +187,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = | = note: see issue #51114 for more information = help: add `#![feature(if_let_guard)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: you can write `if matches!(, )` instead of `if let = ` error[E0658]: `if let` guards are experimental @@ -194,6 +198,7 @@ LL | () if let Range { start: _, end: _ } = (true..true) && false => {} | = note: see issue #51114 for more information = help: add `#![feature(if_let_guard)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: you can write `if matches!(, )` instead of `if let = ` error[E0658]: `if let` guards are experimental @@ -204,6 +209,7 @@ LL | () if let 0 = 1 => {} | = note: see issue #51114 for more information = help: add `#![feature(if_let_guard)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: you can write `if matches!(, )` instead of `if let = ` error[E0658]: `let` expressions in this position are unstable @@ -214,6 +220,7 @@ LL | () if true && let 0 = 1 => {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:20:15 @@ -223,6 +230,7 @@ LL | () if let 0 = 1 && true => {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:34:15 @@ -232,6 +240,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:34:28 @@ -241,6 +250,7 @@ LL | () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:43:15 @@ -250,6 +260,7 @@ LL | () if let Range { start: _, end: _ } = (true..true) && false => {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 23 previous errors diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr index 06c6c9053389..4f1994d56fd4 100644 --- a/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/feature-gate-target_feature_11.stderr @@ -8,6 +8,7 @@ LL | fn foo() {} | = note: see issue #69098 for more information = help: add `#![feature(target_feature_11)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr b/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr index b2c1406d0939..02bc51ccd3f5 100644 --- a/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr +++ b/tests/ui/rfcs/rfc-2397-do-not-recommend/unstable-feature.stderr @@ -6,6 +6,7 @@ LL | #[do_not_recommend] | = note: see issue #51992 for more information = help: add `#![feature(do_not_recommend)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/feature-gate.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/feature-gate.stderr index 6f74736755e6..2b1a49be3daa 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/feature-gate.stderr +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/feature-gate.stderr @@ -37,6 +37,7 @@ LL | if true && let 0 = 1 {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:17:8 @@ -46,6 +47,7 @@ LL | if let 0 = 1 && true {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:20:8 @@ -55,6 +57,7 @@ LL | if let Range { start: _, end: _ } = (true..true) && false {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:23:8 @@ -64,6 +67,7 @@ LL | if let 1 = 1 && let true = { true } && false { | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:23:21 @@ -73,6 +77,7 @@ LL | if let 1 = 1 && let true = { true } && false { | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:32:19 @@ -82,6 +87,7 @@ LL | while true && let 0 = 1 {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:35:11 @@ -91,6 +97,7 @@ LL | while let 0 = 1 && true {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/feature-gate.rs:38:11 @@ -100,6 +107,7 @@ LL | while let Range { start: _, end: _ } = (true..true) && false {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 11 previous errors diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr index b25f299a2190..637ae4915ed1 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/issue-93150.stderr @@ -6,6 +6,7 @@ LL | _ if let true = true && true => {} | = note: see issue #51114 for more information = help: add `#![feature(if_let_guard)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: you can write `if matches!(, )` instead of `if let = ` error[E0658]: `let` expressions in this position are unstable @@ -16,6 +17,7 @@ LL | _ if let true = true && true => {} | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/feature-gate.stderr b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/feature-gate.stderr index 48e46d3d1d1a..b67327f3af78 100644 --- a/tests/ui/rfcs/rfc-2528-type-changing-struct-update/feature-gate.stderr +++ b/tests/ui/rfcs/rfc-2528-type-changing-struct-update/feature-gate.stderr @@ -6,6 +6,7 @@ LL | ..m1 | = note: see issue #86555 for more information = help: add `#![feature(type_changing_struct_update)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0308]: mismatched types --> $DIR/feature-gate.rs:22:11 diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr new file mode 100644 index 000000000000..62c8a442ab9b --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.qualified.stderr @@ -0,0 +1,14 @@ +error[E0277]: the trait bound `T: Trait` is not satisfied + --> $DIR/assoc-type-const-bound-usage-0.rs:21:6 + | +LL | ::Assoc::func() + | ^ the trait `Trait` is not implemented for `T` + | +help: consider further restricting this bound + | +LL | const fn qualified() -> i32 { + | +++++++ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs new file mode 100644 index 000000000000..d8573d3af014 --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-0.rs @@ -0,0 +1,24 @@ +// FIXME(effects): Collapse the revisions into one once we support `::Proj`. +// revisions: unqualified qualified +//[unqualified] check-pass +//[qualified] known-bug: unknown + +#![feature(const_trait_impl, effects)] + +#[const_trait] +trait Trait { + type Assoc: ~const Trait; + fn func() -> i32; +} + +#[cfg(unqualified)] +const fn unqualified() -> i32 { + T::Assoc::func() +} + +#[cfg(qualified)] +const fn qualified() -> i32 { + ::Assoc::func() +} + +fn main() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.stderr new file mode 100644 index 000000000000..10e467da9521 --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.qualified.stderr @@ -0,0 +1,14 @@ +error[E0277]: the trait bound `T: Trait` is not satisfied + --> $DIR/assoc-type-const-bound-usage-1.rs:23:43 + | +LL | fn qualified() -> Type<{ ::Assoc::func() }> { + | ^ the trait `Trait` is not implemented for `T` + | +help: consider further restricting this bound + | +LL | fn qualified() -> Type<{ ::Assoc::func() }> { + | +++++++ + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs new file mode 100644 index 000000000000..2190fa337b49 --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage-1.rs @@ -0,0 +1,27 @@ +// FIXME(effects): Collapse the revisions into one once we support `::Proj`. +// revisions: unqualified qualified +//[unqualified] check-pass +//[qualified] known-bug: unknown + +#![feature(const_trait_impl, effects, generic_const_exprs)] +#![allow(incomplete_features)] + +#[const_trait] +trait Trait { + type Assoc: ~const Trait; + fn func() -> i32; +} + +struct Type; + +#[cfg(unqualified)] +fn unqualified() -> Type<{ T::Assoc::func() }> { + Type +} + +#[cfg(qualified)] +fn qualified() -> Type<{ ::Assoc::func() }> { + Type +} + +fn main() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs deleted file mode 100644 index 16b717bc1813..000000000000 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.rs +++ /dev/null @@ -1,15 +0,0 @@ -// known-bug: #110395 -// FIXME check-pass -#![feature(const_trait_impl, effects)] - -#[const_trait] -trait Foo { - type Assoc: ~const Foo; - fn foo() {} -} - -const fn foo() { - ::Assoc::foo(); -} - -fn main() {} diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr deleted file mode 100644 index 268e337ee93e..000000000000 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: `~const` is not allowed here - --> $DIR/assoc-type-const-bound-usage.rs:7:17 - | -LL | type Assoc: ~const Foo; - | ^^^^^^ - | - = note: this item cannot have `~const` trait bounds - -error[E0277]: the trait bound `T: Foo` is not satisfied - --> $DIR/assoc-type-const-bound-usage.rs:12:6 - | -LL | ::Assoc::foo(); - | ^ the trait `Foo` is not implemented for `T` - | -help: consider further restricting this bound - | -LL | const fn foo() { - | +++++ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs index 96790a87311d..886fa6577d76 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.rs @@ -1,29 +1,43 @@ -// known-bug: #110395 +// FIXME(effects): Replace `Add` with `std::ops::Add` once the latter a `#[const_trait]` again. +#![feature(const_trait_impl, effects)] -#![feature(const_trait_impl)] +#[const_trait] +trait Add { + type Output; + + fn add(self, other: Rhs) -> Self::Output; +} + +impl const Add for i32 { + type Output = Self; + + fn add(self, other: Self) -> Self::Output { + self + other + } +} struct NonConstAdd(i32); -impl std::ops::Add for NonConstAdd { +impl Add for NonConstAdd { type Output = Self; fn add(self, rhs: Self) -> Self { - NonConstAdd(self.0 + rhs.0) + NonConstAdd(self.0.add(rhs.0)) } } #[const_trait] trait Foo { - type Bar: ~const std::ops::Add; + type Bar: ~const Add; } impl const Foo for NonConstAdd { - type Bar = NonConstAdd; + type Bar = NonConstAdd; //~ ERROR the trait bound `NonConstAdd: ~const Add` is not satisfied } #[const_trait] trait Baz { - type Qux: std::ops::Add; + type Qux: Add; } impl const Baz for NonConstAdd { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr index 58ad1849d4fa..a9cae2a70be9 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type.stderr @@ -1,16 +1,16 @@ -error: `~const` is not allowed here - --> $DIR/assoc-type.rs:17:15 +error[E0277]: the trait bound `NonConstAdd: ~const Add` is not satisfied + --> $DIR/assoc-type.rs:35:16 | -LL | type Bar: ~const std::ops::Add; - | ^^^^^^ +LL | type Bar = NonConstAdd; + | ^^^^^^^^^^^ the trait `~const Add` is not implemented for `NonConstAdd` | - = note: this item cannot have `~const` trait bounds - -error: `~const` can only be applied to `#[const_trait]` traits - --> $DIR/assoc-type.rs:17:22 + = help: the trait `Add` is implemented for `NonConstAdd` +note: required by a bound in `Foo::Bar` + --> $DIR/assoc-type.rs:31:15 | -LL | type Bar: ~const std::ops::Add; - | ^^^^^^^^^^^^^ +LL | type Bar: ~const Add; + | ^^^^^^^^^^ required by this bound in `Foo::Bar` -error: aborting due to 2 previous errors +error: aborting due to 1 previous error +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr index 2dd96f548fed..9ec2ac933817 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const_derives/derive-const-gate.stderr @@ -5,6 +5,7 @@ LL | #[derive_const(Default)] | ^^^^^^^^^^^^ | = help: add `#![feature(derive_const)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr index 7e268f50dca3..0f6240cc03b8 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-112822-expected-type-for-param.stderr @@ -6,6 +6,7 @@ LL | const move || { | = note: see issue #106003 for more information = help: add `#![feature(const_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: `~const` can only be applied to `#[const_trait]` traits --> $DIR/ice-112822-expected-type-for-param.rs:3:32 diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.stock.stderr index c9826aeb1665..78157d570563 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.stock.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/feature-gate.stock.stderr @@ -6,6 +6,7 @@ LL | impl const T for S {} | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const trait impls are experimental --> $DIR/feature-gate.rs:13:15 @@ -15,6 +16,7 @@ LL | const fn f() {} | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const trait impls are experimental --> $DIR/feature-gate.rs:14:9 @@ -24,6 +26,7 @@ LL | fn g() {} | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const trait impls are experimental --> $DIR/feature-gate.rs:18:17 @@ -33,6 +36,7 @@ LL | discard! { impl ~const T } | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const trait impls are experimental --> $DIR/feature-gate.rs:19:17 @@ -42,6 +46,7 @@ LL | discard! { impl const T } | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `const_trait` is a temporary placeholder for marking a trait that is suitable for `const` `impls` and all default bodies as `const`, which may be removed or renamed in the future. --> $DIR/feature-gate.rs:8:1 @@ -51,6 +56,7 @@ LL | #[const_trait] | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 6 previous errors diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/gate.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/gate.stderr index 11cc2cd569a4..19fd54ff3698 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/gate.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/gate.stderr @@ -6,6 +6,7 @@ LL | (const || {})(); | = note: see issue #106003 for more information = help: add `#![feature(const_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: const closures are experimental --> $DIR/gate.rs:12:5 @@ -15,6 +16,7 @@ LL | e!((const || {})); | = note: see issue #106003 for more information = help: add `#![feature(const_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr index 90f30ea635f1..5b14ef46d25d 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/hir-const-check.stderr @@ -6,6 +6,7 @@ LL | Some(())?; | = note: see issue #74935 for more information = help: add `#![feature(const_try)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.stderr index 254d31930b36..fd9184b9dff3 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/mbe-const-trait-bound-theoretical-regression.stderr @@ -24,6 +24,7 @@ LL | demo! { dyn const } | = note: see issue #67792 for more information = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr index a54ba7a94b4a..d57f5702a638 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-invalid-places.stderr @@ -72,7 +72,11 @@ error: `~const` is not allowed here LL | type Type: ~const Trait; | ^^^^^^ | - = note: this item cannot have `~const` trait bounds +note: associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds + --> $DIR/tilde-const-invalid-places.rs:25:5 + | +LL | type Type: ~const Trait; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:25:33 @@ -80,7 +84,11 @@ error: `~const` is not allowed here LL | type Type: ~const Trait; | ^^^^^^ | - = note: this item cannot have `~const` trait bounds +note: associated types in non-`#[const_trait]` traits cannot have `~const` trait bounds + --> $DIR/tilde-const-invalid-places.rs:25:5 + | +LL | type Type: ~const Trait; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:28:30 @@ -108,7 +116,11 @@ error: `~const` is not allowed here LL | type Type = (); | ^^^^^^ | - = note: this item cannot have `~const` trait bounds +note: associated types in non-const impls cannot have `~const` trait bounds + --> $DIR/tilde-const-invalid-places.rs:34:5 + | +LL | type Type = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:36:30 @@ -136,7 +148,11 @@ error: `~const` is not allowed here LL | type Type = (); | ^^^^^^ | - = note: this item cannot have `~const` trait bounds +note: inherent associated types cannot have `~const` trait bounds + --> $DIR/tilde-const-invalid-places.rs:44:5 + | +LL | type Type = (); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `~const` is not allowed here --> $DIR/tilde-const-invalid-places.rs:46:30 @@ -214,6 +230,7 @@ LL | const CONSTANT: () = (); | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:29:19 @@ -223,6 +240,7 @@ LL | const CONSTANT: (); | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:37:19 @@ -232,6 +250,7 @@ LL | const CONSTANT: () = (); | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: generic const items are experimental --> $DIR/tilde-const-invalid-places.rs:47:19 @@ -241,6 +260,7 @@ LL | const CONSTANT: () = (); | = note: see issue #113521 for more information = help: add `#![feature(generic_const_items)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: inherent associated types are unstable --> $DIR/tilde-const-invalid-places.rs:44:5 @@ -250,6 +270,7 @@ LL | type Type = (); | = note: see issue #8995 for more information = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0392]: parameter `T` is never used --> $DIR/tilde-const-invalid-places.rs:11:19 diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs new file mode 100644 index 000000000000..4c383fe15067 --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/tilde-const-trait-assoc-tys.rs @@ -0,0 +1,18 @@ +// check-pass +#![feature(const_trait_impl, effects)] + +#[const_trait] +trait Trait { + // FIXME(effects): `~const` bounds in trait associated types (excluding associated type bounds) + // don't look super useful. Should we forbid them again? + type Assoc; +} + +impl const Trait for () { + type Assoc = T; +} + +#[const_trait] +trait Bound {} + +fn main() {} diff --git a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr index 0f5665f1fb9d..e74b1322b259 100644 --- a/tests/ui/rustdoc/feature-gate-doc_primitive.stderr +++ b/tests/ui/rustdoc/feature-gate-doc_primitive.stderr @@ -5,6 +5,7 @@ LL | #[rustc_doc_primitive = "usize"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/self/arbitrary-self-from-method-substs.default.stderr b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr index a415aa3d7b49..4cc69666b887 100644 --- a/tests/ui/self/arbitrary-self-from-method-substs.default.stderr +++ b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr @@ -6,6 +6,7 @@ LL | fn get>(self: R) -> u32 { | = note: see issue #44874 for more information = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = help: consider changing to `self`, `&self`, `&mut self`, `self: Box`, `self: Rc`, `self: Arc`, or `self: Pin

` (where P is one of the previous types except `Self`) error: aborting due to 1 previous error diff --git a/tests/ui/span/gated-features-attr-spans.stderr b/tests/ui/span/gated-features-attr-spans.stderr index 5376d7799aaa..f05c71774bd9 100644 --- a/tests/ui/span/gated-features-attr-spans.stderr +++ b/tests/ui/span/gated-features-attr-spans.stderr @@ -6,6 +6,7 @@ LL | #[repr(simd)] | = note: see issue #27731 for more information = help: add `#![feature(repr_simd)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr b/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr index 18edcad0a47b..e28d9c9fa836 100644 --- a/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr +++ b/tests/ui/specialization/defaultimpl/specialization-feature-gate-default.stderr @@ -8,6 +8,7 @@ LL | | } | = note: see issue #31844 for more information = help: add `#![feature(specialization)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/specialization/specialization-feature-gate-default.stderr b/tests/ui/specialization/specialization-feature-gate-default.stderr index 35e5e3bc5125..3e651b6ee4f3 100644 --- a/tests/ui/specialization/specialization-feature-gate-default.stderr +++ b/tests/ui/specialization/specialization-feature-gate-default.stderr @@ -6,6 +6,7 @@ LL | default fn foo(&self) {} | = note: see issue #31844 for more information = help: add `#![feature(specialization)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr b/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr index f85b3c6eb665..4abf8243d2fc 100644 --- a/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr +++ b/tests/ui/stability-attribute/accidental-stable-in-unstable.stderr @@ -5,6 +5,7 @@ LL | use core::unicode::UNICODE_VERSION; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unicode_internals)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/stability-attribute/allow-unstable-reexport.stderr b/tests/ui/stability-attribute/allow-unstable-reexport.stderr index a11da9dc8a7b..af75b6afb049 100644 --- a/tests/ui/stability-attribute/allow-unstable-reexport.stderr +++ b/tests/ui/stability-attribute/allow-unstable-reexport.stderr @@ -5,6 +5,7 @@ LL | pub use lint_stability::unstable as unstable2; | ^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/allow-unstable-reexport.rs:28:5 @@ -13,6 +14,7 @@ LL | unstable(); | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': text --> $DIR/allow-unstable-reexport.rs:29:5 @@ -21,6 +23,7 @@ LL | unstable_text(); | ^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/stability-attribute/allowed-through-unstable.stderr b/tests/ui/stability-attribute/allowed-through-unstable.stderr index f09289bfb898..5c8e6358b7c1 100644 --- a/tests/ui/stability-attribute/allowed-through-unstable.stderr +++ b/tests/ui/stability-attribute/allowed-through-unstable.stderr @@ -6,6 +6,7 @@ LL | use allowed_through_unstable_core::unstable_module::NewStableTraitNotAllowe | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/stability-attribute/default-body-stability-err.stderr b/tests/ui/stability-attribute/default-body-stability-err.stderr index 12ec9ea3adb4..9d8ad81f102f 100644 --- a/tests/ui/stability-attribute/default-body-stability-err.stderr +++ b/tests/ui/stability-attribute/default-body-stability-err.stderr @@ -7,6 +7,7 @@ LL | impl JustTrait for Type {} = note: default implementation of `CONSTANT` is unstable = note: use of unstable library feature 'constant_default_body' = help: add `#![feature(constant_default_body)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0046]: not all trait items implemented, missing: `fun` --> $DIR/default-body-stability-err.rs:10:1 @@ -17,6 +18,7 @@ LL | impl JustTrait for Type {} = note: default implementation of `fun` is unstable = note: use of unstable library feature 'fun_default_body' = help: add `#![feature(fun_default_body)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0046]: not all trait items implemented, missing: `fun2` --> $DIR/default-body-stability-err.rs:10:1 @@ -27,6 +29,7 @@ LL | impl JustTrait for Type {} = note: default implementation of `fun2` is unstable = note: use of unstable library feature 'fun_default_body': reason = help: add `#![feature(fun_default_body)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0046]: not all trait items implemented, missing: `eq` --> $DIR/default-body-stability-err.rs:15:1 @@ -42,6 +45,7 @@ LL | | } = note: default implementation of `eq` is unstable = note: use of unstable library feature 'eq_default_body' = help: add `#![feature(eq_default_body)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/stability-attribute/generics-default-stability-trait.stderr b/tests/ui/stability-attribute/generics-default-stability-trait.stderr index 03e61b78e060..699e7c83c70e 100644 --- a/tests/ui/stability-attribute/generics-default-stability-trait.stderr +++ b/tests/ui/stability-attribute/generics-default-stability-trait.stderr @@ -5,6 +5,7 @@ LL | impl Trait1 for S { | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability-trait.rs:20:13 @@ -13,6 +14,7 @@ LL | impl Trait1 for S { | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability-trait.rs:24:13 @@ -21,6 +23,7 @@ LL | impl Trait2 for S { | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/tests/ui/stability-attribute/generics-default-stability-where.stderr b/tests/ui/stability-attribute/generics-default-stability-where.stderr index 16b560e8a4be..8e4089970f56 100644 --- a/tests/ui/stability-attribute/generics-default-stability-where.stderr +++ b/tests/ui/stability-attribute/generics-default-stability-where.stderr @@ -5,6 +5,7 @@ LL | impl Trait3 for T where T: Trait2 { | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct`) --> $DIR/generics-default-stability-where.rs:7:6 diff --git a/tests/ui/stability-attribute/generics-default-stability.stderr b/tests/ui/stability-attribute/generics-default-stability.stderr index e094a10c8e7b..b1b91a850e90 100644 --- a/tests/ui/stability-attribute/generics-default-stability.stderr +++ b/tests/ui/stability-attribute/generics-default-stability.stderr @@ -223,6 +223,7 @@ LL | let _: Struct1 = Struct1 { field: 1 }; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:27:20 @@ -231,6 +232,7 @@ LL | let _: Struct1 = STRUCT1; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:28:20 @@ -239,6 +241,7 @@ LL | let _: Struct1 = Struct1 { field: 0 }; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:57:27 @@ -247,6 +250,7 @@ LL | let _: Struct3 = STRUCT3; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:59:27 @@ -255,6 +259,7 @@ LL | let _: Struct3 = Struct3 { field1: 0, field2: 0 }; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:60:27 @@ -263,6 +268,7 @@ LL | let _: Struct3 = Struct3 { field1: 0, field2: 0 }; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:84:20 @@ -271,6 +277,7 @@ LL | let _: Struct5 = Struct5 { field: 1 }; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:90:20 @@ -279,6 +286,7 @@ LL | let _: Struct5 = STRUCT5; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:92:20 @@ -287,6 +295,7 @@ LL | let _: Struct5 = Struct5 { field: 0 }; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:100:19 @@ -295,6 +304,7 @@ LL | let _: Alias1 = Alias1::Some(1); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:104:19 @@ -303,6 +313,7 @@ LL | let _: Alias1 = ALIAS1; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:105:19 @@ -311,6 +322,7 @@ LL | let _: Alias1 = Alias1::Some(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:133:26 @@ -319,6 +331,7 @@ LL | let _: Alias3 = ALIAS3; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:135:26 @@ -327,6 +340,7 @@ LL | let _: Alias3 = Alias3::Ok(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:136:26 @@ -335,6 +349,7 @@ LL | let _: Alias3 = Alias3::Ok(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:158:19 @@ -343,6 +358,7 @@ LL | let _: Alias5 = Alias5::Some(1); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:163:19 @@ -351,6 +367,7 @@ LL | let _: Alias5 = ALIAS5; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:165:19 @@ -359,6 +376,7 @@ LL | let _: Alias5 = Alias5::Some(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:172:18 @@ -367,6 +385,7 @@ LL | let _: Enum1 = Enum1::Some(1); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:176:18 @@ -375,6 +394,7 @@ LL | let _: Enum1 = ENUM1; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:177:18 @@ -383,6 +403,7 @@ LL | let _: Enum1 = Enum1::Some(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:205:25 @@ -391,6 +412,7 @@ LL | let _: Enum3 = ENUM3; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:207:25 @@ -399,6 +421,7 @@ LL | let _: Enum3 = Enum3::Ok(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:208:25 @@ -407,6 +430,7 @@ LL | let _: Enum3 = Enum3::Ok(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:230:18 @@ -415,6 +439,7 @@ LL | let _: Enum5 = Enum5::Some(1); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:235:18 @@ -423,6 +448,7 @@ LL | let _: Enum5 = ENUM5; | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_default' --> $DIR/generics-default-stability.rs:237:18 @@ -431,6 +457,7 @@ LL | let _: Enum5 = Enum5::Some(0); | ^^^^^ | = help: add `#![feature(unstable_default)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'box_alloc_param' --> $DIR/generics-default-stability.rs:244:24 @@ -439,6 +466,7 @@ LL | let _: Box1 = Box1::new(1); | ^^^^^^ | = help: add `#![feature(box_alloc_param)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: use of deprecated field `unstable_generic_param::Struct4::field`: test --> $DIR/generics-default-stability.rs:71:39 diff --git a/tests/ui/stability-attribute/issue-28075.stderr b/tests/ui/stability-attribute/issue-28075.stderr index e16eae88b01d..282686d82bbc 100644 --- a/tests/ui/stability-attribute/issue-28075.stderr +++ b/tests/ui/stability-attribute/issue-28075.stderr @@ -5,6 +5,7 @@ LL | use lint_stability::{unstable, deprecated}; | ^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/stability-attribute/issue-28388-3.stderr b/tests/ui/stability-attribute/issue-28388-3.stderr index 0fb62ece3136..56ca57591ce0 100644 --- a/tests/ui/stability-attribute/issue-28388-3.stderr +++ b/tests/ui/stability-attribute/issue-28388-3.stderr @@ -5,6 +5,7 @@ LL | use lint_stability::UnstableEnum::{}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr index c2331f6766c4..b35ee6c12913 100644 --- a/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr +++ b/tests/ui/stability-attribute/stability-attribute-implies-no-feature.stderr @@ -6,6 +6,7 @@ LL | use stability_attribute_implies::{foo, foobar}; | = note: see issue #1 for more information = help: add `#![feature(foobar)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'foobar' --> $DIR/stability-attribute-implies-no-feature.rs:12:5 @@ -15,6 +16,7 @@ LL | foobar(); | = note: see issue #1 for more information = help: add `#![feature(foobar)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/stability-attribute/stability-attribute-issue.stderr b/tests/ui/stability-attribute/stability-attribute-issue.stderr index df4aec7e5c80..336e0f1718ff 100644 --- a/tests/ui/stability-attribute/stability-attribute-issue.stderr +++ b/tests/ui/stability-attribute/stability-attribute-issue.stderr @@ -6,6 +6,7 @@ LL | unstable(); | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature': message --> $DIR/stability-attribute-issue.rs:10:5 @@ -15,6 +16,7 @@ LL | unstable_msg(); | = note: see issue #2 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/stability-attribute/stable-in-unstable.stderr b/tests/ui/stability-attribute/stable-in-unstable.stderr index b5e3e5f1202c..eb73f047acd1 100644 --- a/tests/ui/stability-attribute/stable-in-unstable.stderr +++ b/tests/ui/stability-attribute/stable-in-unstable.stderr @@ -6,6 +6,7 @@ LL | use stable_in_unstable_core::new_unstable_module; | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/stable-in-unstable.rs:17:9 @@ -15,6 +16,7 @@ LL | use stable_in_unstable_core::new_unstable_module::OldTrait; | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/stable-in-unstable.rs:29:9 @@ -24,6 +26,7 @@ LL | use stable_in_unstable_core::new_unstable_module::OldTrait; | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/stable-in-unstable.rs:39:10 @@ -33,6 +36,7 @@ LL | impl stable_in_unstable_core::new_unstable_module::OldTrait for LocalTy | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/stable-in-unstable.rs:49:56 @@ -42,6 +46,7 @@ LL | use stable_in_unstable_core::new_unstable_module::{OldTrait}; | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'unstable_test_feature' --> $DIR/stable-in-unstable.rs:53:9 @@ -51,6 +56,7 @@ LL | use stable_in_unstable_core::new_unstable_module::*; | = note: see issue #1 for more information = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 6 previous errors diff --git a/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr b/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr index 41e5787b8c2d..d7fcba4ced55 100644 --- a/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr +++ b/tests/ui/stability-attribute/suggest-vec-allocator-api.stderr @@ -8,6 +8,7 @@ LL | let _: Vec = vec![]; | = note: see issue #32838 for more information = help: add `#![feature(allocator_api)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'allocator_api' --> $DIR/suggest-vec-allocator-api.rs:6:9 @@ -17,6 +18,7 @@ LL | _> = vec![]; | = note: see issue #32838 for more information = help: add `#![feature(allocator_api)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider wrapping the inner types in tuple | LL ~ let _: Vec<( @@ -32,6 +34,7 @@ LL | let _boxed: Box = Box::new(10); | = note: see issue #32838 for more information = help: add `#![feature(allocator_api)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'allocator_api' --> $DIR/suggest-vec-allocator-api.rs:7:24 @@ -43,6 +46,7 @@ LL | let _ = Vec::::new(); | = note: see issue #32838 for more information = help: add `#![feature(allocator_api)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/stmt_expr_attrs_no_feature.stderr b/tests/ui/stmt_expr_attrs_no_feature.stderr index dc06521fe72a..c801268c652b 100644 --- a/tests/ui/stmt_expr_attrs_no_feature.stderr +++ b/tests/ui/stmt_expr_attrs_no_feature.stderr @@ -6,6 +6,7 @@ LL | #[rustfmt::skip] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:95:18 @@ -15,6 +16,7 @@ LL | fn y(a: [u8; #[rustc_dummy] 5]); | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:102:19 @@ -24,6 +26,7 @@ LL | const Y: u8 = #[rustc_dummy] 5; | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:108:19 @@ -33,6 +36,7 @@ LL | const Y: [u8; #[rustc_dummy] 5]; | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:114:18 @@ -42,6 +46,7 @@ LL | field2: [u8; #[rustc_dummy] 5] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:119:10 @@ -51,6 +56,7 @@ LL | [u8; #[rustc_dummy] 5] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:125:14 @@ -60,6 +66,7 @@ LL | [u8; #[rustc_dummy] 5] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:130:22 @@ -69,6 +76,7 @@ LL | field2: [u8; #[rustc_dummy] 5] | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: attributes on expressions are experimental --> $DIR/stmt_expr_attrs_no_feature.rs:138:14 @@ -78,6 +86,7 @@ LL | 6 => #[rustc_dummy] (), | = note: see issue #15701 for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 9 previous errors diff --git a/tests/ui/suggestions/fn-trait-notation.stderr b/tests/ui/suggestions/fn-trait-notation.stderr index ed79b3d512cd..b221af18bfc3 100644 --- a/tests/ui/suggestions/fn-trait-notation.stderr +++ b/tests/ui/suggestions/fn-trait-notation.stderr @@ -6,6 +6,7 @@ LL | F: Fn, | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change --> $DIR/fn-trait-notation.rs:6:8 @@ -15,6 +16,7 @@ LL | G: Fn<(i32, i32, ), Output = (i32, i32)>, | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change --> $DIR/fn-trait-notation.rs:7:8 @@ -24,6 +26,7 @@ LL | H: Fn<(i32,), Output = i32>, | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0059]: type parameter to bare `Fn` trait must be a tuple --> $DIR/fn-trait-notation.rs:4:8 diff --git a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr index fee4c7268fae..a7d636b63bd2 100644 --- a/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr +++ b/tests/ui/suggestions/impl-trait-missing-lifetime-gated.stderr @@ -131,6 +131,7 @@ LL | fn f(_: impl Iterator) {} | ^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn f<'a>(_: impl Iterator) {} @@ -143,6 +144,7 @@ LL | fn g(mut x: impl Iterator) -> Option<&()> { x.next() } | ^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn g<'a>(mut x: impl Iterator) -> Option<&()> { x.next() } @@ -155,6 +157,7 @@ LL | fn f(_: impl Iterator) {} | ^^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn f<'a>(_: impl Iterator) {} @@ -167,6 +170,7 @@ LL | fn g(mut x: impl Iterator) -> Option<&'_ ()> { x.next() | ^^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn g<'a>(mut x: impl Iterator) -> Option<&'_ ()> { x.next() } @@ -179,6 +183,7 @@ LL | fn f(_: impl Foo) {} | ^^^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn f<'a>(_: impl Foo<'a>) {} @@ -191,6 +196,7 @@ LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() } | ^^^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn g<'a>(mut x: impl Foo<'a>) -> Option<&()> { x.next() } @@ -203,6 +209,7 @@ LL | fn f(_: impl Foo<()>) {} | ^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn f<'a>(_: impl Foo<'a, ()>) {} @@ -215,6 +222,7 @@ LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() } | ^ expected named lifetime parameter | = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date help: consider introducing a named lifetime parameter | LL | fn g<'a>(mut x: impl Foo<'a, ()>) -> Option<&()> { x.next() } diff --git a/tests/ui/suggestions/missing-assoc-fn.stderr b/tests/ui/suggestions/missing-assoc-fn.stderr index 84cb6e98553e..61a5492d583d 100644 --- a/tests/ui/suggestions/missing-assoc-fn.stderr +++ b/tests/ui/suggestions/missing-assoc-fn.stderr @@ -6,6 +6,7 @@ LL | fn bat>(_: T) -> Self; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0046]: not all trait items implemented, missing: `foo`, `bar`, `baz`, `bat` --> $DIR/missing-assoc-fn.rs:14:1 diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr index 4e3180e84d2d..9c22873e79c0 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr +++ b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr @@ -17,6 +17,7 @@ LL | let _: Vec = A::B; | = note: see issue #52662 for more information = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0107]: struct takes at least 1 generic argument but 0 generic arguments were supplied --> $DIR/type-ascription-instead-of-path-in-type.rs:6:12 diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr index b3bd12600f8d..d281f0a6ab92 100644 --- a/tests/ui/target-feature/gate.stderr +++ b/tests/ui/target-feature/gate.stderr @@ -6,6 +6,7 @@ LL | #[target_feature(enable = "avx512bw")] | = note: see issue #44839 for more information = help: add `#![feature(avx512_target_feature)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/target-feature/invalid-attribute.rs b/tests/ui/target-feature/invalid-attribute.rs index f6357bd9eb08..7c5941f5bae8 100644 --- a/tests/ui/target-feature/invalid-attribute.rs +++ b/tests/ui/target-feature/invalid-attribute.rs @@ -31,6 +31,7 @@ unsafe fn foo() {} #[target_feature(enable = "sse2")] //~^ ERROR `#[target_feature(..)]` can only be applied to `unsafe` functions //~| NOTE see issue #69098 +//~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date fn bar() {} //~^ NOTE not an `unsafe` function @@ -102,6 +103,7 @@ impl Quux for Foo { #[target_feature(enable = "sse2")] //~^ ERROR `#[target_feature(..)]` can only be applied to `unsafe` functions //~| NOTE see issue #69098 + //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date fn foo() {} //~^ NOTE not an `unsafe` function } diff --git a/tests/ui/target-feature/invalid-attribute.stderr b/tests/ui/target-feature/invalid-attribute.stderr index 8f981d27c53f..278b9ad5003a 100644 --- a/tests/ui/target-feature/invalid-attribute.stderr +++ b/tests/ui/target-feature/invalid-attribute.stderr @@ -32,7 +32,7 @@ LL | extern "Rust" {} | ---------------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:37:1 + --> $DIR/invalid-attribute.rs:38:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -41,7 +41,7 @@ LL | mod another {} | -------------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:42:1 + --> $DIR/invalid-attribute.rs:43:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -50,7 +50,7 @@ LL | const FOO: usize = 7; | --------------------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:47:1 + --> $DIR/invalid-attribute.rs:48:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -59,7 +59,7 @@ LL | struct Foo; | ----------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:52:1 + --> $DIR/invalid-attribute.rs:53:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -68,7 +68,7 @@ LL | enum Bar {} | ----------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:57:1 + --> $DIR/invalid-attribute.rs:58:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ LL | | } | |_- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:65:1 + --> $DIR/invalid-attribute.rs:66:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -90,7 +90,7 @@ LL | type Uwu = (); | -------------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:70:1 + --> $DIR/invalid-attribute.rs:71:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -99,7 +99,7 @@ LL | trait Baz {} | ------------ not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:80:1 + --> $DIR/invalid-attribute.rs:81:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -108,7 +108,7 @@ LL | static A: () = (); | ------------------ not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:85:1 + --> $DIR/invalid-attribute.rs:86:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -117,7 +117,7 @@ LL | impl Quux for u8 {} | ------------------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:92:1 + --> $DIR/invalid-attribute.rs:93:1 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -126,7 +126,7 @@ LL | impl Foo {} | ----------- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:110:5 + --> $DIR/invalid-attribute.rs:112:5 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -138,7 +138,7 @@ LL | | } | |_____- not a function definition error: attribute should be applied to a function definition - --> $DIR/invalid-attribute.rs:118:5 + --> $DIR/invalid-attribute.rs:120:5 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -175,15 +175,16 @@ LL | fn bar() {} | = note: see issue #69098 for more information = help: add `#![feature(target_feature_11)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: cannot use `#[inline(always)]` with `#[target_feature]` - --> $DIR/invalid-attribute.rs:75:1 + --> $DIR/invalid-attribute.rs:76:1 | LL | #[inline(always)] | ^^^^^^^^^^^^^^^^^ error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions - --> $DIR/invalid-attribute.rs:102:5 + --> $DIR/invalid-attribute.rs:103:5 | LL | #[target_feature(enable = "sse2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -193,9 +194,10 @@ LL | fn foo() {} | = note: see issue #69098 for more information = help: add `#![feature(target_feature_11)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0046]: not all trait items implemented, missing: `foo` - --> $DIR/invalid-attribute.rs:87:1 + --> $DIR/invalid-attribute.rs:88:1 | LL | impl Quux for u8 {} | ^^^^^^^^^^^^^^^^ missing `foo` in implementation diff --git a/tests/ui/thread-local/thread-local-static.stderr b/tests/ui/thread-local/thread-local-static.stderr index b03f4580c2cf..59bd17b39d85 100644 --- a/tests/ui/thread-local/thread-local-static.stderr +++ b/tests/ui/thread-local/thread-local-static.stderr @@ -29,6 +29,7 @@ LL | const fn g(x: &mut [u32; 8]) { | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0625]: thread-local statics cannot be accessed at compile-time --> $DIR/thread-local-static.rs:10:28 @@ -52,6 +53,7 @@ LL | std::mem::swap(x, &mut STATIC_VAR_2) | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 5 previous errors; 1 warning emitted diff --git a/tests/ui/tool-attributes/diagnostic_item.stderr b/tests/ui/tool-attributes/diagnostic_item.stderr index a181aee6b581..c6ae5a38594f 100644 --- a/tests/ui/tool-attributes/diagnostic_item.stderr +++ b/tests/ui/tool-attributes/diagnostic_item.stderr @@ -5,6 +5,7 @@ LL | #[rustc_diagnostic_item = "foomp"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/track-diagnostics/track6.stderr b/tests/ui/track-diagnostics/track6.stderr index 8ca56d6db216..9ed8a19629df 100644 --- a/tests/ui/track-diagnostics/track6.stderr +++ b/tests/ui/track-diagnostics/track6.stderr @@ -7,6 +7,7 @@ LL | default fn bar() {} | = note: see issue #31844 for more information = help: add `#![feature(specialization)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/traits/alias/generic-default-in-dyn.stderr b/tests/ui/traits/alias/generic-default-in-dyn.stderr index 0d3f794aa0f7..50031e184c10 100644 --- a/tests/ui/traits/alias/generic-default-in-dyn.stderr +++ b/tests/ui/traits/alias/generic-default-in-dyn.stderr @@ -6,6 +6,7 @@ LL | trait SendEqAlias = PartialEq; | = note: see issue #41517 for more information = help: add `#![feature(trait_alias)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0393]: the type parameter `Rhs` must be explicitly specified --> $DIR/generic-default-in-dyn.rs:4:19 diff --git a/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr b/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr index cb7eb1567c81..162c3d36cb1c 100644 --- a/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr +++ b/tests/ui/traits/default-method/rustc_must_implement_one_of_gated.stderr @@ -5,6 +5,7 @@ LL | #[rustc_must_implement_one_of(eq, neq)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/traits/issue-78372.stderr b/tests/ui/traits/issue-78372.stderr index ec692ff911df..44a62988daf3 100644 --- a/tests/ui/traits/issue-78372.stderr +++ b/tests/ui/traits/issue-78372.stderr @@ -44,6 +44,7 @@ LL | use std::ops::DispatchFromDyn; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(dispatch_from_dyn)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'dispatch_from_dyn' --> $DIR/issue-78372.rs:3:9 @@ -52,6 +53,7 @@ LL | impl DispatchFromDyn> for T {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add `#![feature(dispatch_from_dyn)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0378]: the trait `DispatchFromDyn` may only be implemented for a coercion between structures --> $DIR/issue-78372.rs:3:1 diff --git a/tests/ui/traits/method-argument-mismatch-variance-ice-119867.rs b/tests/ui/traits/method-argument-mismatch-variance-ice-119867.rs new file mode 100644 index 000000000000..4b7862abc91a --- /dev/null +++ b/tests/ui/traits/method-argument-mismatch-variance-ice-119867.rs @@ -0,0 +1,13 @@ +trait Deserialize { + fn deserialize(&self); +} + +struct ArchivedVec(T); + +impl Deserialize for ArchivedVec { + fn deserialize(s: _) {} + //~^ ERROR: `_` is not allowed within types on item signatures + //~| ERROR: has a `&self` declaration in the trait, but not in the impl +} + +fn main() {} diff --git a/tests/ui/traits/method-argument-mismatch-variance-ice-119867.stderr b/tests/ui/traits/method-argument-mismatch-variance-ice-119867.stderr new file mode 100644 index 000000000000..e63cc522dd13 --- /dev/null +++ b/tests/ui/traits/method-argument-mismatch-variance-ice-119867.stderr @@ -0,0 +1,24 @@ +error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/method-argument-mismatch-variance-ice-119867.rs:8:23 + | +LL | fn deserialize(s: _) {} + | ^ not allowed in type signatures + | +help: try replacing `_` with the type in the corresponding trait method signature + | +LL | fn deserialize(s: &ArchivedVec) {} + | ~~~~~~~~~~~~~~~ + +error[E0186]: method `deserialize` has a `&self` declaration in the trait, but not in the impl + --> $DIR/method-argument-mismatch-variance-ice-119867.rs:8:5 + | +LL | fn deserialize(&self); + | ---------------------- `&self` used in trait +... +LL | fn deserialize(s: _) {} + | ^^^^^^^^^^^^^^^^^^^^ expected `&self` in impl + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0121, E0186. +For more information about an error, try `rustc --explain E0121`. diff --git a/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr b/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr index a232e6d8619b..f3dee114116c 100644 --- a/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr +++ b/tests/ui/traits/negative-impls/feature-gate-negative_impls.stderr @@ -6,6 +6,7 @@ LL | impl !MyTrait for u32 {} | = note: see issue #68318 for more information = help: add `#![feature(negative_impls)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr index 368f5cd0c3b1..db7d2dd3e3a3 100644 --- a/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr +++ b/tests/ui/traits/next-solver/dont-ice-on-assoc-projection.stderr @@ -6,6 +6,7 @@ LL | impl Foo for T where T: Bar {} | = note: see issue #92827 for more information = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0119]: conflicting implementations of trait `Foo` for type `()` --> $DIR/dont-ice-on-assoc-projection.rs:15:1 diff --git a/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr b/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr index ba8093f86146..9f2219071726 100644 --- a/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr +++ b/tests/ui/transmutability/malformed-program-gracefulness/feature-missing.stderr @@ -6,6 +6,7 @@ LL | use std::mem::BikeshedIntrinsicFrom; | = note: see issue #99571 for more information = help: add `#![feature(transmutability)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: use of unstable library feature 'transmutability' --> $DIR/feature-missing.rs:8:5 @@ -15,6 +16,7 @@ LL | use std::mem::Assume; | = note: see issue #99571 for more information = help: add `#![feature(transmutability)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/treat-err-as-bug/span_delayed_bug.rs b/tests/ui/treat-err-as-bug/span_delayed_bug.rs index dda35b9b92a6..8b9526bf3f96 100644 --- a/tests/ui/treat-err-as-bug/span_delayed_bug.rs +++ b/tests/ui/treat-err-as-bug/span_delayed_bug.rs @@ -1,4 +1,4 @@ -// compile-flags: -Ztreat-err-as-bug +// compile-flags: -Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs // failure-status: 101 // error-pattern: aborting due to `-Z treat-err-as-bug=1` // error-pattern: [trigger_span_delayed_bug] triggering a span delayed bug for testing incremental diff --git a/tests/ui/type-alias-impl-trait/issue-60371.stderr b/tests/ui/type-alias-impl-trait/issue-60371.stderr index ffc664736355..1c83b0655f5e 100644 --- a/tests/ui/type-alias-impl-trait/issue-60371.stderr +++ b/tests/ui/type-alias-impl-trait/issue-60371.stderr @@ -6,6 +6,7 @@ LL | type Item = impl Bug; | = note: see issue #63063 for more information = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0277]: the trait bound `(): Bug` is not satisfied --> $DIR/issue-60371.rs:10:40 diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr index d4e2f9535338..d92bafce142c 100644 --- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr +++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr @@ -1,4 +1,6 @@ -error: internal compiler error: no errors encountered even though `span_delayed_bug` issued +note: no errors encountered even though `span_delayed_bug` issued + +note: those delayed bugs will now be shown as internal compiler errors error: internal compiler error: {OpaqueTypeKey { def_id: DefId(get_rpit::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: no-location (#0), ty: Alias(Opaque, AliasTy { args: [], def_id: DefId(Opaque::{opaque#0}) }) } }} | @@ -6,24 +8,18 @@ error: internal compiler error: {OpaqueTypeKey { def_id: DefId(get_rpit::{opaque error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ProvePredicate { predicate: Binder { value: ProjectionPredicate(AliasTy { args: [FnDef(DefId(get_rpit), []), ()], def_id: DefId(ops::function::FnOnce::Output) }, Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(Opaque::{opaque#0}) }))), bound_vars: [] } } } - --> $DIR/rpit_tait_equality_in_canonical_query.rs:28:5 + --> $DIR/rpit_tait_equality_in_canonical_query.rs:31:5 | LL | query(get_rpit); | ^^^^^^^^^^^^^^^ | - --> $DIR/rpit_tait_equality_in_canonical_query.rs:28:5 + --> $DIR/rpit_tait_equality_in_canonical_query.rs:31:5 | LL | query(get_rpit); | ^^^^^^^^^^^^^^^ - - - - - - query stack during panic: end of query stack -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs index 222841f34671..1b02fce2ad9b 100644 --- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs +++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs @@ -12,7 +12,10 @@ //[current] known-bug: #108498 //[current] failure-status: 101 //[current] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId(" -//[current] normalize-stderr-test: "(?m)note: .*$" -> "" +//[current] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> "" +//[current] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> "" +//[current] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> "" +//[current] normalize-stderr-test: "(?m)note: delayed at.*$" -> "" //[current] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> "" //[current] normalize-stderr-test: "(?m)^ *at .*\n" -> "" diff --git a/tests/ui/typeck/issue-105946.stderr b/tests/ui/typeck/issue-105946.stderr index 2220271e5812..33d4e0b141ab 100644 --- a/tests/ui/typeck/issue-105946.stderr +++ b/tests/ui/typeck/issue-105946.stderr @@ -17,6 +17,7 @@ LL | let [_y..] = [Box::new(1), Box::new(2)]; | = note: see issue #67264 for more information = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0308]: mismatched types --> $DIR/issue-105946.rs:2:12 diff --git a/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr b/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr index d06fa3007dfb..77aafe227d19 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-feature-gate.stderr @@ -6,6 +6,7 @@ LL | let x: Box; | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 1 previous error diff --git a/tests/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr b/tests/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr index 9da36906d554..e6f34d7e3b4b 100644 --- a/tests/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr +++ b/tests/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.stderr @@ -6,6 +6,7 @@ LL | fn bar1(x: &dyn Fn<(), Output=()>) { | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: the precise format of `Fn`-family traits' type parameters is subject to change --> $DIR/unboxed-closure-sugar-not-used-on-fn.rs:7:28 @@ -15,6 +16,7 @@ LL | fn bar2(x: &T) where T: Fn<()> { | = note: see issue #29625 for more information = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 2 previous errors diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.stderr b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.stderr index df83c1030843..1eb469c7cdb1 100644 --- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.stderr +++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.stderr @@ -2,6 +2,7 @@ error: unknown lint: `test_unstable_lint` | = note: the `test_unstable_lint` lint is unstable = help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: requested on the command line with `-D unknown-lints` error: aborting due to 1 previous error diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.stderr b/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.stderr index 0afe3d55c98a..e486f04f2735 100644 --- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.stderr +++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-inline.stderr @@ -6,6 +6,7 @@ LL | #![allow(test_unstable_lint)] | = note: the `test_unstable_lint` lint is unstable = help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date note: the lint level is defined here --> $DIR/deny-unstable-lint-inline.rs:3:9 | diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.stderr b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.stderr index c133b880ebde..9d838f7d1eae 100644 --- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.stderr +++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.stderr @@ -2,6 +2,7 @@ warning: unknown lint: `test_unstable_lint` | = note: the `test_unstable_lint` lint is unstable = help: add `-Zcrate-attr="feature(test_unstable_lint)"` to the command-line options to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: requested on the command line with `-W unknown-lints` warning: 1 warning emitted diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.stderr b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.stderr index 48c83b49e296..981d3b1a874c 100644 --- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.stderr +++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-inline.stderr @@ -6,6 +6,7 @@ LL | #![allow(test_unstable_lint)] | = note: the `test_unstable_lint` lint is unstable = help: add `#![feature(test_unstable_lint)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date note: the lint level is defined here --> $DIR/warn-unknown-unstable-lint-inline.rs:3:9 | diff --git a/tests/ui/unsafe/ranged_ints2_const.stderr b/tests/ui/unsafe/ranged_ints2_const.stderr index f267dc6e23e4..2d25084314ea 100644 --- a/tests/ui/unsafe/ranged_ints2_const.stderr +++ b/tests/ui/unsafe/ranged_ints2_const.stderr @@ -14,6 +14,7 @@ LL | let y = &mut x.0; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/ranged_ints2_const.rs:18:22 @@ -23,6 +24,7 @@ LL | let y = unsafe { &mut x.0 }; | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: mutable references are not allowed in constant functions --> $DIR/ranged_ints2_const.rs:24:22 @@ -32,6 +34,7 @@ LL | unsafe { let y = &mut x.0; } | = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 4 previous errors diff --git a/tests/ui/unsafe/ranged_ints3_const.stderr b/tests/ui/unsafe/ranged_ints3_const.stderr index 75b36cdf94bf..c388a66f6315 100644 --- a/tests/ui/unsafe/ranged_ints3_const.stderr +++ b/tests/ui/unsafe/ranged_ints3_const.stderr @@ -14,6 +14,7 @@ LL | let y = &x.0; | = note: see issue #80384 for more information = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability --> $DIR/ranged_ints3_const.rs:19:22 @@ -23,6 +24,7 @@ LL | let y = unsafe { &x.0 }; | = note: see issue #80384 for more information = help: add `#![feature(const_refs_to_cell)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error: aborting due to 3 previous errors diff --git a/triagebot.toml b/triagebot.toml index aac3a830a787..1e1db2d16632 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -22,6 +22,7 @@ allow-unauthenticated = [ "perf-*", "AsyncAwait-OnDeck", "needs-triage", + "has-merge-commits", ] [review-submitted] @@ -202,7 +203,7 @@ trigger_files = [ [autolabel."O-hermit"] trigger_files = [ - "library/std/src/sys/hermit", + "library/std/src/sys/pal/hermit", "library/std/src/os/hermit" ] @@ -213,7 +214,7 @@ trigger_files = [ [autolabel."O-itron"] trigger_files = [ - "library/std/src/sys/itron" + "library/std/src/sys/pal/itron" ] [autolabel."O-linux"] @@ -238,7 +239,7 @@ trigger_files = [ [autolabel."O-SGX"] trigger_files = [ - "library/std/src/sys/sgx", + "library/std/src/sys/pal/sgx", "library/std/src/os/fortanix_sgx" ] @@ -249,25 +250,25 @@ trigger_files = [ [autolabel."O-solid"] trigger_files = [ - "library/std/src/sys/solid", + "library/std/src/sys/pal/solid", "library/std/src/os/solid" ] [autolabel."O-unix"] trigger_files = [ - "library/std/src/sys/unix", + "library/std/src/sys/pal/unix", "library/std/src/os/unix" ] [autolabel."O-wasi"] trigger_files = [ - "library/std/src/sys/wasi", + "library/std/src/sys/pal/wasi", "library/std/src/os/wasi" ] [autolabel."O-wasm"] trigger_files = [ - "library/std/src/sys/wasm", + "library/std/src/sys/pal/wasm", "library/std/src/os/wasm" ] @@ -278,7 +279,7 @@ trigger_files = [ [autolabel."O-windows"] trigger_files = [ - "library/std/src/sys/windows", + "library/std/src/sys/pal/windows", "library/std/src/os/windows" ] @@ -788,7 +789,7 @@ project-stable-mir = [ "/library/panic_unwind" = ["libs"] "/library/proc_macro" = ["@petrochenkov"] "/library/std" = ["libs"] -"/library/std/src/sys/windows" = ["@ChrisDenton", "@thomcc"] +"/library/std/src/sys/pal/windows" = ["@ChrisDenton", "@thomcc"] "/library/stdarch" = ["libs"] "/library/test" = ["libs"] "/src/bootstrap" = ["bootstrap"]