From 9b7521314705fdfcc3f459a2f7d09090ad39b05c Mon Sep 17 00:00:00 2001 From: Richard Cobbe Date: Mon, 19 Jul 2021 17:51:49 -0700 Subject: [PATCH 01/22] Add docs for raw-dylib to unstable book --- .../src/language-features/raw-dylib.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/doc/unstable-book/src/language-features/raw-dylib.md diff --git a/src/doc/unstable-book/src/language-features/raw-dylib.md b/src/doc/unstable-book/src/language-features/raw-dylib.md new file mode 100644 index 000000000000..38a3cfd4d61c --- /dev/null +++ b/src/doc/unstable-book/src/language-features/raw-dylib.md @@ -0,0 +1,34 @@ +# `raw_dylib` + +The tracking issue for this feature is: [#58713] + +[#58713]: https://github.com/rust-lang/rust/issues/58713 + +------------------------ + +The `raw_dylib` feature allows you to link against the implementations of functions in an `extern` +block without, on Windows, linking against an import library. + +```rust +#![feature(raw_dylib)] + +#[link(name="library", kind="raw-dylib")] +extern { + fn extern_function(x: i32); +} + +fn main() { + unsafe { + extern_function(14); + } +} +``` + +## Limitations + +Currently, this feature is only supported on `-windows-msvc` targets. Non-Windows platforms don't have import +libraries, and an incompatibility between LLVM and the BFD linker means that it is not currently supported on +`-windows-gnu` targets. + +On the `i686-pc-windows-msvc` target, this feature supports only the `cdecl`, `stdcall`, `system`, and `fastcall` +calling conventions. From 3061b9bda8ac136396d5f938ed05e0d25a16e0f0 Mon Sep 17 00:00:00 2001 From: Richard Cobbe Date: Tue, 20 Jul 2021 12:45:20 -0700 Subject: [PATCH 02/22] Ignore example in automation --- src/doc/unstable-book/src/language-features/raw-dylib.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doc/unstable-book/src/language-features/raw-dylib.md b/src/doc/unstable-book/src/language-features/raw-dylib.md index 38a3cfd4d61c..01cbe2e786f0 100644 --- a/src/doc/unstable-book/src/language-features/raw-dylib.md +++ b/src/doc/unstable-book/src/language-features/raw-dylib.md @@ -9,7 +9,8 @@ The tracking issue for this feature is: [#58713] The `raw_dylib` feature allows you to link against the implementations of functions in an `extern` block without, on Windows, linking against an import library. -```rust + +```rust,ignore #![feature(raw_dylib)] #[link(name="library", kind="raw-dylib")] From 8e84e4d8e1af2e87e37156b28020e110714e1a29 Mon Sep 17 00:00:00 2001 From: Richard Cobbe Date: Tue, 20 Jul 2021 14:04:38 -0700 Subject: [PATCH 03/22] Fix ignore annotation --- src/doc/unstable-book/src/language-features/raw-dylib.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/doc/unstable-book/src/language-features/raw-dylib.md b/src/doc/unstable-book/src/language-features/raw-dylib.md index 01cbe2e786f0..23fc5b3052d8 100644 --- a/src/doc/unstable-book/src/language-features/raw-dylib.md +++ b/src/doc/unstable-book/src/language-features/raw-dylib.md @@ -9,8 +9,7 @@ The tracking issue for this feature is: [#58713] The `raw_dylib` feature allows you to link against the implementations of functions in an `extern` block without, on Windows, linking against an import library. - -```rust,ignore +```rust,ignore (partial-example) #![feature(raw_dylib)] #[link(name="library", kind="raw-dylib")] From e7fe2dfef253c462699783e7b2b297827f7440a7 Mon Sep 17 00:00:00 2001 From: inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com> Date: Tue, 20 Jul 2021 15:40:30 -0700 Subject: [PATCH 04/22] Use hashbrown's `extend_reserve()` in `HashMap` --- library/std/src/collections/hash/map.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index fac285c96f00..c07555c91011 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -2786,15 +2786,7 @@ fn extend_one(&mut self, (k, v): (K, V)) { #[inline] fn extend_reserve(&mut self, additional: usize) { - // self.base.extend_reserve(additional); - // FIXME: hashbrown should implement this method. - // But until then, use the same reservation logic: - - // Reserve the entire hint lower bound if the map is empty. - // Otherwise reserve half the hint (rounded up), so the map - // will only resize twice in the worst case. - let reserve = if self.is_empty() { additional } else { (additional + 1) / 2 }; - self.base.reserve(reserve); + self.base.extend_reserve(additional); } } From 7cab73928a3641e15a7c8d8e0d8b453ec7a5d18d Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sat, 24 Jul 2021 22:20:15 +0000 Subject: [PATCH 05/22] Don't treat git repos as non-existent when `ignore_git` is set The new submodule handling depends on `is_git()` to be accurate to decide whether it should handle submodules at all or not. Unfortunately, `is_git()` treated "this directory does not have a git repository" and "this repository should not be used for SHA/version/commit date info" the same. This changes it to distinguish the two. To clarify: ignore_get is set by default whenever channel == "dev", which it is by default whenever you're compiling locally. So basically everyone would hit this, not just people who had explicitly configured ignore_git. Here's an example of an error this fixes: ``` $ x build Updating only changed submodules Submodules updated in 0.01 seconds Finished dev [unoptimized + debuginfo] target(s) in 0.17s warning: x.py has made several changes recently you may want to look at help: consider looking at the changes in `src/bootstrap/CHANGELOG.md` note: to silence this warning, add `changelog-seen = 2` at the top of `config.toml` Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) Finished release [optimized] target(s) in 0.16s Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) Building LLVM for x86_64-unknown-linux-gnu detected home dir change, cleaning out entire build directory running: "cmake" "/home/joshua/rustc3/src/llvm-project/llvm" "-G" "Ninja" "-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=48" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu" "-DLLVM_ENABLE_ZLIB=ON" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_VERSION_SUFFIX=-rust-dev" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER=gcc" "-DCMAKE_CXX_COMPILER=g++" "-DCMAKE_ASM_COMPILER=gcc" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_INSTALL_PREFIX=/home/joshua/rustc3/build/x86_64-unknown-linux-gnu/llvm" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_BUILD_TYPE=Release" CMake Error: The source directory "/home/joshua/rustc3/src/llvm-project/llvm" does not exist. Specify --help for usage, or press the help button on the CMake GUI. thread 'main' panicked at ' command did not execute successfully, got: exit status: 1 build script failed, must exit now', /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace finished in 0.783 seconds Build completed unsuccessfully in 0:00:01 ``` --- src/bootstrap/channel.rs | 53 +++++++++++++++++++++++++++------------- src/bootstrap/lib.rs | 2 +- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index 6e65be93fecc..6478578c3c40 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -12,11 +12,16 @@ use crate::Build; -pub struct GitInfo { - inner: Option, +pub enum GitInfo { + /// This is not a git repository. + Absent, + /// This is a git repository. + /// If the info should be used (`ignore_git` is false), this will be + /// `Some`, otherwise it will be `None`. + Present(Option), } -struct Info { +pub struct Info { commit_date: String, sha: String, short_sha: String, @@ -25,14 +30,20 @@ struct Info { impl GitInfo { pub fn new(ignore_git: bool, dir: &Path) -> GitInfo { // See if this even begins to look like a git dir - if ignore_git || !dir.join(".git").exists() { - return GitInfo { inner: None }; + if !dir.join(".git").exists() { + return GitInfo::Absent; } // Make sure git commands work match Command::new("git").arg("rev-parse").current_dir(dir).output() { Ok(ref out) if out.status.success() => {} - _ => return GitInfo { inner: None }, + _ => return GitInfo::Absent, + } + + // If we're ignoring the git info, we don't actually need to collect it, just make sure this + // was a git repo in the first place. + if ignore_git { + return GitInfo::Present(None); } // Ok, let's scrape some info @@ -48,30 +59,35 @@ pub fn new(ignore_git: bool, dir: &Path) -> GitInfo { let short_ver_hash = output( Command::new("git").current_dir(dir).arg("rev-parse").arg("--short=9").arg("HEAD"), ); - GitInfo { - inner: Some(Info { - commit_date: ver_date.trim().to_string(), - sha: ver_hash.trim().to_string(), - short_sha: short_ver_hash.trim().to_string(), - }), + GitInfo::Present(Some(Info { + commit_date: ver_date.trim().to_string(), + sha: ver_hash.trim().to_string(), + short_sha: short_ver_hash.trim().to_string(), + })) + } + + fn info(&self) -> Option<&Info> { + match self { + GitInfo::Present(info) => info.as_ref(), + GitInfo::Absent => None, } } pub fn sha(&self) -> Option<&str> { - self.inner.as_ref().map(|s| &s.sha[..]) + self.info().map(|s| &s.sha[..]) } pub fn sha_short(&self) -> Option<&str> { - self.inner.as_ref().map(|s| &s.short_sha[..]) + self.info().map(|s| &s.short_sha[..]) } pub fn commit_date(&self) -> Option<&str> { - self.inner.as_ref().map(|s| &s.commit_date[..]) + self.info().map(|s| &s.commit_date[..]) } pub fn version(&self, build: &Build, num: &str) -> String { let mut version = build.release(num); - if let Some(ref inner) = self.inner { + if let Some(ref inner) = self.info() { version.push_str(" ("); version.push_str(&inner.short_sha); version.push(' '); @@ -82,6 +98,9 @@ pub fn version(&self, build: &Build, num: &str) -> String { } pub fn is_git(&self) -> bool { - self.inner.is_some() + match self { + GitInfo::Absent => false, + GitInfo::Present(_) => true, + } } } diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 245f3eada2af..3d56650f7752 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -1145,7 +1145,7 @@ fn release(&self, num: &str) -> String { match &self.config.channel[..] { "stable" => num.to_string(), "beta" => { - if self.rust_info.is_git() { + if self.rust_info.is_git() && !self.config.ignore_git { format!("{}-beta.{}", num, self.beta_prerelease_version()) } else { format!("{}-beta", num) From e8238a78df844692ae6918643e202756183c4fde Mon Sep 17 00:00:00 2001 From: ibraheemdev Date: Sun, 25 Jul 2021 10:23:48 -0400 Subject: [PATCH 06/22] suggest removing unnecessary \&mut as help message --- .../diagnostics/mutability_errors.rs | 14 ++++++++-- src/test/ui/borrowck/issue-33819.rs | 1 + src/test/ui/borrowck/issue-33819.stderr | 2 +- src/test/ui/borrowck/mut-borrow-of-mut-ref.rs | 2 ++ .../ui/borrowck/mut-borrow-of-mut-ref.stderr | 6 ++-- src/test/ui/did_you_mean/issue-31424.rs | 3 ++ src/test/ui/did_you_mean/issue-31424.stderr | 10 +++---- src/test/ui/did_you_mean/issue-34126.rs | 1 + src/test/ui/did_you_mean/issue-34126.stderr | 2 +- src/test/ui/did_you_mean/issue-34337.rs | 1 + src/test/ui/did_you_mean/issue-34337.stderr | 2 +- src/test/ui/did_you_mean/issue-37139.rs | 1 + src/test/ui/did_you_mean/issue-37139.stderr | 2 +- src/test/ui/nll/issue-51191.rs | 9 ++++-- src/test/ui/nll/issue-51191.stderr | 28 ++++++------------- 15 files changed, 47 insertions(+), 37 deletions(-) diff --git a/compiler/rustc_mir/src/borrow_check/diagnostics/mutability_errors.rs b/compiler/rustc_mir/src/borrow_check/diagnostics/mutability_errors.rs index 28f6508cab2d..7282098fa808 100644 --- a/compiler/rustc_mir/src/borrow_check/diagnostics/mutability_errors.rs +++ b/compiler/rustc_mir/src/borrow_check/diagnostics/mutability_errors.rs @@ -240,7 +240,12 @@ pub(crate) fn report_mutability_error( .unwrap_or(false) => { err.span_label(span, format!("cannot {ACT}", ACT = act)); - err.span_label(span, "try removing `&mut` here"); + err.span_suggestion( + span, + "try removing `&mut` here", + String::new(), + Applicability::MaybeIncorrect, + ); } // We want to suggest users use `let mut` for local (user @@ -322,7 +327,12 @@ pub(crate) fn report_mutability_error( } => { err.span_label(span, format!("cannot {ACT}", ACT = act)); - err.span_label(span, "try removing `&mut` here"); + err.span_suggestion( + span, + "try removing `&mut` here", + String::new(), + Applicability::MaybeIncorrect, + ); } PlaceRef { local, projection: [ProjectionElem::Deref] } diff --git a/src/test/ui/borrowck/issue-33819.rs b/src/test/ui/borrowck/issue-33819.rs index b73e85974a8e..74ef1c3d446b 100644 --- a/src/test/ui/borrowck/issue-33819.rs +++ b/src/test/ui/borrowck/issue-33819.rs @@ -3,6 +3,7 @@ fn main() { match op { Some(ref v) => { let a = &mut v; }, //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable + //~^ HELP try removing `&mut` here None => {}, } } diff --git a/src/test/ui/borrowck/issue-33819.stderr b/src/test/ui/borrowck/issue-33819.stderr index 8bc2d82cd3f1..f77fdbf2b6bf 100644 --- a/src/test/ui/borrowck/issue-33819.stderr +++ b/src/test/ui/borrowck/issue-33819.stderr @@ -5,7 +5,7 @@ LL | Some(ref v) => { let a = &mut v; }, | ^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error: aborting due to previous error diff --git a/src/test/ui/borrowck/mut-borrow-of-mut-ref.rs b/src/test/ui/borrowck/mut-borrow-of-mut-ref.rs index 59b541a24d1b..3f092846dd4c 100644 --- a/src/test/ui/borrowck/mut-borrow-of-mut-ref.rs +++ b/src/test/ui/borrowck/mut-borrow-of-mut-ref.rs @@ -4,8 +4,10 @@ pub fn f(b: &mut i32) { g(&mut b); //~^ ERROR cannot borrow + //~| HELP try removing `&mut` here g(&mut &mut b); //~^ ERROR cannot borrow + //~| HELP try removing `&mut` here } pub fn g(_: &mut i32) {} diff --git a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr index 8710f2046986..cb7355b23359 100644 --- a/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr +++ b/src/test/ui/borrowck/mut-borrow-of-mut-ref.stderr @@ -5,16 +5,16 @@ LL | g(&mut b); | ^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error[E0596]: cannot borrow `b` as mutable, as it is not declared as mutable - --> $DIR/mut-borrow-of-mut-ref.rs:7:12 + --> $DIR/mut-borrow-of-mut-ref.rs:8:12 | LL | g(&mut &mut b); | ^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error: aborting due to 2 previous errors diff --git a/src/test/ui/did_you_mean/issue-31424.rs b/src/test/ui/did_you_mean/issue-31424.rs index d321d64a312c..95ccf2a4c899 100644 --- a/src/test/ui/did_you_mean/issue-31424.rs +++ b/src/test/ui/did_you_mean/issue-31424.rs @@ -5,13 +5,16 @@ impl Struct { fn foo(&mut self) { (&mut self).bar(); //~ ERROR cannot borrow + //~^ HELP try removing `&mut` here } // In this case we could keep the suggestion, but to distinguish the // two cases is pretty hard. It's an obscure case anyway. fn bar(self: &mut Self) { //~^ WARN function cannot return without recursing + //~^^ HELP a `loop` may express intention better if this is on purpose (&mut self).bar(); //~ ERROR cannot borrow + //~^ HELP try removing `&mut` here } } diff --git a/src/test/ui/did_you_mean/issue-31424.stderr b/src/test/ui/did_you_mean/issue-31424.stderr index b9eb8dd236d2..838e81043db7 100644 --- a/src/test/ui/did_you_mean/issue-31424.stderr +++ b/src/test/ui/did_you_mean/issue-31424.stderr @@ -5,14 +5,14 @@ LL | (&mut self).bar(); | ^^^^^^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here warning: function cannot return without recursing - --> $DIR/issue-31424.rs:12:5 + --> $DIR/issue-31424.rs:13:5 | LL | fn bar(self: &mut Self) { | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing -LL | +... LL | (&mut self).bar(); | ----------------- recursive call site | @@ -20,13 +20,13 @@ LL | (&mut self).bar(); = help: a `loop` may express intention better if this is on purpose error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-31424.rs:14:9 + --> $DIR/issue-31424.rs:16:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error: aborting due to 2 previous errors; 1 warning emitted diff --git a/src/test/ui/did_you_mean/issue-34126.rs b/src/test/ui/did_you_mean/issue-34126.rs index 4989577dbb68..53516f4f2471 100644 --- a/src/test/ui/did_you_mean/issue-34126.rs +++ b/src/test/ui/did_you_mean/issue-34126.rs @@ -5,6 +5,7 @@ fn run(&self, z: &mut Z) { } fn start(&mut self) { self.run(&mut self); //~ ERROR cannot borrow //~| ERROR cannot borrow + //~| HELP try removing `&mut` here } } diff --git a/src/test/ui/did_you_mean/issue-34126.stderr b/src/test/ui/did_you_mean/issue-34126.stderr index 0843df29b5c4..669684fb3ddd 100644 --- a/src/test/ui/did_you_mean/issue-34126.stderr +++ b/src/test/ui/did_you_mean/issue-34126.stderr @@ -5,7 +5,7 @@ LL | self.run(&mut self); | ^^^^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error[E0502]: cannot borrow `self` as mutable because it is also borrowed as immutable --> $DIR/issue-34126.rs:6:18 diff --git a/src/test/ui/did_you_mean/issue-34337.rs b/src/test/ui/did_you_mean/issue-34337.rs index bb699609b3d3..e89eda33f8c9 100644 --- a/src/test/ui/did_you_mean/issue-34337.rs +++ b/src/test/ui/did_you_mean/issue-34337.rs @@ -4,4 +4,5 @@ fn main() { let mut v: Vec = Vec::new(); let ref mut key = v[0]; get(&mut key); //~ ERROR cannot borrow + //~| HELP try removing `&mut` here } diff --git a/src/test/ui/did_you_mean/issue-34337.stderr b/src/test/ui/did_you_mean/issue-34337.stderr index 81f7b6dbf1b2..1f18ea8923bd 100644 --- a/src/test/ui/did_you_mean/issue-34337.stderr +++ b/src/test/ui/did_you_mean/issue-34337.stderr @@ -5,7 +5,7 @@ LL | get(&mut key); | ^^^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error: aborting due to previous error diff --git a/src/test/ui/did_you_mean/issue-37139.rs b/src/test/ui/did_you_mean/issue-37139.rs index 07d855d0969f..6a19d85ff79f 100644 --- a/src/test/ui/did_you_mean/issue-37139.rs +++ b/src/test/ui/did_you_mean/issue-37139.rs @@ -10,6 +10,7 @@ fn main() { match x { TestEnum::Item(ref mut x) => { test(&mut x); //~ ERROR cannot borrow `x` as mutable, as it is not declared as mutable + //~| HELP try removing `&mut` here } } } diff --git a/src/test/ui/did_you_mean/issue-37139.stderr b/src/test/ui/did_you_mean/issue-37139.stderr index 163817dd9bf5..dc1bdfaaed56 100644 --- a/src/test/ui/did_you_mean/issue-37139.stderr +++ b/src/test/ui/did_you_mean/issue-37139.stderr @@ -5,7 +5,7 @@ LL | test(&mut x); | ^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error: aborting due to previous error diff --git a/src/test/ui/nll/issue-51191.rs b/src/test/ui/nll/issue-51191.rs index 747bfe3a8a57..638b9b0b63af 100644 --- a/src/test/ui/nll/issue-51191.rs +++ b/src/test/ui/nll/issue-51191.rs @@ -1,13 +1,15 @@ +#![allow(unconditional_recursion)] + struct Struct; impl Struct { fn bar(self: &mut Self) { - //~^ WARN function cannot return without recursing (&mut self).bar(); //~^ ERROR cannot borrow `self` as mutable, as it is not declared as mutable [E0596] + //~^^ HELP try removing `&mut` here } - fn imm(self) { + fn imm(self) { //~ HELP consider changing this to be mutable (&mut self).bar(); //~^ ERROR cannot borrow `self` as mutable, as it is not declared as mutable [E0596] } @@ -25,7 +27,8 @@ fn immref(&self) { fn mtblref(&mut self) { (&mut self).bar(); //~^ ERROR cannot borrow `self` as mutable, as it is not declared as mutable [E0596] + //~^^ HELP try removing `&mut` here } } -fn main () {} +fn main() {} diff --git a/src/test/ui/nll/issue-51191.stderr b/src/test/ui/nll/issue-51191.stderr index 4e2e4c20a02b..f2cc78f4b9ef 100644 --- a/src/test/ui/nll/issue-51191.stderr +++ b/src/test/ui/nll/issue-51191.stderr @@ -1,26 +1,14 @@ -warning: function cannot return without recursing - --> $DIR/issue-51191.rs:4:5 - | -LL | fn bar(self: &mut Self) { - | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing -LL | -LL | (&mut self).bar(); - | ----------------- recursive call site - | - = note: `#[warn(unconditional_recursion)]` on by default - = help: a `loop` may express intention better if this is on purpose - error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:6:9 + --> $DIR/issue-51191.rs:7:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:11:9 + --> $DIR/issue-51191.rs:13:9 | LL | fn imm(self) { | ---- help: consider changing this to be mutable: `mut self` @@ -28,26 +16,26 @@ LL | (&mut self).bar(); | ^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:20:9 + --> $DIR/issue-51191.rs:22:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/issue-51191.rs:20:9 + --> $DIR/issue-51191.rs:22:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ cannot borrow as mutable error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable - --> $DIR/issue-51191.rs:26:9 + --> $DIR/issue-51191.rs:28:9 | LL | (&mut self).bar(); | ^^^^^^^^^^^ | | | cannot borrow as mutable - | try removing `&mut` here + | help: try removing `&mut` here -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0596`. From 30df151be72225d958e4ea696d01140701dcd1da Mon Sep 17 00:00:00 2001 From: ibraheemdev Date: Sun, 25 Jul 2021 10:38:12 -0400 Subject: [PATCH 07/22] tidy --- src/test/ui/borrowck/issue-33819.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/borrowck/issue-33819.rs b/src/test/ui/borrowck/issue-33819.rs index 74ef1c3d446b..fa524b888f00 100644 --- a/src/test/ui/borrowck/issue-33819.rs +++ b/src/test/ui/borrowck/issue-33819.rs @@ -3,7 +3,7 @@ fn main() { match op { Some(ref v) => { let a = &mut v; }, //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable - //~^ HELP try removing `&mut` here + //~^ HELP try removing `&mut` here None => {}, } } From 880e69154217e0014ed866ddaa1d7a7e9a451b64 Mon Sep 17 00:00:00 2001 From: ibraheemdev Date: Sun, 25 Jul 2021 10:56:13 -0400 Subject: [PATCH 08/22] fix test/ui/borrowck/issue-33819 --- src/test/ui/borrowck/issue-33819.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/borrowck/issue-33819.rs b/src/test/ui/borrowck/issue-33819.rs index fa524b888f00..fff5015cdc1c 100644 --- a/src/test/ui/borrowck/issue-33819.rs +++ b/src/test/ui/borrowck/issue-33819.rs @@ -3,7 +3,7 @@ fn main() { match op { Some(ref v) => { let a = &mut v; }, //~^ ERROR cannot borrow `v` as mutable, as it is not declared as mutable - //~^ HELP try removing `&mut` here + //~| HELP try removing `&mut` here None => {}, } } From 7abbc6e3c556eb1a46f8de64c6acd31ea2c0c637 Mon Sep 17 00:00:00 2001 From: Smitty Date: Mon, 26 Jul 2021 20:22:44 -0400 Subject: [PATCH 09/22] Document math behind MIN/MAX consts on integers --- library/core/src/num/int_macros.rs | 8 +++++--- library/core/src/num/mod.rs | 16 ++++++++-------- library/core/src/num/uint_macros.rs | 3 ++- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 982729388c87..8bf2d9a6d14b 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -1,9 +1,10 @@ macro_rules! int_impl { - ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $Min:expr, $Max:expr, + ($SelfT:ty, $ActualT:ident, $UnsignedT:ty, $BITS:expr, $BITS_MINUS_ONE:expr, $Min:expr, $Max:expr, $rot:expr, $rot_op:expr, $rot_result:expr, $swap_op:expr, $swapped:expr, $reversed:expr, $le_bytes:expr, $be_bytes:expr, $to_xe_bytes_doc:expr, $from_xe_bytes_doc:expr) => { - /// The smallest value that can be represented by this integer type. + /// The smallest value that can be represented by this integer type, + #[doc = concat!("-2", stringify!($BITS_MINUS_ONE), ".")] /// /// # Examples /// @@ -15,7 +16,8 @@ macro_rules! int_impl { #[stable(feature = "assoc_int_consts", since = "1.43.0")] pub const MIN: Self = !0 ^ ((!0 as $UnsignedT) >> 1) as Self; - /// The largest value that can be represented by this integer type. + /// The largest value that can be represented by this integer type, + #[doc = concat!("2", stringify!($BITS_MINUS_ONE), " - 1.")] /// /// # Examples /// diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 26d84a60702c..6c43d6d62128 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -91,26 +91,26 @@ macro_rules! usize_isize_from_xe_bytes_doc { #[lang = "i8"] impl i8 { - int_impl! { i8, i8, u8, 8, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48", + int_impl! { i8, i8, u8, 8, 7, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48", "[0x12]", "[0x12]", "", "" } } #[lang = "i16"] impl i16 { - int_impl! { i16, i16, u16, 16, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412", + int_impl! { i16, i16, u16, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412", "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "" } } #[lang = "i32"] impl i32 { - int_impl! { i32, i32, u32, 32, -2147483648, 2147483647, 8, "0x10000b3", "0xb301", + int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301", "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]", "", "" } } #[lang = "i64"] impl i64 { - int_impl! { i64, i64, u64, 64, -9223372036854775808, 9223372036854775807, 12, + int_impl! { i64, i64, u64, 64, 63, -9223372036854775808, 9223372036854775807, 12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "" } @@ -118,7 +118,7 @@ impl i64 { #[lang = "i128"] impl i128 { - int_impl! { i128, i128, u128, 128, -170141183460469231731687303715884105728, + int_impl! { i128, i128, u128, 128, 127, -170141183460469231731687303715884105728, 170141183460469231731687303715884105727, 16, "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012", "0x12907856341290785634129078563412", "0x48091e6a2c48091e6a2c48091e6a2c48", @@ -131,7 +131,7 @@ impl i128 { #[cfg(target_pointer_width = "16")] #[lang = "isize"] impl isize { - int_impl! { isize, i16, usize, 16, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", + int_impl! { isize, i16, usize, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412", "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!() } } @@ -139,7 +139,7 @@ impl isize { #[cfg(target_pointer_width = "32")] #[lang = "isize"] impl isize { - int_impl! { isize, i32, usize, 32, -2147483648, 2147483647, 8, "0x10000b3", "0xb301", + int_impl! { isize, i32, usize, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301", "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]", usize_isize_to_xe_bytes_doc!(), usize_isize_from_xe_bytes_doc!() } @@ -148,7 +148,7 @@ impl isize { #[cfg(target_pointer_width = "64")] #[lang = "isize"] impl isize { - int_impl! { isize, i64, usize, 64, -9223372036854775808, 9223372036854775807, + int_impl! { isize, i64, usize, 64, 63, -9223372036854775808, 9223372036854775807, 12, "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48", "[0x56, 0x34, 0x12, 0x90, 0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index ca1b05fdfbe4..0d04d1b3b422 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -15,7 +15,8 @@ macro_rules! uint_impl { #[stable(feature = "assoc_int_consts", since = "1.43.0")] pub const MIN: Self = 0; - /// The largest value that can be represented by this integer type. + /// The largest value that can be represented by this integer type, + #[doc = concat!("2", stringify!($BITS), " - 1.")] /// /// # Examples /// From eb6f2d4be0ecb2f1091e1b6c9fda8f42e10a2328 Mon Sep 17 00:00:00 2001 From: Jethro Beekman Date: Tue, 27 Jul 2021 12:10:24 +0200 Subject: [PATCH 10/22] Revert "SGX mutex is movable" This reverts commit 30b82e0f96579d9f897c4e2a780af82662d89772. --- library/std/src/sys/sgx/mutex.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/sgx/mutex.rs b/library/std/src/sys/sgx/mutex.rs index 1b5ced4178f6..8874517dac60 100644 --- a/library/std/src/sys/sgx/mutex.rs +++ b/library/std/src/sys/sgx/mutex.rs @@ -8,7 +8,7 @@ pub struct Mutex { inner: SpinMutex>, } -pub type MovableMutex = Mutex; +pub type MovableMutex = Box; // Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28 impl Mutex { From b518dc7a316b172f474be97e2139cb36b1b15f2f Mon Sep 17 00:00:00 2001 From: Jethro Beekman Date: Tue, 27 Jul 2021 12:11:20 +0200 Subject: [PATCH 11/22] Add warning to SGX mutex implementation --- library/std/src/sys/sgx/mutex.rs | 1 + library/std/src/sys/sgx/waitqueue/unsafe_list.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/library/std/src/sys/sgx/mutex.rs b/library/std/src/sys/sgx/mutex.rs index 8874517dac60..0b2d1f4487f6 100644 --- a/library/std/src/sys/sgx/mutex.rs +++ b/library/std/src/sys/sgx/mutex.rs @@ -8,6 +8,7 @@ pub struct Mutex { inner: SpinMutex>, } +// not movable: see UnsafeList implementation pub type MovableMutex = Box; // Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28 diff --git a/library/std/src/sys/sgx/waitqueue/unsafe_list.rs b/library/std/src/sys/sgx/waitqueue/unsafe_list.rs index cf2f0886c154..c736cab576e4 100644 --- a/library/std/src/sys/sgx/waitqueue/unsafe_list.rs +++ b/library/std/src/sys/sgx/waitqueue/unsafe_list.rs @@ -23,6 +23,7 @@ pub fn new(value: T) -> Self { } } +// WARNING: self-referential struct! pub struct UnsafeList { head_tail: NonNull>, head_tail_entry: Option>, From 12597428658fc7b72244e8717d0ca6fc83fca11c Mon Sep 17 00:00:00 2001 From: Hudson Ayers Date: Tue, 27 Jul 2021 13:54:51 +0000 Subject: [PATCH 12/22] bootstrap.py: remove unused `git log` option When determining which LLVM artifacts to download, bootstrap.py calls: `git log --author=bors --format=%H -n1 -m --first-parent -- src/llvm-project src/bootstrap/download-ci-llvm-stamp src/version`. However, the `-m` option has no effect, per the `git log` help: > -m > This option makes diff output for merge commits to be shown in the > default format. -m will produce the output only if -p is given as > well. The default format could be changed using log.diffMerges > configuration parameter, which default value is separate. Accordingly, this commit removes use of the -m option in favor of `--no-patch`, to make clear that this command should never output diff information, as the SHA-1 hash is the only desired output. Tested using git 2.32, this does not change the output of the command. The motivation for this change is that some patched versions of git change the behavior of the `-m` flag to imply `-p`, rather than to do nothing unless `-p` is passed. These patched versions of git lead to this script not working. Google's corp-provided git is one such example. --- src/bootstrap/bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index d2cf929aa266..f2e38a7eab6b 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -473,7 +473,7 @@ class RustBuild(object): ]).decode(sys.getdefaultencoding()).strip() llvm_sha = subprocess.check_output([ "git", "log", "--author=bors", "--format=%H", "-n1", - "-m", "--first-parent", + "--no-patch", "--first-parent", "--", "{}/src/llvm-project".format(top_level), "{}/src/bootstrap/download-ci-llvm-stamp".format(top_level), From 5bff8429a0655320c1aef0c16fb0fd2ec0184a9a Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 27 Jul 2021 09:14:21 -0300 Subject: [PATCH 13/22] Use type_alias_impl_trait instead of min in compiler and lib --- compiler/rustc_data_structures/src/lib.rs | 3 +- compiler/rustc_feature/src/active.rs | 2 +- library/alloc/src/lib.rs | 3 +- .../duplicate.full_tait.stderr | 365 +++++++++--------- .../duplicate.min_tait.stderr | 354 ++++++++--------- .../ui/associated-type-bounds/duplicate.rs | 259 +++++++++---- .../trait-alias-impl-trait.full_tait.stderr | 11 - .../trait-alias-impl-trait.rs | 54 ++- .../issue-63591.full_tait.stderr | 11 - src/test/ui/associated-types/issue-63591.rs | 1 - ...e-60655-latebound-regions.full_tait.stderr | 11 - .../issues/issue-60655-latebound-regions.rs | 1 - .../generator/layout-error.full_tait.stderr | 13 +- .../ui/generator/layout-error.min_tait.stderr | 4 +- src/test/ui/generator/layout-error.rs | 1 - ...ata-sufficient-for-layout.full_tait.stderr | 13 +- ...data-sufficient-for-layout.min_tait.stderr | 2 +- .../metadata-sufficient-for-layout.rs | 1 - ...-trait-type-generic-trait.full_tait.stderr | 11 - ...ssociated-impl-trait-type-generic-trait.rs | 1 - ...d-impl-trait-type-trivial.full_tait.stderr | 11 - .../associated-impl-trait-type-trivial.rs | 1 - ...ssociated-impl-trait-type.full_tait.stderr | 11 - .../impl-trait/associated-impl-trait-type.rs | 1 - .../ui/impl-trait/auto-trait.full_tait.stderr | 13 +- .../ui/impl-trait/auto-trait.min_tait.stderr | 2 +- src/test/ui/impl-trait/auto-trait.rs | 1 - .../impl-trait/issue-55872-1.full_tait.stderr | 19 +- .../impl-trait/issue-55872-1.min_tait.stderr | 8 +- src/test/ui/impl-trait/issue-55872-1.rs | 1 - .../impl-trait/issue-55872-2.full_tait.stderr | 15 +- .../impl-trait/issue-55872-2.min_tait.stderr | 4 +- src/test/ui/impl-trait/issue-55872-2.rs | 1 - .../impl-trait/issue-55872.full_tait.stderr | 13 +- .../ui/impl-trait/issue-55872.min_tait.stderr | 2 +- src/test/ui/impl-trait/issue-55872.rs | 3 +- .../issues/issue-53457.full_tait.stderr | 11 - src/test/ui/impl-trait/issues/issue-53457.rs | 1 - .../issues/issue-78722.full_tait.stderr | 15 +- .../issues/issue-78722.min_tait.stderr | 4 +- src/test/ui/impl-trait/issues/issue-78722.rs | 1 - .../error-handling-2.full_tait.stderr | 17 +- .../error-handling-2.min_tait.stderr | 6 +- .../multiple-lifetimes/error-handling-2.rs | 1 - .../error-handling.full_tait.stderr | 13 +- .../error-handling.min_tait.stderr | 2 +- .../multiple-lifetimes/error-handling.rs | 1 - .../negative-reasoning.full_tait.stderr | 13 +- .../negative-reasoning.min_tait.stderr | 2 +- src/test/ui/impl-trait/negative-reasoning.rs | 1 - .../type-alias-generic-param.full_tait.stderr | 11 - .../ui/impl-trait/type-alias-generic-param.rs | 4 +- ...ias-impl-trait-in-fn-body.full_tait.stderr | 11 - .../type-alias-impl-trait-in-fn-body.rs | 1 - .../ui/issues/issue-60662.full_tait.stderr | 11 - src/test/ui/issues/issue-60662.rs | 4 +- ...e-trait-and-foreign-items.full_tait.stderr | 29 +- ...ne-trait-and-foreign-items.min_tait.stderr | 18 +- .../ui/lint/inline-trait-and-foreign-items.rs | 1 - .../lint/lint-ctypes-73249-2.full_tait.stderr | 15 +- .../lint/lint-ctypes-73249-2.min_tait.stderr | 4 +- src/test/ui/lint/lint-ctypes-73249-2.rs | 5 +- .../lint/lint-ctypes-73249-3.full_tait.stderr | 15 +- .../lint/lint-ctypes-73249-3.min_tait.stderr | 4 +- src/test/ui/lint/lint-ctypes-73249-3.rs | 9 +- .../lint/lint-ctypes-73249-5.full_tait.stderr | 15 +- .../lint/lint-ctypes-73249-5.min_tait.stderr | 4 +- src/test/ui/lint/lint-ctypes-73249-5.rs | 9 +- .../lint/lint-ctypes-73251-1.full_tait.stderr | 15 +- .../lint/lint-ctypes-73251-1.min_tait.stderr | 4 +- src/test/ui/lint/lint-ctypes-73251-1.rs | 9 +- .../lint/lint-ctypes-73251-2.full_tait.stderr | 15 +- .../lint/lint-ctypes-73251-2.min_tait.stderr | 4 +- src/test/ui/lint/lint-ctypes-73251-2.rs | 14 +- .../lint/lint-ctypes-73251.full_tait.stderr | 11 - src/test/ui/lint/lint-ctypes-73251.rs | 1 - .../opaque-ty-ffi-unsafe.full_tait.stderr | 15 +- .../lint/opaque-ty-ffi-unsafe.min_tait.stderr | 4 +- src/test/ui/lint/opaque-ty-ffi-unsafe.rs | 3 +- src/test/ui/mir/issue-75053.full_tait.stderr | 13 +- src/test/ui/mir/issue-75053.min_tait.stderr | 2 +- src/test/ui/mir/issue-75053.rs | 1 - ...rivate-in-public-assoc-ty.full_tait.stderr | 25 +- ...private-in-public-assoc-ty.min_tait.stderr | 14 +- .../ui/privacy/private-in-public-assoc-ty.rs | 1 - ...lic-type-alias-impl-trait.full_tait.stderr | 11 - ...private-in-public-type-alias-impl-trait.rs | 5 +- .../issue-68621.full_tait.stderr | 13 +- .../save-analysis/issue-68621.min_tait.stderr | 2 +- src/test/ui/save-analysis/issue-68621.rs | 1 - .../assoc-type-const.full_tait.stderr | 14 +- .../assoc-type-const.min_tait.stderr | 2 +- .../type-alias-impl-trait/assoc-type-const.rs | 1 - ...pe-lifetime-unconstrained.full_tait.stderr | 13 +- ...ype-lifetime-unconstrained.min_tait.stderr | 2 +- .../assoc-type-lifetime-unconstrained.rs | 1 - .../assoc-type-lifetime.full_tait.stderr | 11 - .../assoc-type-lifetime.rs | 1 - ...ted-type-alias-impl-trait.full_tait.stderr | 11 - .../associated-type-alias-impl-trait.rs | 1 - .../auxiliary/cross_crate_ice.rs | 1 - .../auxiliary/cross_crate_ice2.rs | 3 +- .../bound_reduction2.full_tait.stderr | 15 +- .../bound_reduction2.min_tait.stderr | 4 +- .../type-alias-impl-trait/bound_reduction2.rs | 1 - .../bounds-are-checked-2.full_tait.stderr | 13 +- .../bounds-are-checked-2.min_tait.stderr | 2 +- .../bounds-are-checked-2.rs | 1 - .../bounds-are-checked.full_tait.stderr | 19 +- .../bounds-are-checked.min_tait.stderr | 8 +- .../bounds-are-checked.rs | 4 +- .../coherence.full_tait.stderr | 13 +- .../coherence.min_tait.stderr | 2 +- .../ui/type-alias-impl-trait/coherence.rs | 1 - ...eclared_but_never_defined.full_tait.stderr | 13 +- ...declared_but_never_defined.min_tait.stderr | 2 +- .../declared_but_never_defined.rs | 1 - ..._but_not_defined_in_scope.full_tait.stderr | 15 +- ...d_but_not_defined_in_scope.min_tait.stderr | 4 +- .../declared_but_not_defined_in_scope.rs | 1 - .../different_defining_uses.full_tait.stderr | 15 +- .../different_defining_uses.min_tait.stderr | 4 +- .../different_defining_uses.rs | 4 +- ..._defining_uses_never_type.full_tait.stderr | 17 +- ...t_defining_uses_never_type.min_tait.stderr | 6 +- .../different_defining_uses_never_type.rs | 7 +- ...defining_uses_never_type2.full_tait.stderr | 11 - .../different_defining_uses_never_type2.rs | 1 - .../fallback.full_tait.stderr | 11 - src/test/ui/type-alias-impl-trait/fallback.rs | 1 - ...c_different_defining_uses.full_tait.stderr | 15 +- ...ic_different_defining_uses.min_tait.stderr | 4 +- .../generic_different_defining_uses.rs | 4 +- ..._duplicate_lifetime_param.full_tait.stderr | 15 +- ...c_duplicate_lifetime_param.min_tait.stderr | 4 +- .../generic_duplicate_lifetime_param.rs | 4 +- ...ric_duplicate_param_use10.full_tait.stderr | 11 - .../generic_duplicate_param_use10.rs | 1 - ...eric_duplicate_param_use2.full_tait.stderr | 15 +- ...neric_duplicate_param_use2.min_tait.stderr | 4 +- .../generic_duplicate_param_use2.rs | 1 - ...eric_duplicate_param_use3.full_tait.stderr | 15 +- ...neric_duplicate_param_use3.min_tait.stderr | 4 +- .../generic_duplicate_param_use3.rs | 1 - ...eric_duplicate_param_use4.full_tait.stderr | 15 +- ...neric_duplicate_param_use4.min_tait.stderr | 4 +- .../generic_duplicate_param_use4.rs | 3 +- ...eric_duplicate_param_use5.full_tait.stderr | 19 +- ...neric_duplicate_param_use5.min_tait.stderr | 8 +- .../generic_duplicate_param_use5.rs | 1 - ...eric_duplicate_param_use6.full_tait.stderr | 17 +- ...neric_duplicate_param_use6.min_tait.stderr | 6 +- .../generic_duplicate_param_use6.rs | 1 - ...eric_duplicate_param_use7.full_tait.stderr | 11 - .../generic_duplicate_param_use7.rs | 1 - ...eric_duplicate_param_use8.full_tait.stderr | 17 +- ...neric_duplicate_param_use8.min_tait.stderr | 6 +- .../generic_duplicate_param_use8.rs | 1 - ...eric_duplicate_param_use9.full_tait.stderr | 21 +- ...neric_duplicate_param_use9.min_tait.stderr | 10 +- .../generic_duplicate_param_use9.rs | 1 - .../generic_lifetime_param.full_tait.stderr | 11 - .../generic_lifetime_param.rs | 1 - .../generic_not_used.full_tait.stderr | 15 +- .../generic_not_used.min_tait.stderr | 4 +- .../type-alias-impl-trait/generic_not_used.rs | 3 +- ...does_not_live_long_enough.full_tait.stderr | 17 +- ..._does_not_live_long_enough.min_tait.stderr | 6 +- .../generic_type_does_not_live_long_enough.rs | 1 - .../generic_underconstrained.full_tait.stderr | 15 +- .../generic_underconstrained.min_tait.stderr | 4 +- .../generic_underconstrained.rs | 1 - ...generic_underconstrained2.full_tait.stderr | 19 +- .../generic_underconstrained2.min_tait.stderr | 8 +- .../generic_underconstrained2.rs | 1 - ...-with-unconstrained-param.full_tait.stderr | 13 +- ...l-with-unconstrained-param.min_tait.stderr | 2 +- .../impl-with-unconstrained-param.rs | 1 - ...ncoherent-assoc-imp-trait.full_tait.stderr | 15 +- ...incoherent-assoc-imp-trait.min_tait.stderr | 4 +- .../incoherent-assoc-imp-trait.rs | 1 - ...e-52843-closure-constrain.full_tait.stderr | 15 +- ...ue-52843-closure-constrain.min_tait.stderr | 6 +- .../issue-52843-closure-constrain.rs | 1 - .../issue-52843.full_tait.stderr | 13 +- .../issue-52843.min_tait.stderr | 2 +- .../ui/type-alias-impl-trait/issue-52843.rs | 1 - .../issue-53096.full_tait.stderr | 13 +- .../issue-53096.min_tait.stderr | 2 +- .../ui/type-alias-impl-trait/issue-53096.rs | 1 - .../issue-53598.full_tait.stderr | 13 +- .../issue-53598.min_tait.stderr | 2 +- .../ui/type-alias-impl-trait/issue-53598.rs | 3 +- ...78-generator-and-const-fn.full_tait.stderr | 13 +- ...678-generator-and-const-fn.min_tait.stderr | 2 +- .../issue-53678-generator-and-const-fn.rs | 1 - ...-55099-lifetime-inference.full_tait.stderr | 11 - .../issue-55099-lifetime-inference.rs | 7 +- ...88-associate-impl-capture.full_tait.stderr | 11 - .../issue-57188-associate-impl-capture.rs | 1 - .../issue-57611-trait-alias.full_tait.stderr | 13 +- .../issue-57611-trait-alias.min_tait.stderr | 2 +- .../issue-57611-trait-alias.rs | 1 - .../issue-57700.full_tait.stderr | 13 +- .../issue-57700.min_tait.stderr | 2 +- .../ui/type-alias-impl-trait/issue-57700.rs | 3 +- ...sue-57807-associated-type.full_tait.stderr | 11 - .../issue-57807-associated-type.rs | 1 - .../issue-58887.full_tait.stderr | 11 - .../ui/type-alias-impl-trait/issue-58887.rs | 1 - .../issue-58951.full_tait.stderr | 11 - .../ui/type-alias-impl-trait/issue-58951.rs | 5 +- .../issue-60407.full_tait.stderr | 13 +- .../issue-60407.min_tait.stderr | 2 +- .../ui/type-alias-impl-trait/issue-60407.rs | 1 - .../issue-60564.full_tait.stderr | 15 +- .../issue-60564.min_tait.stderr | 4 +- .../ui/type-alias-impl-trait/issue-60564.rs | 1 - ...iate-impl-trait-lifetimes.full_tait.stderr | 11 - ...ue-62000-associate-impl-trait-lifetimes.rs | 1 - .../issue-63263-closure-return.rs | 1 - .../issue-63263-closure-return.stderr | 11 - .../issue-63279.full_tait.stderr | 15 +- .../issue-63279.min_tait.stderr | 6 +- .../ui/type-alias-impl-trait/issue-63279.rs | 1 - ...3677-type-alias-coherence.full_tait.stderr | 11 - .../issue-63677-type-alias-coherence.rs | 1 - ...-opaque-ty-from-val-twice.full_tait.stderr | 13 +- ...t-opaque-ty-from-val-twice.min_tait.stderr | 4 +- ...sue-65679-inst-opaque-ty-from-val-twice.rs | 1 - .../ui/type-alias-impl-trait/issue-65918.rs | 1 - ...e-66580-closure-coherence.full_tait.stderr | 11 - .../issue-66580-closure-coherence.rs | 5 +- ...issue-67844-nested-opaque.full_tait.stderr | 11 - .../issue-67844-nested-opaque.rs | 6 +- ...ue-68368-non-defining-use.full_tait.stderr | 15 +- ...sue-68368-non-defining-use.min_tait.stderr | 4 +- .../issue-68368-non-defining-use.rs | 1 - ...er-lifetime-resolve-error.full_tait.stderr | 13 +- ...ner-lifetime-resolve-error.min_tait.stderr | 2 +- ...ssue-69136-inner-lifetime-resolve-error.rs | 1 - ...inner-lifetime-resolve-ok.full_tait.stderr | 11 - .../issue-69136-inner-lifetime-resolve-ok.rs | 1 - .../issue-69323.full.stderr | 11 - .../ui/type-alias-impl-trait/issue-69323.rs | 1 - .../issue-70121.full_tait.stderr | 11 - .../ui/type-alias-impl-trait/issue-70121.rs | 1 - .../issue-74244.full_tait.stderr | 13 +- .../issue-74244.min_tait.stderr | 2 +- .../ui/type-alias-impl-trait/issue-74244.rs | 1 - .../ui/type-alias-impl-trait/issue-74761-2.rs | 1 - .../issue-74761-2.stderr | 17 +- .../issue-74761.full_tait.stderr | 15 +- .../issue-74761.min_tait.stderr | 4 +- .../ui/type-alias-impl-trait/issue-74761.rs | 1 - ...76202-trait-impl-for-tait.full_tait.stderr | 15 +- ...-76202-trait-impl-for-tait.min_tait.stderr | 4 +- .../issue-76202-trait-impl-for-tait.rs | 4 +- .../ui/type-alias-impl-trait/issue-78450.rs | 1 - .../type-alias-impl-trait/issue-78450.stderr | 11 - ...ted_type_alias_impl_trait.full_tait.stderr | 11 - .../nested_type_alias_impl_trait.rs | 19 +- ...ever_reveal_concrete_type.full_tait.stderr | 15 +- ...never_reveal_concrete_type.min_tait.stderr | 4 +- .../never_reveal_concrete_type.rs | 1 - ..._inferrable_concrete_type.full_tait.stderr | 13 +- ...o_inferrable_concrete_type.min_tait.stderr | 2 +- .../no_inferrable_concrete_type.rs | 1 - ...g_outside_defining_module.full_tait.stderr | 15 +- ...ng_outside_defining_module.min_tait.stderr | 4 +- .../no_revealing_outside_defining_module.rs | 1 - .../not_a_defining_use.full_tait.stderr | 15 +- .../not_a_defining_use.min_tait.stderr | 4 +- .../not_a_defining_use.rs | 1 - .../not_well_formed.full_tait.stderr | 13 +- .../not_well_formed.min_tait.stderr | 2 +- .../type-alias-impl-trait/not_well_formed.rs | 4 +- .../structural-match-no-leak.full_tait.stderr | 13 +- .../structural-match-no-leak.min_tait.stderr | 2 +- .../structural-match-no-leak.rs | 1 - .../structural-match.full_tait.stderr | 13 +- .../structural-match.min_tait.stderr | 2 +- .../type-alias-impl-trait/structural-match.rs | 1 - ...pe-alias-impl-trait-const.full_tait.stderr | 15 +- ...ype-alias-impl-trait-const.min_tait.stderr | 4 +- .../type-alias-impl-trait-const.rs | 1 - ...type-alias-impl-trait-fns.full_tait.stderr | 11 - .../type-alias-impl-trait-fns.rs | 6 +- ...pe-alias-impl-trait-sized.full_tait.stderr | 11 - .../type-alias-impl-trait-sized.rs | 17 +- ...pe-alias-impl-trait-tuple.full_tait.stderr | 11 - .../type-alias-impl-trait-tuple.rs | 1 - ...it-unconstrained-lifetime.full_tait.stderr | 13 +- ...ait-unconstrained-lifetime.min_tait.stderr | 2 +- ...alias-impl-trait-unconstrained-lifetime.rs | 1 - ...pl-trait-with-cycle-error.full_tait.stderr | 13 +- ...mpl-trait-with-cycle-error.min_tait.stderr | 2 +- .../type-alias-impl-trait-with-cycle-error.rs | 1 - ...l-trait-with-cycle-error2.full_tait.stderr | 13 +- ...pl-trait-with-cycle-error2.min_tait.stderr | 2 +- ...type-alias-impl-trait-with-cycle-error2.rs | 5 +- ...impl-trait-with-no-traits.full_tait.stderr | 15 +- ...-impl-trait-with-no-traits.min_tait.stderr | 4 +- .../type-alias-impl-trait-with-no-traits.rs | 1 - .../type-alias-impl-trait.full_tait.stderr | 11 - .../type-alias-impl-trait.rs | 1 - ...e-alias-nested-impl-trait.full_tait.stderr | 11 - .../type-alias-nested-impl-trait.rs | 1 - .../unused_generic_param.full_tait.stderr | 15 +- .../unused_generic_param.min_tait.stderr | 4 +- .../unused_generic_param.rs | 4 +- ...eck_type_placeholder_item.full_tait.stderr | 149 ++++--- ...peck_type_placeholder_item.min_tait.stderr | 138 +++---- .../ui/typeck/typeck_type_placeholder_item.rs | 1 - 314 files changed, 1192 insertions(+), 2255 deletions(-) delete mode 100644 src/test/ui/associated-type-bounds/trait-alias-impl-trait.full_tait.stderr delete mode 100644 src/test/ui/associated-types/issue-63591.full_tait.stderr delete mode 100644 src/test/ui/async-await/issues/issue-60655-latebound-regions.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/associated-impl-trait-type-trivial.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/associated-impl-trait-type.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/issues/issue-53457.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/type-alias-generic-param.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.full_tait.stderr delete mode 100644 src/test/ui/issues/issue-60662.full_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73251.full_tait.stderr delete mode 100644 src/test/ui/privacy/private-in-public-type-alias-impl-trait.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/assoc-type-lifetime.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/fallback.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_lifetime_param.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57807-associated-type.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-58887.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-58951.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-63263-closure-return.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-69323.full.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-70121.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-78450.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.full_tait.stderr diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 041d52aa20ab..18bc2f896f2f 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -21,7 +21,8 @@ #![feature(iter_map_while)] #![feature(maybe_uninit_uninit_array)] #![feature(min_specialization)] -#![feature(min_type_alias_impl_trait)] +#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))] +#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))] #![feature(new_uninit)] #![feature(nll)] #![feature(once_cell)] diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index a3e40daf6bf6..27c08586f4fc 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -489,7 +489,7 @@ pub fn set(&self, features: &mut Features, span: Span) { (active, async_closure, "1.37.0", Some(62290), None), /// Allows `impl Trait` to be used inside type aliases (RFC 2515). - (incomplete, type_alias_impl_trait, "1.38.0", Some(63063), None), + (active, type_alias_impl_trait, "1.38.0", Some(63063), None), /// Allows the definition of `const extern fn` and `const unsafe extern fn`. (active, const_extern_fn, "1.40.0", Some(64926), None), diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index fa1f361a5b6d..999ca9b0ad09 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -141,7 +141,8 @@ #![feature(alloc_layout_extra)] #![feature(trusted_random_access)] #![feature(try_trait_v2)] -#![feature(min_type_alias_impl_trait)] +#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))] +#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))] #![feature(associated_type_bounds)] #![feature(slice_group_by)] #![feature(decl_macro)] diff --git a/src/test/ui/associated-type-bounds/duplicate.full_tait.stderr b/src/test/ui/associated-type-bounds/duplicate.full_tait.stderr index bffa5150fe1c..81cd882e5d80 100644 --- a/src/test/ui/associated-type-bounds/duplicate.full_tait.stderr +++ b/src/test/ui/associated-type-bounds/duplicate.full_tait.stderr @@ -1,158 +1,149 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/duplicate.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:10:36 + --> $DIR/duplicate.rs:9:36 | -LL | struct SI1> { f: T } +LL | struct SI1> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:12:36 + --> $DIR/duplicate.rs:13:36 | -LL | struct SI2> { f: T } +LL | struct SI2> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:14:39 + --> $DIR/duplicate.rs:17:39 | -LL | struct SI3> { f: T } +LL | struct SI3> { | ------------- ^^^^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:16:45 + --> $DIR/duplicate.rs:23:29 | -LL | struct SW1 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:18:45 + --> $DIR/duplicate.rs:30:29 | -LL | struct SW2 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:20:48 + --> $DIR/duplicate.rs:37:32 | -LL | struct SW3 where T: Iterator { f: T } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:23:34 + --> $DIR/duplicate.rs:43:34 | -LL | enum EI1> { V(T) } +LL | enum EI1> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:25:34 + --> $DIR/duplicate.rs:47:34 | -LL | enum EI2> { V(T) } +LL | enum EI2> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:27:37 + --> $DIR/duplicate.rs:51:37 | -LL | enum EI3> { V(T) } +LL | enum EI3> { | ------------- ^^^^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:29:43 + --> $DIR/duplicate.rs:57:29 | -LL | enum EW1 where T: Iterator { V(T) } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:31:43 + --> $DIR/duplicate.rs:64:29 | -LL | enum EW2 where T: Iterator { V(T) } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:33:46 + --> $DIR/duplicate.rs:71:32 | -LL | enum EW3 where T: Iterator { V(T) } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:36:35 + --> $DIR/duplicate.rs:77:35 | -LL | union UI1> { f: T } +LL | union UI1> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:38:35 + --> $DIR/duplicate.rs:81:35 | -LL | union UI2> { f: T } +LL | union UI2> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:40:38 + --> $DIR/duplicate.rs:85:38 | -LL | union UI3> { f: T } +LL | union UI3> { | ------------- ^^^^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:42:44 + --> $DIR/duplicate.rs:91:29 | -LL | union UW1 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:44:44 + --> $DIR/duplicate.rs:98:29 | -LL | union UW2 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:46:47 + --> $DIR/duplicate.rs:105:32 | -LL | union UW3 where T: Iterator { f: T } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:49:32 + --> $DIR/duplicate.rs:111:32 | LL | fn FI1>() {} | ---------- ^^^^^^^^^^ re-bound here @@ -160,7 +151,7 @@ LL | fn FI1>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:51:32 + --> $DIR/duplicate.rs:113:32 | LL | fn FI2>() {} | ---------- ^^^^^^^^^^ re-bound here @@ -168,7 +159,7 @@ LL | fn FI2>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:53:35 + --> $DIR/duplicate.rs:115:35 | LL | fn FI3>() {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -176,31 +167,31 @@ LL | fn FI3>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:55:43 + --> $DIR/duplicate.rs:119:29 | -LL | fn FW1() where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:57:43 + --> $DIR/duplicate.rs:125:29 | -LL | fn FW2() where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:59:46 + --> $DIR/duplicate.rs:131:32 | -LL | fn FW3() where T: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:65:40 + --> $DIR/duplicate.rs:145:40 | LL | fn FAPIT1(_: impl Iterator) {} | ---------- ^^^^^^^^^^ re-bound here @@ -208,7 +199,7 @@ LL | fn FAPIT1(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:67:40 + --> $DIR/duplicate.rs:147:40 | LL | fn FAPIT2(_: impl Iterator) {} | ---------- ^^^^^^^^^^ re-bound here @@ -216,7 +207,7 @@ LL | fn FAPIT2(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:69:43 + --> $DIR/duplicate.rs:149:43 | LL | fn FAPIT3(_: impl Iterator) {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -224,7 +215,7 @@ LL | fn FAPIT3(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:72:35 + --> $DIR/duplicate.rs:152:35 | LL | type TAI1> = T; | ---------- ^^^^^^^^^^ re-bound here @@ -232,7 +223,7 @@ LL | type TAI1> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:74:35 + --> $DIR/duplicate.rs:154:35 | LL | type TAI2> = T; | ---------- ^^^^^^^^^^ re-bound here @@ -240,7 +231,7 @@ LL | type TAI2> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:76:38 + --> $DIR/duplicate.rs:156:38 | LL | type TAI3> = T; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -248,31 +239,31 @@ LL | type TAI3> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:78:44 + --> $DIR/duplicate.rs:160:29 | -LL | type TAW1 where T: Iterator = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:80:44 + --> $DIR/duplicate.rs:165:29 | -LL | type TAW2 where T: Iterator = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:82:47 + --> $DIR/duplicate.rs:170:32 | -LL | type TAW3 where T: Iterator = T; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:85:36 + --> $DIR/duplicate.rs:174:36 | LL | type ETAI1> = impl Copy; | ---------- ^^^^^^^^^^ re-bound here @@ -280,7 +271,7 @@ LL | type ETAI1> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:87:36 + --> $DIR/duplicate.rs:176:36 | LL | type ETAI2> = impl Copy; | ---------- ^^^^^^^^^^ re-bound here @@ -288,7 +279,7 @@ LL | type ETAI2> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:89:39 + --> $DIR/duplicate.rs:178:39 | LL | type ETAI3> = impl Copy; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -296,7 +287,7 @@ LL | type ETAI3> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:91:40 + --> $DIR/duplicate.rs:180:40 | LL | type ETAI4 = impl Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -304,7 +295,7 @@ LL | type ETAI4 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:93:40 + --> $DIR/duplicate.rs:182:40 | LL | type ETAI5 = impl Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -312,7 +303,7 @@ LL | type ETAI5 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:95:43 + --> $DIR/duplicate.rs:184:43 | LL | type ETAI6 = impl Iterator; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -320,7 +311,7 @@ LL | type ETAI6 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:98:36 + --> $DIR/duplicate.rs:187:36 | LL | trait TRI1> {} | ---------- ^^^^^^^^^^ re-bound here @@ -328,7 +319,7 @@ LL | trait TRI1> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:100:36 + --> $DIR/duplicate.rs:189:36 | LL | trait TRI2> {} | ---------- ^^^^^^^^^^ re-bound here @@ -336,7 +327,7 @@ LL | trait TRI2> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:102:39 + --> $DIR/duplicate.rs:191:39 | LL | trait TRI3> {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -344,7 +335,7 @@ LL | trait TRI3> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:104:34 + --> $DIR/duplicate.rs:193:34 | LL | trait TRS1: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -352,7 +343,7 @@ LL | trait TRS1: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:106:34 + --> $DIR/duplicate.rs:195:34 | LL | trait TRS2: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -360,7 +351,7 @@ LL | trait TRS2: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:108:37 + --> $DIR/duplicate.rs:197:37 | LL | trait TRS3: Iterator {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -368,79 +359,79 @@ LL | trait TRS3: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:110:45 + --> $DIR/duplicate.rs:201:29 | -LL | trait TRW1 where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:112:45 + --> $DIR/duplicate.rs:207:29 | -LL | trait TRW2 where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:114:48 + --> $DIR/duplicate.rs:213:32 | -LL | trait TRW3 where T: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:116:46 + --> $DIR/duplicate.rs:219:32 | -LL | trait TRSW1 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:116:46 + --> $DIR/duplicate.rs:219:32 | -LL | trait TRSW1 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:119:46 + --> $DIR/duplicate.rs:226:32 | -LL | trait TRSW2 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:119:46 + --> $DIR/duplicate.rs:226:32 | -LL | trait TRSW2 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:122:49 + --> $DIR/duplicate.rs:233:35 | -LL | trait TRSW3 where Self: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:122:49 + --> $DIR/duplicate.rs:233:35 | -LL | trait TRSW3 where Self: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:132:40 + --> $DIR/duplicate.rs:251:40 | LL | type TADyn1 = dyn Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -448,7 +439,7 @@ LL | type TADyn1 = dyn Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:134:44 + --> $DIR/duplicate.rs:253:44 | LL | type TADyn2 = Box>; | ---------- ^^^^^^^^^^ re-bound here @@ -456,7 +447,7 @@ LL | type TADyn2 = Box>; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:136:43 + --> $DIR/duplicate.rs:255:43 | LL | type TADyn3 = dyn Iterator; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -464,29 +455,29 @@ LL | type TADyn3 = dyn Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:125:43 + --> $DIR/duplicate.rs:239:34 | -LL | trait TRA1 { type A: Iterator; } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | type A: Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:127:43 + --> $DIR/duplicate.rs:243:34 | -LL | trait TRA2 { type A: Iterator; } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | type A: Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:129:46 + --> $DIR/duplicate.rs:247:37 | -LL | trait TRA3 { type A: Iterator; } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | type A: Iterator; + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first -error: aborting due to 60 previous errors; 1 warning emitted +error: aborting due to 60 previous errors For more information about this error, try `rustc --explain E0719`. diff --git a/src/test/ui/associated-type-bounds/duplicate.min_tait.stderr b/src/test/ui/associated-type-bounds/duplicate.min_tait.stderr index 06bfac588de0..81cd882e5d80 100644 --- a/src/test/ui/associated-type-bounds/duplicate.min_tait.stderr +++ b/src/test/ui/associated-type-bounds/duplicate.min_tait.stderr @@ -1,149 +1,149 @@ error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:10:36 + --> $DIR/duplicate.rs:9:36 | -LL | struct SI1> { f: T } +LL | struct SI1> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:12:36 + --> $DIR/duplicate.rs:13:36 | -LL | struct SI2> { f: T } +LL | struct SI2> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:14:39 + --> $DIR/duplicate.rs:17:39 | -LL | struct SI3> { f: T } +LL | struct SI3> { | ------------- ^^^^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:16:45 + --> $DIR/duplicate.rs:23:29 | -LL | struct SW1 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:18:45 + --> $DIR/duplicate.rs:30:29 | -LL | struct SW2 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:20:48 + --> $DIR/duplicate.rs:37:32 | -LL | struct SW3 where T: Iterator { f: T } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:23:34 + --> $DIR/duplicate.rs:43:34 | -LL | enum EI1> { V(T) } +LL | enum EI1> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:25:34 + --> $DIR/duplicate.rs:47:34 | -LL | enum EI2> { V(T) } +LL | enum EI2> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:27:37 + --> $DIR/duplicate.rs:51:37 | -LL | enum EI3> { V(T) } +LL | enum EI3> { | ------------- ^^^^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:29:43 + --> $DIR/duplicate.rs:57:29 | -LL | enum EW1 where T: Iterator { V(T) } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:31:43 + --> $DIR/duplicate.rs:64:29 | -LL | enum EW2 where T: Iterator { V(T) } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:33:46 + --> $DIR/duplicate.rs:71:32 | -LL | enum EW3 where T: Iterator { V(T) } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:36:35 + --> $DIR/duplicate.rs:77:35 | -LL | union UI1> { f: T } +LL | union UI1> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:38:35 + --> $DIR/duplicate.rs:81:35 | -LL | union UI2> { f: T } +LL | union UI2> { | ---------- ^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:40:38 + --> $DIR/duplicate.rs:85:38 | -LL | union UI3> { f: T } +LL | union UI3> { | ------------- ^^^^^^^^^^^^^ re-bound here | | | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:42:44 + --> $DIR/duplicate.rs:91:29 | -LL | union UW1 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:44:44 + --> $DIR/duplicate.rs:98:29 | -LL | union UW2 where T: Iterator { f: T } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:46:47 + --> $DIR/duplicate.rs:105:32 | -LL | union UW3 where T: Iterator { f: T } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:49:32 + --> $DIR/duplicate.rs:111:32 | LL | fn FI1>() {} | ---------- ^^^^^^^^^^ re-bound here @@ -151,7 +151,7 @@ LL | fn FI1>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:51:32 + --> $DIR/duplicate.rs:113:32 | LL | fn FI2>() {} | ---------- ^^^^^^^^^^ re-bound here @@ -159,7 +159,7 @@ LL | fn FI2>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:53:35 + --> $DIR/duplicate.rs:115:35 | LL | fn FI3>() {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -167,31 +167,31 @@ LL | fn FI3>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:55:43 + --> $DIR/duplicate.rs:119:29 | -LL | fn FW1() where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:57:43 + --> $DIR/duplicate.rs:125:29 | -LL | fn FW2() where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:59:46 + --> $DIR/duplicate.rs:131:32 | -LL | fn FW3() where T: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:65:40 + --> $DIR/duplicate.rs:145:40 | LL | fn FAPIT1(_: impl Iterator) {} | ---------- ^^^^^^^^^^ re-bound here @@ -199,7 +199,7 @@ LL | fn FAPIT1(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:67:40 + --> $DIR/duplicate.rs:147:40 | LL | fn FAPIT2(_: impl Iterator) {} | ---------- ^^^^^^^^^^ re-bound here @@ -207,7 +207,7 @@ LL | fn FAPIT2(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:69:43 + --> $DIR/duplicate.rs:149:43 | LL | fn FAPIT3(_: impl Iterator) {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -215,7 +215,7 @@ LL | fn FAPIT3(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:72:35 + --> $DIR/duplicate.rs:152:35 | LL | type TAI1> = T; | ---------- ^^^^^^^^^^ re-bound here @@ -223,7 +223,7 @@ LL | type TAI1> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:74:35 + --> $DIR/duplicate.rs:154:35 | LL | type TAI2> = T; | ---------- ^^^^^^^^^^ re-bound here @@ -231,7 +231,7 @@ LL | type TAI2> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:76:38 + --> $DIR/duplicate.rs:156:38 | LL | type TAI3> = T; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -239,31 +239,31 @@ LL | type TAI3> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:78:44 + --> $DIR/duplicate.rs:160:29 | -LL | type TAW1 where T: Iterator = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:80:44 + --> $DIR/duplicate.rs:165:29 | -LL | type TAW2 where T: Iterator = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:82:47 + --> $DIR/duplicate.rs:170:32 | -LL | type TAW3 where T: Iterator = T; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:85:36 + --> $DIR/duplicate.rs:174:36 | LL | type ETAI1> = impl Copy; | ---------- ^^^^^^^^^^ re-bound here @@ -271,7 +271,7 @@ LL | type ETAI1> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:87:36 + --> $DIR/duplicate.rs:176:36 | LL | type ETAI2> = impl Copy; | ---------- ^^^^^^^^^^ re-bound here @@ -279,7 +279,7 @@ LL | type ETAI2> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:89:39 + --> $DIR/duplicate.rs:178:39 | LL | type ETAI3> = impl Copy; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -287,7 +287,7 @@ LL | type ETAI3> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:91:40 + --> $DIR/duplicate.rs:180:40 | LL | type ETAI4 = impl Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -295,7 +295,7 @@ LL | type ETAI4 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:93:40 + --> $DIR/duplicate.rs:182:40 | LL | type ETAI5 = impl Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -303,7 +303,7 @@ LL | type ETAI5 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:95:43 + --> $DIR/duplicate.rs:184:43 | LL | type ETAI6 = impl Iterator; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -311,7 +311,7 @@ LL | type ETAI6 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:98:36 + --> $DIR/duplicate.rs:187:36 | LL | trait TRI1> {} | ---------- ^^^^^^^^^^ re-bound here @@ -319,7 +319,7 @@ LL | trait TRI1> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:100:36 + --> $DIR/duplicate.rs:189:36 | LL | trait TRI2> {} | ---------- ^^^^^^^^^^ re-bound here @@ -327,7 +327,7 @@ LL | trait TRI2> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:102:39 + --> $DIR/duplicate.rs:191:39 | LL | trait TRI3> {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -335,7 +335,7 @@ LL | trait TRI3> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:104:34 + --> $DIR/duplicate.rs:193:34 | LL | trait TRS1: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -343,7 +343,7 @@ LL | trait TRS1: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:106:34 + --> $DIR/duplicate.rs:195:34 | LL | trait TRS2: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -351,7 +351,7 @@ LL | trait TRS2: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:108:37 + --> $DIR/duplicate.rs:197:37 | LL | trait TRS3: Iterator {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -359,79 +359,79 @@ LL | trait TRS3: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:110:45 + --> $DIR/duplicate.rs:201:29 | -LL | trait TRW1 where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:112:45 + --> $DIR/duplicate.rs:207:29 | -LL | trait TRW2 where T: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:114:48 + --> $DIR/duplicate.rs:213:32 | -LL | trait TRW3 where T: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:116:46 + --> $DIR/duplicate.rs:219:32 | -LL | trait TRSW1 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:116:46 + --> $DIR/duplicate.rs:219:32 | -LL | trait TRSW1 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:119:46 + --> $DIR/duplicate.rs:226:32 | -LL | trait TRSW2 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:119:46 + --> $DIR/duplicate.rs:226:32 | -LL | trait TRSW2 where Self: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:122:49 + --> $DIR/duplicate.rs:233:35 | -LL | trait TRSW3 where Self: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:122:49 + --> $DIR/duplicate.rs:233:35 | -LL | trait TRSW3 where Self: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | Self: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:132:40 + --> $DIR/duplicate.rs:251:40 | LL | type TADyn1 = dyn Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -439,7 +439,7 @@ LL | type TADyn1 = dyn Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:134:44 + --> $DIR/duplicate.rs:253:44 | LL | type TADyn2 = Box>; | ---------- ^^^^^^^^^^ re-bound here @@ -447,7 +447,7 @@ LL | type TADyn2 = Box>; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:136:43 + --> $DIR/duplicate.rs:255:43 | LL | type TADyn3 = dyn Iterator; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -455,28 +455,28 @@ LL | type TADyn3 = dyn Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:125:43 + --> $DIR/duplicate.rs:239:34 | -LL | trait TRA1 { type A: Iterator; } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | type A: Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:127:43 + --> $DIR/duplicate.rs:243:34 | -LL | trait TRA2 { type A: Iterator; } - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | type A: Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:129:46 + --> $DIR/duplicate.rs:247:37 | -LL | trait TRA3 { type A: Iterator; } - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first +LL | type A: Iterator; + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first error: aborting due to 60 previous errors diff --git a/src/test/ui/associated-type-bounds/duplicate.rs b/src/test/ui/associated-type-bounds/duplicate.rs index 0d7804ef1a7d..e1a2ab37a3a3 100644 --- a/src/test/ui/associated-type-bounds/duplicate.rs +++ b/src/test/ui/associated-type-bounds/duplicate.rs @@ -2,49 +2,111 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![feature(untagged_unions)] use std::iter; -struct SI1> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -struct SI2> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -struct SI3> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -struct SW1 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -struct SW2 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -struct SW3 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +struct SI1> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + f: T, +} +struct SI2> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + f: T, +} +struct SI3> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + f: T, +} +struct SW1 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + f: T, +} +struct SW2 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + f: T, +} +struct SW3 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + f: T, +} -enum EI1> { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -enum EI2> { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -enum EI3> { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -enum EW1 where T: Iterator { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -enum EW2 where T: Iterator { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -enum EW3 where T: Iterator { V(T) } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +enum EI1> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + V(T), +} +enum EI2> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + V(T), +} +enum EI3> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + V(T), +} +enum EW1 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + V(T), +} +enum EW2 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + V(T), +} +enum EW3 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + V(T), +} -union UI1> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -union UI2> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -union UI3> { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -union UW1 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -union UW2 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -union UW3 where T: Iterator { f: T } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +union UI1> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + f: T, +} +union UI2> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + f: T, +} +union UI3> { + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + f: T, +} +union UW1 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + f: T, +} +union UW2 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + f: T, +} +union UW3 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ + f: T, +} fn FI1>() {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] @@ -52,16 +114,34 @@ fn FI2>() {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FI3>() {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -fn FW1() where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -fn FW2() where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -fn FW3() where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +fn FW1() +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +fn FW2() +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +fn FW3() +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} -fn FRPIT1() -> impl Iterator { iter::empty() } -fn FRPIT2() -> impl Iterator { iter::empty() } -fn FRPIT3() -> impl Iterator { iter::empty() } +fn FRPIT1() -> impl Iterator { + iter::empty() +} +fn FRPIT2() -> impl Iterator { + iter::empty() +} +fn FRPIT3() -> impl Iterator { + iter::empty() +} fn FAPIT1(_: impl Iterator) {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] fn FAPIT2(_: impl Iterator) {} @@ -75,12 +155,21 @@ fn FAPIT3(_: impl Iterator) {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] type TAI3> = T; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -type TAW1 where T: Iterator = T; +type TAW1 +where + T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -type TAW2 where T: Iterator = T; += T; +type TAW2 +where + T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -type TAW3 where T: Iterator = T; += T; +type TAW3 +where + T: Iterator, //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] += T; type ETAI1> = impl Copy; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] @@ -107,27 +196,57 @@ trait TRS2: Iterator {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] trait TRS3: Iterator {} //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRW1 where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRW2 where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRW3 where T: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRSW1 where Self: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRSW2 where Self: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRSW3 where Self: Iterator {} -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRA1 { type A: Iterator; } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRA2 { type A: Iterator; } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] -trait TRA3 { type A: Iterator; } -//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +trait TRW1 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +trait TRW2 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +trait TRW3 +where + T: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +trait TRSW1 +where + Self: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +trait TRSW2 +where + Self: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +trait TRSW3 +where + Self: Iterator, + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] + //~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +{ +} +trait TRA1 { + type A: Iterator; + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +} +trait TRA2 { + type A: Iterator; + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +} +trait TRA3 { + type A: Iterator; + //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] +} type TADyn1 = dyn Iterator; //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719] diff --git a/src/test/ui/associated-type-bounds/trait-alias-impl-trait.full_tait.stderr b/src/test/ui/associated-type-bounds/trait-alias-impl-trait.full_tait.stderr deleted file mode 100644 index d4da4babf4e1..000000000000 --- a/src/test/ui/associated-type-bounds/trait-alias-impl-trait.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/trait-alias-impl-trait.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs b/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs index cf20631af5bc..9a9031043b65 100644 --- a/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs +++ b/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs @@ -4,36 +4,58 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::ops::Add; -trait Tr1 { type As1; fn mk(self) -> Self::As1; } -trait Tr2<'a> { fn tr2(self) -> &'a Self; } +trait Tr1 { + type As1; + fn mk(self) -> Self::As1; +} +trait Tr2<'a> { + fn tr2(self) -> &'a Self; +} -fn assert_copy(x: T) { let _x = x; let _x = x; } +fn assert_copy(x: T) { + let _x = x; + let _x = x; +} fn assert_static(_: T) {} fn assert_forall_tr2 Tr2<'a>>(_: T) {} struct S1; #[derive(Copy, Clone)] struct S2; -impl Tr1 for S1 { type As1 = S2; fn mk(self) -> Self::As1 { S2 } } +impl Tr1 for S1 { + type As1 = S2; + fn mk(self) -> Self::As1 { + S2 + } +} type Et1 = impl Tr1; -fn def_et1() -> Et1 { S1 } -pub fn use_et1() { assert_copy(def_et1().mk()); } +fn def_et1() -> Et1 { + S1 +} +pub fn use_et1() { + assert_copy(def_et1().mk()); +} type Et2 = impl Tr1; -fn def_et2() -> Et2 { S1 } -pub fn use_et2() { assert_static(def_et2().mk()); } +fn def_et2() -> Et2 { + S1 +} +pub fn use_et2() { + assert_static(def_et2().mk()); +} type Et3 = impl Tr1>>>; fn def_et3() -> Et3 { struct A; impl Tr1 for A { type As1 = core::ops::Range; - fn mk(self) -> Self::As1 { 0..10 } + fn mk(self) -> Self::As1 { + 0..10 + } } A } @@ -53,14 +75,20 @@ fn def_et4() -> Et4 { struct A; impl Tr1 for A { type As1 = A; - fn mk(self) -> A { A } + fn mk(self) -> A { + A + } } impl<'a> Tr2<'a> for A { - fn tr2(self) -> &'a Self { &A } + fn tr2(self) -> &'a Self { + &A + } } A } -pub fn use_et4() { assert_forall_tr2(def_et4().mk()); } +pub fn use_et4() { + assert_forall_tr2(def_et4().mk()); +} fn main() { let _ = use_et1(); diff --git a/src/test/ui/associated-types/issue-63591.full_tait.stderr b/src/test/ui/associated-types/issue-63591.full_tait.stderr deleted file mode 100644 index 9857f7e2677a..000000000000 --- a/src/test/ui/associated-types/issue-63591.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-63591.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/associated-types/issue-63591.rs b/src/test/ui/associated-types/issue-63591.rs index bba9ae2d9e70..04b688674960 100644 --- a/src/test/ui/associated-types/issue-63591.rs +++ b/src/test/ui/associated-types/issue-63591.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/async-await/issues/issue-60655-latebound-regions.full_tait.stderr b/src/test/ui/async-await/issues/issue-60655-latebound-regions.full_tait.stderr deleted file mode 100644 index cc61becd71b1..000000000000 --- a/src/test/ui/async-await/issues/issue-60655-latebound-regions.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-60655-latebound-regions.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs index f8b6a4389616..c132d9b9d7de 100644 --- a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs +++ b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs @@ -6,7 +6,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::future::Future; diff --git a/src/test/ui/generator/layout-error.full_tait.stderr b/src/test/ui/generator/layout-error.full_tait.stderr index bf647d089833..76314611fa21 100644 --- a/src/test/ui/generator/layout-error.full_tait.stderr +++ b/src/test/ui/generator/layout-error.full_tait.stderr @@ -1,18 +1,9 @@ error[E0425]: cannot find value `Foo` in this scope - --> $DIR/layout-error.rs:24:17 + --> $DIR/layout-error.rs:23:17 | LL | let a = Foo; | ^^^ not found in this scope -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/layout-error.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/generator/layout-error.min_tait.stderr b/src/test/ui/generator/layout-error.min_tait.stderr index ed31c260cbc0..09ff1abb8325 100644 --- a/src/test/ui/generator/layout-error.min_tait.stderr +++ b/src/test/ui/generator/layout-error.min_tait.stderr @@ -1,11 +1,11 @@ error[E0425]: cannot find value `Foo` in this scope - --> $DIR/layout-error.rs:24:17 + --> $DIR/layout-error.rs:23:17 | LL | let a = Foo; | ^^^ not found in this scope error[E0658]: type alias impl trait is not permitted here - --> $DIR/layout-error.rs:30:27 + --> $DIR/layout-error.rs:29:27 | LL | Task::spawn(&POOL, || cb()); | ^ diff --git a/src/test/ui/generator/layout-error.rs b/src/test/ui/generator/layout-error.rs index a5efc3899dd4..e8fd4f807e01 100644 --- a/src/test/ui/generator/layout-error.rs +++ b/src/test/ui/generator/layout-error.rs @@ -6,7 +6,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::future::Future; pub struct Task(F); diff --git a/src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr b/src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr index 1e609e838827..4c70dc5e9581 100644 --- a/src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr +++ b/src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/metadata-sufficient-for-layout.rs:10:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: fatal error triggered by #[rustc_error] - --> $DIR/metadata-sufficient-for-layout.rs:28:1 + --> $DIR/metadata-sufficient-for-layout.rs:27:1 | LL | fn main() {} | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr b/src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr index 52d42fd59a00..4c70dc5e9581 100644 --- a/src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr +++ b/src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr @@ -1,5 +1,5 @@ error: fatal error triggered by #[rustc_error] - --> $DIR/metadata-sufficient-for-layout.rs:28:1 + --> $DIR/metadata-sufficient-for-layout.rs:27:1 | LL | fn main() {} | ^^^^^^^^^ diff --git a/src/test/ui/generator/metadata-sufficient-for-layout.rs b/src/test/ui/generator/metadata-sufficient-for-layout.rs index c01354569f07..50093987e4b5 100644 --- a/src/test/ui/generator/metadata-sufficient-for-layout.rs +++ b/src/test/ui/generator/metadata-sufficient-for-layout.rs @@ -8,7 +8,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait, rustc_attrs)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![feature(generator_trait)] extern crate metadata_sufficient_for_layout; diff --git a/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.full_tait.stderr b/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.full_tait.stderr deleted file mode 100644 index 174c4c62da92..000000000000 --- a/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/associated-impl-trait-type-generic-trait.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs b/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs index b2dad596ffa9..fb816fb39e68 100644 --- a/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs +++ b/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/impl-trait/associated-impl-trait-type-trivial.full_tait.stderr b/src/test/ui/impl-trait/associated-impl-trait-type-trivial.full_tait.stderr deleted file mode 100644 index e3dd4a60b4df..000000000000 --- a/src/test/ui/impl-trait/associated-impl-trait-type-trivial.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/associated-impl-trait-type-trivial.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs b/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs index c101ba229483..57747b286bf9 100644 --- a/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs +++ b/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/impl-trait/associated-impl-trait-type.full_tait.stderr b/src/test/ui/impl-trait/associated-impl-trait-type.full_tait.stderr deleted file mode 100644 index 39147b00a346..000000000000 --- a/src/test/ui/impl-trait/associated-impl-trait-type.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/associated-impl-trait-type.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/impl-trait/associated-impl-trait-type.rs b/src/test/ui/impl-trait/associated-impl-trait-type.rs index 5c28eba2261f..39e98ebe665b 100644 --- a/src/test/ui/impl-trait/associated-impl-trait-type.rs +++ b/src/test/ui/impl-trait/associated-impl-trait-type.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/impl-trait/auto-trait.full_tait.stderr b/src/test/ui/impl-trait/auto-trait.full_tait.stderr index 314617748b0b..3f25ca4b327f 100644 --- a/src/test/ui/impl-trait/auto-trait.full_tait.stderr +++ b/src/test/ui/impl-trait/auto-trait.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/auto-trait.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/auto-trait.rs:24:1 + --> $DIR/auto-trait.rs:23:1 | LL | impl AnotherTrait for T {} | -------------------------------- first implementation here @@ -16,6 +7,6 @@ LL | impl AnotherTrait for T {} LL | impl AnotherTrait for D { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D` -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/impl-trait/auto-trait.min_tait.stderr b/src/test/ui/impl-trait/auto-trait.min_tait.stderr index 75a5b0cb87db..3f25ca4b327f 100644 --- a/src/test/ui/impl-trait/auto-trait.min_tait.stderr +++ b/src/test/ui/impl-trait/auto-trait.min_tait.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/auto-trait.rs:24:1 + --> $DIR/auto-trait.rs:23:1 | LL | impl AnotherTrait for T {} | -------------------------------- first implementation here diff --git a/src/test/ui/impl-trait/auto-trait.rs b/src/test/ui/impl-trait/auto-trait.rs index c965a34c12b3..59bd09e348a9 100644 --- a/src/test/ui/impl-trait/auto-trait.rs +++ b/src/test/ui/impl-trait/auto-trait.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait OpaqueTrait {} impl OpaqueTrait for T {} diff --git a/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr b/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr index 286dd7aafb43..94d73be195cf 100644 --- a/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr +++ b/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-55872-1.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-55872-1.rs:17:5 + --> $DIR/issue-55872-1.rs:16:5 | LL | fn foo() -> Self::E; | ----------------------- definition of `foo` from trait @@ -17,7 +8,7 @@ LL | fn foo() -> Self::E { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default` error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:13:14 + --> $DIR/issue-55872-1.rs:12:14 | LL | type E = impl Copy; | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` @@ -29,7 +20,7 @@ LL | impl Bar for S { | ^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:13:14 + --> $DIR/issue-55872-1.rs:12:14 | LL | type E = impl Copy; | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` @@ -41,7 +32,7 @@ LL | fn foo() -> Self::E { | ^^^^^^^^^^^^^^^^^^^ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-1.rs:17:37 + --> $DIR/issue-55872-1.rs:16:37 | LL | fn foo() -> Self::E { | _____________________________________^ @@ -51,7 +42,7 @@ LL | | (S::default(), T::default()) LL | | } | |_____^ -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors Some errors have detailed explanations: E0276, E0277. For more information about an error, try `rustc --explain E0276`. diff --git a/src/test/ui/impl-trait/issue-55872-1.min_tait.stderr b/src/test/ui/impl-trait/issue-55872-1.min_tait.stderr index 653299f4cbce..94d73be195cf 100644 --- a/src/test/ui/impl-trait/issue-55872-1.min_tait.stderr +++ b/src/test/ui/impl-trait/issue-55872-1.min_tait.stderr @@ -1,5 +1,5 @@ error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-55872-1.rs:17:5 + --> $DIR/issue-55872-1.rs:16:5 | LL | fn foo() -> Self::E; | ----------------------- definition of `foo` from trait @@ -8,7 +8,7 @@ LL | fn foo() -> Self::E { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default` error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:13:14 + --> $DIR/issue-55872-1.rs:12:14 | LL | type E = impl Copy; | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` @@ -20,7 +20,7 @@ LL | impl Bar for S { | ^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:13:14 + --> $DIR/issue-55872-1.rs:12:14 | LL | type E = impl Copy; | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` @@ -32,7 +32,7 @@ LL | fn foo() -> Self::E { | ^^^^^^^^^^^^^^^^^^^ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-1.rs:17:37 + --> $DIR/issue-55872-1.rs:16:37 | LL | fn foo() -> Self::E { | _____________________________________^ diff --git a/src/test/ui/impl-trait/issue-55872-1.rs b/src/test/ui/impl-trait/issue-55872-1.rs index a9e9c9b5bebe..c6a331e58fee 100644 --- a/src/test/ui/impl-trait/issue-55872-1.rs +++ b/src/test/ui/impl-trait/issue-55872-1.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub trait Bar { type E: Copy; diff --git a/src/test/ui/impl-trait/issue-55872-2.full_tait.stderr b/src/test/ui/impl-trait/issue-55872-2.full_tait.stderr index a8fc681a093d..305e916c9a98 100644 --- a/src/test/ui/impl-trait/issue-55872-2.full_tait.stderr +++ b/src/test/ui/impl-trait/issue-55872-2.full_tait.stderr @@ -1,20 +1,11 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-55872-2.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0277]: the trait bound `impl Future: Copy` is not satisfied - --> $DIR/issue-55872-2.rs:16:14 + --> $DIR/issue-55872-2.rs:15:14 | LL | type E = impl std::marker::Copy; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future` error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-2.rs:18:28 + --> $DIR/issue-55872-2.rs:17:28 | LL | fn foo() -> Self::E { | ____________________________^ @@ -23,6 +14,6 @@ LL | | async {} LL | | } | |_____^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/issue-55872-2.min_tait.stderr b/src/test/ui/impl-trait/issue-55872-2.min_tait.stderr index 57f81443dccd..305e916c9a98 100644 --- a/src/test/ui/impl-trait/issue-55872-2.min_tait.stderr +++ b/src/test/ui/impl-trait/issue-55872-2.min_tait.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `impl Future: Copy` is not satisfied - --> $DIR/issue-55872-2.rs:16:14 + --> $DIR/issue-55872-2.rs:15:14 | LL | type E = impl std::marker::Copy; | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future` error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-2.rs:18:28 + --> $DIR/issue-55872-2.rs:17:28 | LL | fn foo() -> Self::E { | ____________________________^ diff --git a/src/test/ui/impl-trait/issue-55872-2.rs b/src/test/ui/impl-trait/issue-55872-2.rs index cd72b2eec3cf..44839e5e845a 100644 --- a/src/test/ui/impl-trait/issue-55872-2.rs +++ b/src/test/ui/impl-trait/issue-55872-2.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub trait Bar { type E: Copy; diff --git a/src/test/ui/impl-trait/issue-55872.full_tait.stderr b/src/test/ui/impl-trait/issue-55872.full_tait.stderr index e549fec1c229..3fffd09836b2 100644 --- a/src/test/ui/impl-trait/issue-55872.full_tait.stderr +++ b/src/test/ui/impl-trait/issue-55872.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-55872.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872.rs:16:28 + --> $DIR/issue-55872.rs:15:28 | LL | fn foo() -> Self::E { | ____________________________^ @@ -17,5 +8,5 @@ LL | | || () LL | | } | |_____^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/impl-trait/issue-55872.min_tait.stderr b/src/test/ui/impl-trait/issue-55872.min_tait.stderr index 341dba95cad8..3fffd09836b2 100644 --- a/src/test/ui/impl-trait/issue-55872.min_tait.stderr +++ b/src/test/ui/impl-trait/issue-55872.min_tait.stderr @@ -1,5 +1,5 @@ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872.rs:16:28 + --> $DIR/issue-55872.rs:15:28 | LL | fn foo() -> Self::E { | ____________________________^ diff --git a/src/test/ui/impl-trait/issue-55872.rs b/src/test/ui/impl-trait/issue-55872.rs index e3fc523feccb..049d61a425e3 100644 --- a/src/test/ui/impl-trait/issue-55872.rs +++ b/src/test/ui/impl-trait/issue-55872.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub trait Bar { type E: Copy; @@ -14,7 +13,7 @@ impl Bar for S { type E = impl Copy; fn foo() -> Self::E { - //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias || () } } diff --git a/src/test/ui/impl-trait/issues/issue-53457.full_tait.stderr b/src/test/ui/impl-trait/issues/issue-53457.full_tait.stderr deleted file mode 100644 index 906578c291f1..000000000000 --- a/src/test/ui/impl-trait/issues/issue-53457.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-53457.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/impl-trait/issues/issue-53457.rs b/src/test/ui/impl-trait/issues/issue-53457.rs index c44e7f01f25d..c6d7be47dfe6 100644 --- a/src/test/ui/impl-trait/issues/issue-53457.rs +++ b/src/test/ui/impl-trait/issues/issue-53457.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type X = impl Clone; diff --git a/src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr b/src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr index 728644f75799..b446eae9c3f1 100644 --- a/src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr +++ b/src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-78722.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0308]: mismatched types - --> $DIR/issue-78722.rs:15:20 + --> $DIR/issue-78722.rs:14:20 | LL | type F = impl core::future::Future; | -------------------------------------- the expected opaque type @@ -23,10 +14,10 @@ LL | let f: F = async { 1 }; LL | pub const fn from_generator(gen: T) -> impl Future | ------------------------------- the found opaque type | - = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:8:10>) + = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:7:10>) found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>) = note: distinct uses of `impl Trait` result in different opaque types -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr b/src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr index 221b23ae3d2a..b446eae9c3f1 100644 --- a/src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr +++ b/src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-78722.rs:15:20 + --> $DIR/issue-78722.rs:14:20 | LL | type F = impl core::future::Future; | -------------------------------------- the expected opaque type @@ -14,7 +14,7 @@ LL | let f: F = async { 1 }; LL | pub const fn from_generator(gen: T) -> impl Future | ------------------------------- the found opaque type | - = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:8:10>) + = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:7:10>) found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>) = note: distinct uses of `impl Trait` result in different opaque types diff --git a/src/test/ui/impl-trait/issues/issue-78722.rs b/src/test/ui/impl-trait/issues/issue-78722.rs index 480b55eed21e..0b8569b6e5fa 100644 --- a/src/test/ui/impl-trait/issues/issue-78722.rs +++ b/src/test/ui/impl-trait/issues/issue-78722.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type F = impl core::future::Future; diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr index b2ebc7230b94..52ab9baff8b8 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/error-handling-2.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/error-handling-2.rs:16:60 + --> $DIR/error-handling-2.rs:15:60 | LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { | ^^^^^^^^^ | -note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 16:8 - --> $DIR/error-handling-2.rs:16:8 +note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 15:8 + --> $DIR/error-handling-2.rs:15:8 | LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { | ^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0700`. diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr index 53745c290d03..52ab9baff8b8 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr @@ -1,11 +1,11 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/error-handling-2.rs:16:60 + --> $DIR/error-handling-2.rs:15:60 | LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { | ^^^^^^^^^ | -note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 16:8 - --> $DIR/error-handling-2.rs:16:8 +note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 15:8 + --> $DIR/error-handling-2.rs:15:8 | LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { | ^^ diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs index 196ddf9b8e4a..cfc493928c07 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #[derive(Clone)] struct CopyIfEq(T, U); diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr index ff99d037d198..cdcb7d7c38ee 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/error-handling.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: lifetime may not live long enough - --> $DIR/error-handling.rs:25:16 + --> $DIR/error-handling.rs:24:16 | LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { | -- -- lifetime `'b` defined here @@ -20,5 +11,5 @@ LL | let _: &'b i32 = *u.0; | = help: consider adding the following bound: `'a: 'b` -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr index 4b23ba81604a..cdcb7d7c38ee 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/error-handling.rs:25:16 + --> $DIR/error-handling.rs:24:16 | LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { | -- -- lifetime `'b` defined here diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs index 1ead78e02ed4..23d5c9da3113 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #[derive(Clone)] struct CopyIfEq(T, U); diff --git a/src/test/ui/impl-trait/negative-reasoning.full_tait.stderr b/src/test/ui/impl-trait/negative-reasoning.full_tait.stderr index bccbc8cb36b1..edecdd061e1a 100644 --- a/src/test/ui/impl-trait/negative-reasoning.full_tait.stderr +++ b/src/test/ui/impl-trait/negative-reasoning.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/negative-reasoning.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/negative-reasoning.rs:22:1 + --> $DIR/negative-reasoning.rs:21:1 | LL | impl AnotherTrait for T {} | ------------------------------------------- first implementation here @@ -18,6 +9,6 @@ LL | impl AnotherTrait for D { | = note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `impl OpaqueTrait` in future versions -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/impl-trait/negative-reasoning.min_tait.stderr b/src/test/ui/impl-trait/negative-reasoning.min_tait.stderr index 5727a372ddbe..edecdd061e1a 100644 --- a/src/test/ui/impl-trait/negative-reasoning.min_tait.stderr +++ b/src/test/ui/impl-trait/negative-reasoning.min_tait.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/negative-reasoning.rs:22:1 + --> $DIR/negative-reasoning.rs:21:1 | LL | impl AnotherTrait for T {} | ------------------------------------------- first implementation here diff --git a/src/test/ui/impl-trait/negative-reasoning.rs b/src/test/ui/impl-trait/negative-reasoning.rs index 7f608cc99db1..0838f32b932b 100644 --- a/src/test/ui/impl-trait/negative-reasoning.rs +++ b/src/test/ui/impl-trait/negative-reasoning.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait OpaqueTrait {} impl OpaqueTrait for T {} diff --git a/src/test/ui/impl-trait/type-alias-generic-param.full_tait.stderr b/src/test/ui/impl-trait/type-alias-generic-param.full_tait.stderr deleted file mode 100644 index 965e3e4887bb..000000000000 --- a/src/test/ui/impl-trait/type-alias-generic-param.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-generic-param.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/impl-trait/type-alias-generic-param.rs b/src/test/ui/impl-trait/type-alias-generic-param.rs index 733e10e56f88..9cb9a6de2d6f 100644 --- a/src/test/ui/impl-trait/type-alias-generic-param.rs +++ b/src/test/ui/impl-trait/type-alias-generic-param.rs @@ -6,7 +6,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Meow { type MeowType; @@ -14,7 +13,8 @@ trait Meow { } impl Meow for I - where I: Iterator +where + I: Iterator, { type MeowType = impl Iterator; fn meow(self) -> Self::MeowType { diff --git a/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.full_tait.stderr b/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.full_tait.stderr deleted file mode 100644 index ec939e5718a9..000000000000 --- a/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-in-fn-body.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs b/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs index 32ca4af30434..996840dc1960 100644 --- a/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs +++ b/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/issues/issue-60662.full_tait.stderr b/src/test/ui/issues/issue-60662.full_tait.stderr deleted file mode 100644 index a448f85b7625..000000000000 --- a/src/test/ui/issues/issue-60662.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-60662.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/issues/issue-60662.rs b/src/test/ui/issues/issue-60662.rs index 1320d2bbe93d..5079e33650f7 100644 --- a/src/test/ui/issues/issue-60662.rs +++ b/src/test/ui/issues/issue-60662.rs @@ -4,10 +4,8 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete -trait Animal { -} +trait Animal {} fn main() { pub type ServeFut = impl Animal; diff --git a/src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr b/src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr index 65b4631010f2..d17c05ef2983 100644 --- a/src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr +++ b/src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr @@ -1,20 +1,11 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/inline-trait-and-foreign-items.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:10:5 + --> $DIR/inline-trait-and-foreign-items.rs:9:5 | LL | #[inline] | ^^^^^^^^^ | note: the lint level is defined here - --> $DIR/inline-trait-and-foreign-items.rs:7:9 + --> $DIR/inline-trait-and-foreign-items.rs:6:9 | LL | #![warn(unused_attributes)] | ^^^^^^^^^^^^^^^^^ @@ -22,7 +13,7 @@ LL | #![warn(unused_attributes)] = note: see issue #65833 for more information error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:14:5 + --> $DIR/inline-trait-and-foreign-items.rs:13:5 | LL | #[inline] | ^^^^^^^^^ @@ -30,7 +21,7 @@ LL | type T; | ------- not a function or closure warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:21:5 + --> $DIR/inline-trait-and-foreign-items.rs:20:5 | LL | #[inline] | ^^^^^^^^^ @@ -39,7 +30,7 @@ LL | #[inline] = note: see issue #65833 for more information error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:25:5 + --> $DIR/inline-trait-and-foreign-items.rs:24:5 | LL | #[inline] | ^^^^^^^^^ @@ -47,7 +38,7 @@ LL | type T = Self; | -------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:28:5 + --> $DIR/inline-trait-and-foreign-items.rs:27:5 | LL | #[inline] | ^^^^^^^^^ @@ -55,7 +46,7 @@ LL | type U = impl Trait; | -------------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:33:5 + --> $DIR/inline-trait-and-foreign-items.rs:32:5 | LL | #[inline] | ^^^^^^^^^ @@ -63,7 +54,7 @@ LL | static X: u32; | -------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:36:5 + --> $DIR/inline-trait-and-foreign-items.rs:35:5 | LL | #[inline] | ^^^^^^^^^ @@ -71,11 +62,11 @@ LL | type T; | ------- not a function or closure error: could not find defining uses - --> $DIR/inline-trait-and-foreign-items.rs:29:14 + --> $DIR/inline-trait-and-foreign-items.rs:28:14 | LL | type U = impl Trait; | ^^^^^^^^^^ -error: aborting due to 6 previous errors; 3 warnings emitted +error: aborting due to 6 previous errors; 2 warnings emitted For more information about this error, try `rustc --explain E0518`. diff --git a/src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr b/src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr index b9f123905a70..d17c05ef2983 100644 --- a/src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr +++ b/src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr @@ -1,11 +1,11 @@ warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:10:5 + --> $DIR/inline-trait-and-foreign-items.rs:9:5 | LL | #[inline] | ^^^^^^^^^ | note: the lint level is defined here - --> $DIR/inline-trait-and-foreign-items.rs:7:9 + --> $DIR/inline-trait-and-foreign-items.rs:6:9 | LL | #![warn(unused_attributes)] | ^^^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ LL | #![warn(unused_attributes)] = note: see issue #65833 for more information error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:14:5 + --> $DIR/inline-trait-and-foreign-items.rs:13:5 | LL | #[inline] | ^^^^^^^^^ @@ -21,7 +21,7 @@ LL | type T; | ------- not a function or closure warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:21:5 + --> $DIR/inline-trait-and-foreign-items.rs:20:5 | LL | #[inline] | ^^^^^^^^^ @@ -30,7 +30,7 @@ LL | #[inline] = note: see issue #65833 for more information error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:25:5 + --> $DIR/inline-trait-and-foreign-items.rs:24:5 | LL | #[inline] | ^^^^^^^^^ @@ -38,7 +38,7 @@ LL | type T = Self; | -------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:28:5 + --> $DIR/inline-trait-and-foreign-items.rs:27:5 | LL | #[inline] | ^^^^^^^^^ @@ -46,7 +46,7 @@ LL | type U = impl Trait; | -------------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:33:5 + --> $DIR/inline-trait-and-foreign-items.rs:32:5 | LL | #[inline] | ^^^^^^^^^ @@ -54,7 +54,7 @@ LL | static X: u32; | -------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:36:5 + --> $DIR/inline-trait-and-foreign-items.rs:35:5 | LL | #[inline] | ^^^^^^^^^ @@ -62,7 +62,7 @@ LL | type T; | ------- not a function or closure error: could not find defining uses - --> $DIR/inline-trait-and-foreign-items.rs:29:14 + --> $DIR/inline-trait-and-foreign-items.rs:28:14 | LL | type U = impl Trait; | ^^^^^^^^^^ diff --git a/src/test/ui/lint/inline-trait-and-foreign-items.rs b/src/test/ui/lint/inline-trait-and-foreign-items.rs index 3103cc9d31dc..9d9579ec26c2 100644 --- a/src/test/ui/lint/inline-trait-and-foreign-items.rs +++ b/src/test/ui/lint/inline-trait-and-foreign-items.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![warn(unused_attributes)] diff --git a/src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr index 619ca15839b3..0e02b7bf4d9a 100644 --- a/src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/lint-ctypes-73249-2.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-2.rs:29:25 + --> $DIR/lint-ctypes-73249-2.rs:28:25 | LL | pub fn lint_me() -> A<()>; | ^^^^^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73249-2.rs:5:9 + --> $DIR/lint-ctypes-73249-2.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = note: opaque types have no C equivalent -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr index 479bd5744735..0e02b7bf4d9a 100644 --- a/src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr @@ -1,11 +1,11 @@ error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-2.rs:29:25 + --> $DIR/lint-ctypes-73249-2.rs:28:25 | LL | pub fn lint_me() -> A<()>; | ^^^^^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73249-2.rs:5:9 + --> $DIR/lint-ctypes-73249-2.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-ctypes-73249-2.rs b/src/test/ui/lint/lint-ctypes-73249-2.rs index f3313f892175..8535307756ba 100644 --- a/src/test/ui/lint/lint-ctypes-73249-2.rs +++ b/src/test/ui/lint/lint-ctypes-73249-2.rs @@ -1,12 +1,11 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(improper_ctypes)] -pub trait Baz { } +pub trait Baz {} -impl Baz for () { } +impl Baz for () {} type Qux = impl Baz; diff --git a/src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr index af0f26a9f43e..60661e96ddf3 100644 --- a/src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/lint-ctypes-73249-3.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-3.rs:21:25 + --> $DIR/lint-ctypes-73249-3.rs:22:25 | LL | pub fn lint_me() -> A; | ^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73249-3.rs:5:9 + --> $DIR/lint-ctypes-73249-3.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = note: opaque types have no C equivalent -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr index 880581ff05d2..60661e96ddf3 100644 --- a/src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr @@ -1,11 +1,11 @@ error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-3.rs:21:25 + --> $DIR/lint-ctypes-73249-3.rs:22:25 | LL | pub fn lint_me() -> A; | ^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73249-3.rs:5:9 + --> $DIR/lint-ctypes-73249-3.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-ctypes-73249-3.rs b/src/test/ui/lint/lint-ctypes-73249-3.rs index 966c7d5ce3cb..287287d449cf 100644 --- a/src/test/ui/lint/lint-ctypes-73249-3.rs +++ b/src/test/ui/lint/lint-ctypes-73249-3.rs @@ -1,16 +1,17 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(improper_ctypes)] -pub trait Baz { } +pub trait Baz {} -impl Baz for u32 { } +impl Baz for u32 {} type Qux = impl Baz; -fn assign() -> Qux { 3 } +fn assign() -> Qux { + 3 +} #[repr(C)] pub struct A { diff --git a/src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr index b80084fce068..aa1238a75121 100644 --- a/src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/lint-ctypes-73249-5.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-5.rs:21:25 + --> $DIR/lint-ctypes-73249-5.rs:22:25 | LL | pub fn lint_me() -> A; | ^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73249-5.rs:5:9 + --> $DIR/lint-ctypes-73249-5.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = note: opaque types have no C equivalent -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr index f42549d90965..aa1238a75121 100644 --- a/src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr @@ -1,11 +1,11 @@ error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-5.rs:21:25 + --> $DIR/lint-ctypes-73249-5.rs:22:25 | LL | pub fn lint_me() -> A; | ^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73249-5.rs:5:9 + --> $DIR/lint-ctypes-73249-5.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-ctypes-73249-5.rs b/src/test/ui/lint/lint-ctypes-73249-5.rs index 81979a9b6e69..b877364d9b6f 100644 --- a/src/test/ui/lint/lint-ctypes-73249-5.rs +++ b/src/test/ui/lint/lint-ctypes-73249-5.rs @@ -1,16 +1,17 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(improper_ctypes)] -pub trait Baz { } +pub trait Baz {} -impl Baz for u32 { } +impl Baz for u32 {} type Qux = impl Baz; -fn assign() -> Qux { 3 } +fn assign() -> Qux { + 3 +} #[repr(transparent)] pub struct A { diff --git a/src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr index 5610230380b8..33f2ee59577d 100644 --- a/src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/lint-ctypes-73251-1.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-1.rs:24:25 + --> $DIR/lint-ctypes-73251-1.rs:25:25 | LL | pub fn lint_me() -> ::Assoc; | ^^^^^^^^^^^^^^^^^^^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73251-1.rs:5:9 + --> $DIR/lint-ctypes-73251-1.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = note: opaque types have no C equivalent -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr index 5b00fc4cce65..33f2ee59577d 100644 --- a/src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr @@ -1,11 +1,11 @@ error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-1.rs:24:25 + --> $DIR/lint-ctypes-73251-1.rs:25:25 | LL | pub fn lint_me() -> ::Assoc; | ^^^^^^^^^^^^^^^^^^^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73251-1.rs:5:9 + --> $DIR/lint-ctypes-73251-1.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-ctypes-73251-1.rs b/src/test/ui/lint/lint-ctypes-73251-1.rs index 3f15a2fb42c4..042878c97780 100644 --- a/src/test/ui/lint/lint-ctypes-73251-1.rs +++ b/src/test/ui/lint/lint-ctypes-73251-1.rs @@ -1,12 +1,11 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(improper_ctypes)] -pub trait Baz { } +pub trait Baz {} -impl Baz for u32 { } +impl Baz for u32 {} type Qux = impl Baz; @@ -18,7 +17,9 @@ impl Foo for u32 { type Assoc = Qux; } -fn assign() -> Qux { 1 } +fn assign() -> Qux { + 1 +} extern "C" { pub fn lint_me() -> ::Assoc; //~ ERROR: uses type `impl Baz` diff --git a/src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr index 19911264a36d..152aaa183e35 100644 --- a/src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/lint-ctypes-73251-2.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `extern` block uses type `impl TraitA`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-2.rs:32:25 + --> $DIR/lint-ctypes-73251-2.rs:38:25 | LL | pub fn lint_me() -> ::Assoc; | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73251-2.rs:5:9 + --> $DIR/lint-ctypes-73251-2.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = note: opaque types have no C equivalent -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr index 4130ee7b4cb6..152aaa183e35 100644 --- a/src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr +++ b/src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr @@ -1,11 +1,11 @@ error: `extern` block uses type `impl TraitA`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-2.rs:32:25 + --> $DIR/lint-ctypes-73251-2.rs:38:25 | LL | pub fn lint_me() -> ::Assoc; | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe | note: the lint level is defined here - --> $DIR/lint-ctypes-73251-2.rs:5:9 + --> $DIR/lint-ctypes-73251-2.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/lint-ctypes-73251-2.rs b/src/test/ui/lint/lint-ctypes-73251-2.rs index 888671daca5e..5a124b2fea50 100644 --- a/src/test/ui/lint/lint-ctypes-73251-2.rs +++ b/src/test/ui/lint/lint-ctypes-73251-2.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(improper_ctypes)] pub trait TraitA { @@ -16,7 +15,10 @@ pub trait TraitB { type Assoc; } -impl TraitB for T where T: TraitA { +impl TraitB for T +where + T: TraitA, +{ type Assoc = ::Assoc; } @@ -24,9 +26,13 @@ impl TraitB for T where T: TraitA { type AliasB = impl TraitB; -fn use_of_a() -> AliasA { 3 } +fn use_of_a() -> AliasA { + 3 +} -fn use_of_b() -> AliasB { 3 } +fn use_of_b() -> AliasB { + 3 +} extern "C" { pub fn lint_me() -> ::Assoc; //~ ERROR: uses type `impl TraitA` diff --git a/src/test/ui/lint/lint-ctypes-73251.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73251.full_tait.stderr deleted file mode 100644 index 577cf6cf5453..000000000000 --- a/src/test/ui/lint/lint-ctypes-73251.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/lint-ctypes-73251.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/lint/lint-ctypes-73251.rs b/src/test/ui/lint/lint-ctypes-73251.rs index 36e541612d16..24742b64f8e9 100644 --- a/src/test/ui/lint/lint-ctypes-73251.rs +++ b/src/test/ui/lint/lint-ctypes-73251.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(improper_ctypes)] pub trait Foo { diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr b/src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr index 5433d6e6ae24..d7b916f8ad58 100644 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr +++ b/src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/opaque-ty-ffi-unsafe.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `extern` block uses type `impl Fn<()>`, which is not FFI-safe - --> $DIR/opaque-ty-ffi-unsafe.rs:14:17 + --> $DIR/opaque-ty-ffi-unsafe.rs:13:17 | LL | pub fn a(_: A); | ^ not FFI-safe | note: the lint level is defined here - --> $DIR/opaque-ty-ffi-unsafe.rs:5:9 + --> $DIR/opaque-ty-ffi-unsafe.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ = note: opaque types have no C equivalent -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr b/src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr index 2f20912d2a6e..d7b916f8ad58 100644 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr +++ b/src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr @@ -1,11 +1,11 @@ error: `extern` block uses type `impl Fn<()>`, which is not FFI-safe - --> $DIR/opaque-ty-ffi-unsafe.rs:14:17 + --> $DIR/opaque-ty-ffi-unsafe.rs:13:17 | LL | pub fn a(_: A); | ^ not FFI-safe | note: the lint level is defined here - --> $DIR/opaque-ty-ffi-unsafe.rs:5:9 + --> $DIR/opaque-ty-ffi-unsafe.rs:4:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.rs b/src/test/ui/lint/opaque-ty-ffi-unsafe.rs index 0e9df9195523..0c9fed8b98c2 100644 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.rs +++ b/src/test/ui/lint/opaque-ty-ffi-unsafe.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(improper_ctypes)] type A = impl Fn(); @@ -12,7 +11,7 @@ pub fn ret_closure() -> A { extern "C" { pub fn a(_: A); -//~^ ERROR `extern` block uses type `impl Fn<()>`, which is not FFI-safe + //~^ ERROR `extern` block uses type `impl Fn<()>`, which is not FFI-safe } fn main() {} diff --git a/src/test/ui/mir/issue-75053.full_tait.stderr b/src/test/ui/mir/issue-75053.full_tait.stderr index 543d15fadc6b..e2a5b8876e3e 100644 --- a/src/test/ui/mir/issue-75053.full_tait.stderr +++ b/src/test/ui/mir/issue-75053.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-75053.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: fatal error triggered by #[rustc_error] - --> $DIR/issue-75053.rs:49:1 + --> $DIR/issue-75053.rs:48:1 | LL | fn main() { | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/mir/issue-75053.min_tait.stderr b/src/test/ui/mir/issue-75053.min_tait.stderr index c533275c99a7..e2a5b8876e3e 100644 --- a/src/test/ui/mir/issue-75053.min_tait.stderr +++ b/src/test/ui/mir/issue-75053.min_tait.stderr @@ -1,5 +1,5 @@ error: fatal error triggered by #[rustc_error] - --> $DIR/issue-75053.rs:49:1 + --> $DIR/issue-75053.rs:48:1 | LL | fn main() { | ^^^^^^^^^ diff --git a/src/test/ui/mir/issue-75053.rs b/src/test/ui/mir/issue-75053.rs index b71f84dd9c24..bcd689775a09 100644 --- a/src/test/ui/mir/issue-75053.rs +++ b/src/test/ui/mir/issue-75053.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait, rustc_attrs)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::marker::PhantomData; diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr index a74c7c93a2eb..f1f95c72150f 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr +++ b/src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/private-in-public-assoc-ty.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:20:9 + --> $DIR/private-in-public-assoc-ty.rs:19:9 | LL | struct Priv; | ------------ `Priv` declared as private @@ -17,7 +8,7 @@ LL | type A = Priv; | ^^^^^^^^^^^^^^ can't leak private type warning: private trait `PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-assoc-ty.rs:27:9 + --> $DIR/private-in-public-assoc-ty.rs:26:9 | LL | type Alias1: PrivTr; | ^^^^^^^^^^^^^^^^^^^^ @@ -27,7 +18,7 @@ LL | type Alias1: PrivTr; = note: for more information, see issue #34537 warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:30:9 + --> $DIR/private-in-public-assoc-ty.rs:29:9 | LL | type Alias2: PubTrAux1 = u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -36,7 +27,7 @@ LL | type Alias2: PubTrAux1 = u8; = note: for more information, see issue #34537 warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:33:9 + --> $DIR/private-in-public-assoc-ty.rs:32:9 | LL | type Alias3: PubTrAux2 = u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -45,7 +36,7 @@ LL | type Alias3: PubTrAux2 = u8; = note: for more information, see issue #34537 error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:37:9 + --> $DIR/private-in-public-assoc-ty.rs:36:9 | LL | struct Priv; | ------------ `Priv` declared as private @@ -54,7 +45,7 @@ LL | type Alias4 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:44:9 + --> $DIR/private-in-public-assoc-ty.rs:43:9 | LL | struct Priv; | ------------ `Priv` declared as private @@ -63,7 +54,7 @@ LL | type Alias1 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `PrivTr` in public interface - --> $DIR/private-in-public-assoc-ty.rs:47:9 + --> $DIR/private-in-public-assoc-ty.rs:46:9 | LL | trait PrivTr {} | ------------ `PrivTr` declared as private @@ -71,7 +62,7 @@ LL | trait PrivTr {} LL | type Exist = impl PrivTr; | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait -error: aborting due to 4 previous errors; 4 warnings emitted +error: aborting due to 4 previous errors; 3 warnings emitted Some errors have detailed explanations: E0445, E0446. For more information about an error, try `rustc --explain E0445`. diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr index 36230ffd04b7..f1f95c72150f 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr +++ b/src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr @@ -1,5 +1,5 @@ error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:20:9 + --> $DIR/private-in-public-assoc-ty.rs:19:9 | LL | struct Priv; | ------------ `Priv` declared as private @@ -8,7 +8,7 @@ LL | type A = Priv; | ^^^^^^^^^^^^^^ can't leak private type warning: private trait `PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-assoc-ty.rs:27:9 + --> $DIR/private-in-public-assoc-ty.rs:26:9 | LL | type Alias1: PrivTr; | ^^^^^^^^^^^^^^^^^^^^ @@ -18,7 +18,7 @@ LL | type Alias1: PrivTr; = note: for more information, see issue #34537 warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:30:9 + --> $DIR/private-in-public-assoc-ty.rs:29:9 | LL | type Alias2: PubTrAux1 = u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -27,7 +27,7 @@ LL | type Alias2: PubTrAux1 = u8; = note: for more information, see issue #34537 warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:33:9 + --> $DIR/private-in-public-assoc-ty.rs:32:9 | LL | type Alias3: PubTrAux2 = u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -36,7 +36,7 @@ LL | type Alias3: PubTrAux2 = u8; = note: for more information, see issue #34537 error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:37:9 + --> $DIR/private-in-public-assoc-ty.rs:36:9 | LL | struct Priv; | ------------ `Priv` declared as private @@ -45,7 +45,7 @@ LL | type Alias4 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:44:9 + --> $DIR/private-in-public-assoc-ty.rs:43:9 | LL | struct Priv; | ------------ `Priv` declared as private @@ -54,7 +54,7 @@ LL | type Alias1 = Priv; | ^^^^^^^^^^^^^^^^^^^ can't leak private type error[E0445]: private trait `PrivTr` in public interface - --> $DIR/private-in-public-assoc-ty.rs:47:9 + --> $DIR/private-in-public-assoc-ty.rs:46:9 | LL | trait PrivTr {} | ------------ `PrivTr` declared as private diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.rs b/src/test/ui/privacy/private-in-public-assoc-ty.rs index f8fb56594309..dd2dcc6a2ea9 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.rs +++ b/src/test/ui/privacy/private-in-public-assoc-ty.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete mod m { struct Priv; diff --git a/src/test/ui/privacy/private-in-public-type-alias-impl-trait.full_tait.stderr b/src/test/ui/privacy/private-in-public-type-alias-impl-trait.full_tait.stderr deleted file mode 100644 index c419c7ee4d44..000000000000 --- a/src/test/ui/privacy/private-in-public-type-alias-impl-trait.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/private-in-public-type-alias-impl-trait.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs b/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs index 8443631253f7..91dade4a2c14 100644 --- a/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs +++ b/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![deny(private_in_public)] pub type Pub = impl Default; @@ -22,7 +21,9 @@ pub trait Trait { impl Trait for u8 { type Pub = impl Default; - fn method() -> Self::Pub { Priv } + fn method() -> Self::Pub { + Priv + } } fn main() {} diff --git a/src/test/ui/save-analysis/issue-68621.full_tait.stderr b/src/test/ui/save-analysis/issue-68621.full_tait.stderr index 193aed2615ce..9206f6834501 100644 --- a/src/test/ui/save-analysis/issue-68621.full_tait.stderr +++ b/src/test/ui/save-analysis/issue-68621.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-68621.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: could not find defining uses - --> $DIR/issue-68621.rs:17:19 + --> $DIR/issue-68621.rs:16:19 | LL | type Future = impl Trait; | ^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/save-analysis/issue-68621.min_tait.stderr b/src/test/ui/save-analysis/issue-68621.min_tait.stderr index cccfb3de8fb1..9206f6834501 100644 --- a/src/test/ui/save-analysis/issue-68621.min_tait.stderr +++ b/src/test/ui/save-analysis/issue-68621.min_tait.stderr @@ -1,5 +1,5 @@ error: could not find defining uses - --> $DIR/issue-68621.rs:17:19 + --> $DIR/issue-68621.rs:16:19 | LL | type Future = impl Trait; | ^^^^^^^^^^ diff --git a/src/test/ui/save-analysis/issue-68621.rs b/src/test/ui/save-analysis/issue-68621.rs index 1f4a9080cc93..33bb55e50e0f 100644 --- a/src/test/ui/save-analysis/issue-68621.rs +++ b/src/test/ui/save-analysis/issue-68621.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Trait {} diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr index 7b43d1d86bcd..ea214e70fc8b 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr @@ -1,19 +1,11 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type-const.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type-const.rs:9:12 + --> $DIR/assoc-type-const.rs:8:12 | LL | #![feature(const_generics)] | ^^^^^^^^^^^^^^ | + = note: `#[warn(incomplete_features)]` on by default = note: see issue #44580 for more information -warning: 2 warnings emitted +warning: 1 warning emitted diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr index d4b9132cc927..ea214e70fc8b 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr @@ -1,5 +1,5 @@ warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type-const.rs:9:12 + --> $DIR/assoc-type-const.rs:8:12 | LL | #![feature(const_generics)] | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.rs b/src/test/ui/type-alias-impl-trait/assoc-type-const.rs index be065c3b6bea..4db32a3113c7 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-const.rs +++ b/src/test/ui/type-alias-impl-trait/assoc-type-const.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr index 01263cde8bb1..aaaeb9bd695e 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr @@ -1,18 +1,9 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type-lifetime-unconstrained.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/assoc-type-lifetime-unconstrained.rs:20:6 + --> $DIR/assoc-type-lifetime-unconstrained.rs:19:6 | LL | impl<'a, I> UnwrapItemsExt for I { | ^^ unconstrained lifetime parameter -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr index afcdab5f479d..aaaeb9bd695e 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr @@ -1,5 +1,5 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/assoc-type-lifetime-unconstrained.rs:20:6 + --> $DIR/assoc-type-lifetime-unconstrained.rs:19:6 | LL | impl<'a, I> UnwrapItemsExt for I { | ^^ unconstrained lifetime parameter diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs index 39cc75e688b8..cb849e129422 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs +++ b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait UnwrapItemsExt { type Iter; diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.full_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.full_tait.stderr deleted file mode 100644 index 31afbf14e658..000000000000 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type-lifetime.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs index ebbdbb67dbe6..28535fe55674 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs +++ b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait UnwrapItemsExt<'a> { type Iter; diff --git a/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.full_tait.stderr deleted file mode 100644 index 2c48d815e0de..000000000000 --- a/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/associated-type-alias-impl-trait.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs b/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs index 8d2b1826790b..b9324991a5f0 100644 --- a/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs +++ b/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs index 94e1fa73de88..64bf96259f01 100644 --- a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs +++ b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub type Foo = impl std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs index 65bc594dcf2f..09aa2691804d 100644 --- a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs +++ b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub trait View { type Tmp: Iterator; @@ -18,6 +17,6 @@ impl View for X { type Tmp = impl Iterator; fn test(&self) -> Self::Tmp { - vec![1,2,3].into_iter() + vec![1, 2, 3].into_iter() } } diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr index 164564e8516f..b16d98ab72b7 100644 --- a/src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/bound_reduction2.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/bound_reduction2.rs:18:46 + --> $DIR/bound_reduction2.rs:17:46 | LL | fn foo_desugared(_: T) -> Foo { | ^^^^^^^^^^^^^ | note: used non-generic type `::Assoc` for generic parameter - --> $DIR/bound_reduction2.rs:12:10 + --> $DIR/bound_reduction2.rs:11:10 | LL | type Foo = impl Trait; | ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr index d3520a9bac2f..b16d98ab72b7 100644 --- a/src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/bound_reduction2.rs:18:46 + --> $DIR/bound_reduction2.rs:17:46 | LL | fn foo_desugared(_: T) -> Foo { | ^^^^^^^^^^^^^ | note: used non-generic type `::Assoc` for generic parameter - --> $DIR/bound_reduction2.rs:12:10 + --> $DIR/bound_reduction2.rs:11:10 | LL | type Foo = impl Trait; | ^ diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction2.rs b/src/test/ui/type-alias-impl-trait/bound_reduction2.rs index b94b21e4244a..3e56d115b474 100644 --- a/src/test/ui/type-alias-impl-trait/bound_reduction2.rs +++ b/src/test/ui/type-alias-impl-trait/bound_reduction2.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr index cfb1fe9c19a8..a0099e343b85 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/bounds-are-checked-2.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0277]: the trait bound `T: Clone` is not satisfied - --> $DIR/bounds-are-checked-2.rs:9:13 + --> $DIR/bounds-are-checked-2.rs:8:13 | LL | type X = impl Clone; | ^^^^^^^^^^ the trait `Clone` is not implemented for `T` @@ -18,6 +9,6 @@ help: consider restricting type parameter `T` LL | type X = impl Clone; | ^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr index 735b96d5df98..a0099e343b85 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Clone` is not satisfied - --> $DIR/bounds-are-checked-2.rs:9:13 + --> $DIR/bounds-are-checked-2.rs:8:13 | LL | type X = impl Clone; | ^^^^^^^^^^ the trait `Clone` is not implemented for `T` diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs index fecc2543bce1..5ffcd7ae5460 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type X = impl Clone; //~^ ERROR the trait bound `T: Clone` is not satisfied diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr index ca89421cd8bf..ec15474bf849 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/bounds-are-checked.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - warning: unnecessary lifetime parameter `'a` - --> $DIR/bounds-are-checked.rs:12:6 + --> $DIR/bounds-are-checked.rs:11:6 | LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { | ^^^^^^^^^^^ @@ -16,20 +7,20 @@ LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { = help: you can use the `'static` lifetime directly, in place of `'a` error[E0308]: mismatched types - --> $DIR/bounds-are-checked.rs:9:14 + --> $DIR/bounds-are-checked.rs:8:14 | LL | type X<'a> = impl Into<&'static str> + From<&'a str>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected trait `From<&'a str>` found trait `From<&'static str>` -note: the lifetime `'a` as defined on the item at 9:8... - --> $DIR/bounds-are-checked.rs:9:8 +note: the lifetime `'a` as defined on the item at 8:8... + --> $DIR/bounds-are-checked.rs:8:8 | LL | type X<'a> = impl Into<&'static str> + From<&'a str>; | ^^ = note: ...does not necessarily outlive the static lifetime -error: aborting due to previous error; 2 warnings emitted +error: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr index 9a451cb10837..ec15474bf849 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr @@ -1,5 +1,5 @@ warning: unnecessary lifetime parameter `'a` - --> $DIR/bounds-are-checked.rs:12:6 + --> $DIR/bounds-are-checked.rs:11:6 | LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { | ^^^^^^^^^^^ @@ -7,15 +7,15 @@ LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { = help: you can use the `'static` lifetime directly, in place of `'a` error[E0308]: mismatched types - --> $DIR/bounds-are-checked.rs:9:14 + --> $DIR/bounds-are-checked.rs:8:14 | LL | type X<'a> = impl Into<&'static str> + From<&'a str>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch | = note: expected trait `From<&'a str>` found trait `From<&'static str>` -note: the lifetime `'a` as defined on the item at 9:8... - --> $DIR/bounds-are-checked.rs:9:8 +note: the lifetime `'a` as defined on the item at 8:8... + --> $DIR/bounds-are-checked.rs:8:8 | LL | type X<'a> = impl Into<&'static str> + From<&'a str>; | ^^ diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs b/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs index 5e1faaa3b083..74c49a9c6c7f 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type X<'a> = impl Into<&'static str> + From<&'a str>; //~^ ERROR mismatched types @@ -19,8 +18,7 @@ fn extend_lt<'a>(o: &'a str) -> &'static str { } fn main() { - let r = - { + let r = { let s = "abcdef".to_string(); extend_lt(&s) }; diff --git a/src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr b/src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr index 68de0c961ba1..4d7335cd8652 100644 --- a/src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr @@ -1,18 +1,9 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/coherence.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/coherence.rs:17:6 + --> $DIR/coherence.rs:16:6 | LL | impl foreign_crate::ForeignTrait for AliasOfForeignType {} | ^ unconstrained type parameter -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr b/src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr index 4da52369fdb5..4d7335cd8652 100644 --- a/src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr @@ -1,5 +1,5 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/coherence.rs:17:6 + --> $DIR/coherence.rs:16:6 | LL | impl foreign_crate::ForeignTrait for AliasOfForeignType {} | ^ unconstrained type parameter diff --git a/src/test/ui/type-alias-impl-trait/coherence.rs b/src/test/ui/type-alias-impl-trait/coherence.rs index 51babb0e61bd..998eadeb2717 100644 --- a/src/test/ui/type-alias-impl-trait/coherence.rs +++ b/src/test/ui/type-alias-impl-trait/coherence.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete extern crate foreign_crate; diff --git a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr index 5fc79cf9561f..83019772afcb 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/declared_but_never_defined.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: could not find defining uses - --> $DIR/declared_but_never_defined.rs:9:12 + --> $DIR/declared_but_never_defined.rs:8:12 | LL | type Bar = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr index b731e41b149a..83019772afcb 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr @@ -1,5 +1,5 @@ error: could not find defining uses - --> $DIR/declared_but_never_defined.rs:9:12 + --> $DIR/declared_but_never_defined.rs:8:12 | LL | type Bar = impl std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs index ac92bea8c47a..a62ae2aff70b 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs +++ b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr index eeccc598f529..b3301a0ee4c4 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr @@ -1,20 +1,11 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/declared_but_not_defined_in_scope.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: could not find defining uses - --> $DIR/declared_but_not_defined_in_scope.rs:10:20 + --> $DIR/declared_but_not_defined_in_scope.rs:9:20 | LL | pub type Boo = impl ::std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/declared_but_not_defined_in_scope.rs:14:5 + --> $DIR/declared_but_not_defined_in_scope.rs:13:5 | LL | pub type Boo = impl ::std::fmt::Debug; | ---------------------- the expected opaque type @@ -27,6 +18,6 @@ LL | "" = note: expected opaque type `impl Debug` found reference `&'static str` -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr index 20057c3aa518..b3301a0ee4c4 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr @@ -1,11 +1,11 @@ error: could not find defining uses - --> $DIR/declared_but_not_defined_in_scope.rs:10:20 + --> $DIR/declared_but_not_defined_in_scope.rs:9:20 | LL | pub type Boo = impl ::std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/declared_but_not_defined_in_scope.rs:14:5 + --> $DIR/declared_but_not_defined_in_scope.rs:13:5 | LL | pub type Boo = impl ::std::fmt::Debug; | ---------------------- the expected opaque type diff --git a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs index 2bbae98db448..0ada4a38da3f 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs +++ b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr index 60fa141884db..23c5f9587cc0 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/different_defining_uses.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses.rs:15:1 + --> $DIR/different_defining_uses.rs:14:1 | LL | fn bar() -> Foo { | ^^^^^^^^^^^^^^^ expected `&'static str`, got `i32` | note: previous use here - --> $DIR/different_defining_uses.rs:11:1 + --> $DIR/different_defining_uses.rs:10:1 | LL | fn foo() -> Foo { | ^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr index 904ee58685cb..23c5f9587cc0 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr @@ -1,11 +1,11 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses.rs:15:1 + --> $DIR/different_defining_uses.rs:14:1 | LL | fn bar() -> Foo { | ^^^^^^^^^^^^^^^ expected `&'static str`, got `i32` | note: previous use here - --> $DIR/different_defining_uses.rs:11:1 + --> $DIR/different_defining_uses.rs:10:1 | LL | fn foo() -> Foo { | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses.rs b/src/test/ui/type-alias-impl-trait/different_defining_uses.rs index 542de6b62e19..bb981959b220 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses.rs +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} @@ -12,6 +11,7 @@ fn foo() -> Foo { "" } -fn bar() -> Foo { //~ ERROR concrete type differs from previous +fn bar() -> Foo { + //~^ ERROR concrete type differs from previous 42i32 } diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr index 5c5ae7eadcbc..7b7906f58aca 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr @@ -1,20 +1,11 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/different_defining_uses_never_type.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses_never_type.rs:15:1 + --> $DIR/different_defining_uses_never_type.rs:14:1 | LL | fn bar() -> Foo { | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` | note: previous use here - --> $DIR/different_defining_uses_never_type.rs:11:1 + --> $DIR/different_defining_uses_never_type.rs:10:1 | LL | fn foo() -> Foo { | ^^^^^^^^^^^^^^^ @@ -26,10 +17,10 @@ LL | fn boo() -> Foo { | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` | note: previous use here - --> $DIR/different_defining_uses_never_type.rs:11:1 + --> $DIR/different_defining_uses_never_type.rs:10:1 | LL | fn foo() -> Foo { | ^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr index 9cf2c5836873..7b7906f58aca 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr @@ -1,11 +1,11 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses_never_type.rs:15:1 + --> $DIR/different_defining_uses_never_type.rs:14:1 | LL | fn bar() -> Foo { | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` | note: previous use here - --> $DIR/different_defining_uses_never_type.rs:11:1 + --> $DIR/different_defining_uses_never_type.rs:10:1 | LL | fn foo() -> Foo { | ^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | fn boo() -> Foo { | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` | note: previous use here - --> $DIR/different_defining_uses_never_type.rs:11:1 + --> $DIR/different_defining_uses_never_type.rs:10:1 | LL | fn foo() -> Foo { | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs index 72352a74a04b..716c7383c611 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} @@ -12,10 +11,12 @@ fn foo() -> Foo { "" } -fn bar() -> Foo { //~ ERROR concrete type differs from previous +fn bar() -> Foo { + //~^ ERROR concrete type differs from previous panic!() } -fn boo() -> Foo { //~ ERROR concrete type differs from previous +fn boo() -> Foo { + //~^ ERROR concrete type differs from previous loop {} } diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.full_tait.stderr deleted file mode 100644 index b69622b77bfc..000000000000 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/different_defining_uses_never_type2.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs index ac9884b3e450..8383f38ddbec 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/fallback.full_tait.stderr b/src/test/ui/type-alias-impl-trait/fallback.full_tait.stderr deleted file mode 100644 index 9641d756cb03..000000000000 --- a/src/test/ui/type-alias-impl-trait/fallback.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/fallback.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/fallback.rs b/src/test/ui/type-alias-impl-trait/fallback.rs index 84fec75655fb..204dc0496ede 100644 --- a/src/test/ui/type-alias-impl-trait/fallback.rs +++ b/src/test/ui/type-alias-impl-trait/fallback.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Foo = impl Copy; diff --git a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr index 972e5d942882..749530d8f327 100644 --- a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_different_defining_uses.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/generic_different_defining_uses.rs:14:1 + --> $DIR/generic_different_defining_uses.rs:13:1 | LL | fn my_iter2(t: T) -> MyIter { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `std::iter::Once`, got `std::option::IntoIter` | note: previous use here - --> $DIR/generic_different_defining_uses.rs:10:1 + --> $DIR/generic_different_defining_uses.rs:9:1 | LL | fn my_iter(t: T) -> MyIter { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr index 911683862c26..749530d8f327 100644 --- a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr @@ -1,11 +1,11 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/generic_different_defining_uses.rs:14:1 + --> $DIR/generic_different_defining_uses.rs:13:1 | LL | fn my_iter2(t: T) -> MyIter { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `std::iter::Once`, got `std::option::IntoIter` | note: previous use here - --> $DIR/generic_different_defining_uses.rs:10:1 + --> $DIR/generic_different_defining_uses.rs:9:1 | LL | fn my_iter(t: T) -> MyIter { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs index 4eb603df583a..adf4c1f86563 100644 --- a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs +++ b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} @@ -11,6 +10,7 @@ fn my_iter(t: T) -> MyIter { std::iter::once(t) } -fn my_iter2(t: T) -> MyIter { //~ ERROR concrete type differs from previous +fn my_iter2(t: T) -> MyIter { + //~^ ERROR concrete type differs from previous Some(t).into_iter() } diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr index ecf0e39ed6f6..3dedb2233094 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_lifetime_param.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_lifetime_param.rs:10:26 + --> $DIR/generic_duplicate_lifetime_param.rs:9:26 | LL | fn one<'a>(t: &'a ()) -> Two<'a, 'a> { | ^^^^^^^^^^^ | note: lifetime used multiple times - --> $DIR/generic_duplicate_lifetime_param.rs:8:10 + --> $DIR/generic_duplicate_lifetime_param.rs:7:10 | LL | type Two<'a, 'b> = impl std::fmt::Debug; | ^^ ^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr index 1aad312056bb..3dedb2233094 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_lifetime_param.rs:10:26 + --> $DIR/generic_duplicate_lifetime_param.rs:9:26 | LL | fn one<'a>(t: &'a ()) -> Two<'a, 'a> { | ^^^^^^^^^^^ | note: lifetime used multiple times - --> $DIR/generic_duplicate_lifetime_param.rs:8:10 + --> $DIR/generic_duplicate_lifetime_param.rs:7:10 | LL | type Two<'a, 'b> = impl std::fmt::Debug; | ^^ ^^ diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs index d838d497238d..f0b80db2a831 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs @@ -1,12 +1,12 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} type Two<'a, 'b> = impl std::fmt::Debug; -fn one<'a>(t: &'a ()) -> Two<'a, 'a> { //~ ERROR non-defining opaque type use +fn one<'a>(t: &'a ()) -> Two<'a, 'a> { + //~^ ERROR non-defining opaque type use t } diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.full_tait.stderr deleted file mode 100644 index ef7d4f1be4ee..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use10.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs index c7a7ded2127a..afd2be267458 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr index 357d477c9f1e..44bcdb7bf830 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use2.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use2.rs:13:27 + --> $DIR/generic_duplicate_param_use2.rs:12:27 | LL | fn one(t: T) -> Two { | ^^^^^^^^^ | note: type used multiple times - --> $DIR/generic_duplicate_param_use2.rs:11:10 + --> $DIR/generic_duplicate_param_use2.rs:10:10 | LL | type Two = impl Debug; | ^ ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr index 805ab67816f9..44bcdb7bf830 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use2.rs:13:27 + --> $DIR/generic_duplicate_param_use2.rs:12:27 | LL | fn one(t: T) -> Two { | ^^^^^^^^^ | note: type used multiple times - --> $DIR/generic_duplicate_param_use2.rs:11:10 + --> $DIR/generic_duplicate_param_use2.rs:10:10 | LL | type Two = impl Debug; | ^ ^ diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs index ff5166228239..9627689b15c3 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr index b2004c8416c4..0185afc76bcc 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use3.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use3.rs:13:27 + --> $DIR/generic_duplicate_param_use3.rs:12:27 | LL | fn one(t: T) -> Two { | ^^^^^^^^^ | note: type used multiple times - --> $DIR/generic_duplicate_param_use3.rs:11:10 + --> $DIR/generic_duplicate_param_use3.rs:10:10 | LL | type Two = impl Debug; | ^ ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr index 43af9eca63ef..0185afc76bcc 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use3.rs:13:27 + --> $DIR/generic_duplicate_param_use3.rs:12:27 | LL | fn one(t: T) -> Two { | ^^^^^^^^^ | note: type used multiple times - --> $DIR/generic_duplicate_param_use3.rs:11:10 + --> $DIR/generic_duplicate_param_use3.rs:10:10 | LL | type Two = impl Debug; | ^ ^ diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs index f7d1cc1ad4e5..04d00600c939 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr index f5db77a08d74..504116e87d29 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use4.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use4.rs:13:27 + --> $DIR/generic_duplicate_param_use4.rs:12:27 | LL | fn one(t: T) -> Two { | ^^^^^^^^^ | note: type used multiple times - --> $DIR/generic_duplicate_param_use4.rs:11:10 + --> $DIR/generic_duplicate_param_use4.rs:10:10 | LL | type Two = impl Debug; | ^ ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr index f8e2b5104608..504116e87d29 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use4.rs:13:27 + --> $DIR/generic_duplicate_param_use4.rs:12:27 | LL | fn one(t: T) -> Two { | ^^^^^^^^^ | note: type used multiple times - --> $DIR/generic_duplicate_param_use4.rs:11:10 + --> $DIR/generic_duplicate_param_use4.rs:10:10 | LL | type Two = impl Debug; | ^ ^ diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs index 26583a6ce9b9..0d2979626ac4 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; @@ -11,7 +10,7 @@ fn main() {} type Two = impl Debug; fn one(t: T) -> Two { -//~^ ERROR non-defining opaque type use in defining scope + //~^ ERROR non-defining opaque type use in defining scope t } diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr index aab64e72b7bc..7417112ca8aa 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr @@ -1,26 +1,17 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use5.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use5.rs:19:1 + --> $DIR/generic_duplicate_param_use5.rs:18:1 | LL | fn three(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, U)`, got `(U, T)` | note: previous use here - --> $DIR/generic_duplicate_param_use5.rs:15:1 + --> $DIR/generic_duplicate_param_use5.rs:14:1 | LL | fn two(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:11:18 + --> $DIR/generic_duplicate_param_use5.rs:10:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -32,7 +23,7 @@ LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:11:18 + --> $DIR/generic_duplicate_param_use5.rs:10:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -43,6 +34,6 @@ help: consider restricting type parameter `U` LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr index 5c8c5b897790..7417112ca8aa 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr @@ -1,17 +1,17 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use5.rs:19:1 + --> $DIR/generic_duplicate_param_use5.rs:18:1 | LL | fn three(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, U)`, got `(U, T)` | note: previous use here - --> $DIR/generic_duplicate_param_use5.rs:15:1 + --> $DIR/generic_duplicate_param_use5.rs:14:1 | LL | fn two(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:11:18 + --> $DIR/generic_duplicate_param_use5.rs:10:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -23,7 +23,7 @@ LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:11:18 + --> $DIR/generic_duplicate_param_use5.rs:10:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs index af473e8245ac..30ed7557c976 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr index a69e99bf8b05..abadba0522c4 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr @@ -1,26 +1,17 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use6.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use6.rs:18:1 + --> $DIR/generic_duplicate_param_use6.rs:17:1 | LL | fn three(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)` | note: previous use here - --> $DIR/generic_duplicate_param_use6.rs:14:1 + --> $DIR/generic_duplicate_param_use6.rs:13:1 | LL | fn two(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use6.rs:11:18 + --> $DIR/generic_duplicate_param_use6.rs:10:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -31,6 +22,6 @@ help: consider restricting type parameter `T` LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr index a377ef2d8732..abadba0522c4 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr @@ -1,17 +1,17 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use6.rs:18:1 + --> $DIR/generic_duplicate_param_use6.rs:17:1 | LL | fn three(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)` | note: previous use here - --> $DIR/generic_duplicate_param_use6.rs:14:1 + --> $DIR/generic_duplicate_param_use6.rs:13:1 | LL | fn two(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use6.rs:11:18 + --> $DIR/generic_duplicate_param_use6.rs:10:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs index 01afb2f44964..04644f1e18b9 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.full_tait.stderr deleted file mode 100644 index d80c8326ad6c..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use7.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs index 184e3a5f926b..df12882abada 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr index e73ac88500e0..509ee95db30c 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr @@ -1,26 +1,17 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use8.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use8.rs:17:1 + --> $DIR/generic_duplicate_param_use8.rs:16:1 | LL | fn three(_: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, u32)`, got `(U, u32)` | note: previous use here - --> $DIR/generic_duplicate_param_use8.rs:13:1 + --> $DIR/generic_duplicate_param_use8.rs:12:1 | LL | fn two(t: T, _: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use8.rs:10:18 + --> $DIR/generic_duplicate_param_use8.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -31,6 +22,6 @@ help: consider restricting type parameter `T` LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr index d7edce7a491d..509ee95db30c 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr @@ -1,17 +1,17 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use8.rs:17:1 + --> $DIR/generic_duplicate_param_use8.rs:16:1 | LL | fn three(_: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, u32)`, got `(U, u32)` | note: previous use here - --> $DIR/generic_duplicate_param_use8.rs:13:1 + --> $DIR/generic_duplicate_param_use8.rs:12:1 | LL | fn two(t: T, _: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use8.rs:10:18 + --> $DIR/generic_duplicate_param_use8.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs index ecb8b2cedb48..283e0c1d660e 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr index 0b3d72d67b24..3454dc44e018 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr @@ -1,26 +1,17 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_duplicate_param_use9.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use9.rs:24:1 + --> $DIR/generic_duplicate_param_use9.rs:23:1 | LL | fn three(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, ::Bar)`, got `(A, B, i32)` | note: previous use here - --> $DIR/generic_duplicate_param_use9.rs:20:1 + --> $DIR/generic_duplicate_param_use9.rs:19:1 | LL | fn two(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, ::Bar)` - --> $DIR/generic_duplicate_param_use9.rs:10:18 + --> $DIR/generic_duplicate_param_use9.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ within `(A, B, ::Bar)`, the trait `Foo` is not implemented for `A` @@ -32,7 +23,7 @@ LL | type Two = impl Debug; | ^^^^^ error[E0277]: `A` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:10:18 + --> $DIR/generic_duplicate_param_use9.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -44,7 +35,7 @@ LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ error[E0277]: `B` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:10:18 + --> $DIR/generic_duplicate_param_use9.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -55,6 +46,6 @@ help: consider restricting type parameter `B` LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr index fd1081d7b71d..3454dc44e018 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr @@ -1,17 +1,17 @@ error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use9.rs:24:1 + --> $DIR/generic_duplicate_param_use9.rs:23:1 | LL | fn three(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, ::Bar)`, got `(A, B, i32)` | note: previous use here - --> $DIR/generic_duplicate_param_use9.rs:20:1 + --> $DIR/generic_duplicate_param_use9.rs:19:1 | LL | fn two(t: T, u: U) -> Two { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, ::Bar)` - --> $DIR/generic_duplicate_param_use9.rs:10:18 + --> $DIR/generic_duplicate_param_use9.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ within `(A, B, ::Bar)`, the trait `Foo` is not implemented for `A` @@ -23,7 +23,7 @@ LL | type Two = impl Debug; | ^^^^^ error[E0277]: `A` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:10:18 + --> $DIR/generic_duplicate_param_use9.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug` @@ -35,7 +35,7 @@ LL | type Two = impl Debug; | ^^^^^^^^^^^^^^^^^ error[E0277]: `B` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:10:18 + --> $DIR/generic_duplicate_param_use9.rs:9:18 | LL | type Two = impl Debug; | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug` diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs index 5eced6cfa5a0..4c3b0877d239 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_lifetime_param.full_tait.stderr deleted file mode 100644 index 39817757f18b..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_lifetime_param.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs b/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs index dbe7cfd1c81f..7274f4f76f8c 100644 --- a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs +++ b/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr index 819ef7b77123..aa8457cf158e 100644 --- a/src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr @@ -1,20 +1,11 @@ error: at least one trait must be specified - --> $DIR/generic_not_used.rs:8:33 + --> $DIR/generic_not_used.rs:7:33 | LL | type WrongGeneric = impl 'static; | ^^^^^^^^^^^^ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_not_used.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: type parameter `V` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/generic_not_used.rs:11:73 + --> $DIR/generic_not_used.rs:10:73 | LL | fn wrong_generic(_: U, v: V) -> WrongGeneric { | _________________________________________________________________________^ @@ -23,5 +14,5 @@ LL | | v LL | | } | |_^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr index fe7f5f6c71e0..aa8457cf158e 100644 --- a/src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr @@ -1,11 +1,11 @@ error: at least one trait must be specified - --> $DIR/generic_not_used.rs:8:33 + --> $DIR/generic_not_used.rs:7:33 | LL | type WrongGeneric = impl 'static; | ^^^^^^^^^^^^ error: type parameter `V` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/generic_not_used.rs:11:73 + --> $DIR/generic_not_used.rs:10:73 | LL | fn wrong_generic(_: U, v: V) -> WrongGeneric { | _________________________________________________________________________^ diff --git a/src/test/ui/type-alias-impl-trait/generic_not_used.rs b/src/test/ui/type-alias-impl-trait/generic_not_used.rs index 68f50b2151ff..36fae028d4ec 100644 --- a/src/test/ui/type-alias-impl-trait/generic_not_used.rs +++ b/src/test/ui/type-alias-impl-trait/generic_not_used.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} @@ -9,6 +8,6 @@ fn main() {} //~^ ERROR: at least one trait must be specified fn wrong_generic(_: U, v: V) -> WrongGeneric { -//~^ ERROR type parameter `V` is part of concrete type but not used in parameter list + //~^ ERROR type parameter `V` is part of concrete type but not used in parameter list v } diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr index 90a753b5a6de..f191797c09e1 100644 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr @@ -1,20 +1,11 @@ error: at least one trait must be specified - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 + --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 | LL | type WrongGeneric = impl 'static; | ^^^^^^^^^^^^ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_type_does_not_live_long_enough.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0308]: mismatched types - --> $DIR/generic_type_does_not_live_long_enough.rs:9:18 + --> $DIR/generic_type_does_not_live_long_enough.rs:8:18 | LL | let z: i32 = x; | --- ^ expected `i32`, found opaque type @@ -28,7 +19,7 @@ LL | type WrongGeneric = impl 'static; found opaque type `impl Sized` error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 + --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 | LL | type WrongGeneric = impl 'static; | ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds @@ -36,7 +27,7 @@ LL | type WrongGeneric = impl 'static; LL | fn wrong_generic(t: T) -> WrongGeneric { | - help: consider adding an explicit lifetime bound...: `T: 'static` -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0308, E0310. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr index e50282201074..f191797c09e1 100644 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr @@ -1,11 +1,11 @@ error: at least one trait must be specified - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 + --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 | LL | type WrongGeneric = impl 'static; | ^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/generic_type_does_not_live_long_enough.rs:9:18 + --> $DIR/generic_type_does_not_live_long_enough.rs:8:18 | LL | let z: i32 = x; | --- ^ expected `i32`, found opaque type @@ -19,7 +19,7 @@ LL | type WrongGeneric = impl 'static; found opaque type `impl Sized` error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 + --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 | LL | type WrongGeneric = impl 'static; | ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs index 9f647d9e737f..bd0fc8cbace4 100644 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs +++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() { let y = 42; diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr index c4778a46fb08..be701b0ca908 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr @@ -1,20 +1,11 @@ error: at least one trait must be specified - --> $DIR/generic_underconstrained.rs:9:35 + --> $DIR/generic_underconstrained.rs:8:35 | LL | type Underconstrained = impl 'static; | ^^^^^^^^^^^^ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_underconstrained.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0277]: the trait bound `T: Trait` is not satisfied - --> $DIR/generic_underconstrained.rs:13:31 + --> $DIR/generic_underconstrained.rs:12:31 | LL | type Underconstrained = impl 'static; | ----- required by this bound in `Underconstrained` @@ -27,6 +18,6 @@ help: consider restricting type parameter `T` LL | fn underconstrain(_: T) -> Underconstrained { | ^^^^^^^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr index 6c1d6debee81..be701b0ca908 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr @@ -1,11 +1,11 @@ error: at least one trait must be specified - --> $DIR/generic_underconstrained.rs:9:35 + --> $DIR/generic_underconstrained.rs:8:35 | LL | type Underconstrained = impl 'static; | ^^^^^^^^^^^^ error[E0277]: the trait bound `T: Trait` is not satisfied - --> $DIR/generic_underconstrained.rs:13:31 + --> $DIR/generic_underconstrained.rs:12:31 | LL | type Underconstrained = impl 'static; | ----- required by this bound in `Underconstrained` diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs b/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs index f4c4a1b72cb9..5d723e5bc621 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr index 7ab73d24274c..ab2d9482364d 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr @@ -1,26 +1,17 @@ error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:8:45 + --> $DIR/generic_underconstrained2.rs:7:45 | LL | type Underconstrained = impl 'static; | ^^^^^^^^^^^^ error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:17:46 + --> $DIR/generic_underconstrained2.rs:16:46 | LL | type Underconstrained2 = impl 'static; | ^^^^^^^^^^^^ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_underconstrained2.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:12:33 + --> $DIR/generic_underconstrained2.rs:11:33 | LL | type Underconstrained = impl 'static; | --------------- required by this bound in `Underconstrained` @@ -34,7 +25,7 @@ LL | fn underconstrained(_: U) -> Underconstrained { | ^^^^^^^^^^^^^^^^^ error[E0277]: `V` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:21:43 + --> $DIR/generic_underconstrained2.rs:20:43 | LL | type Underconstrained2 = impl 'static; | --------------- required by this bound in `Underconstrained2` @@ -47,6 +38,6 @@ help: consider restricting type parameter `V` LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { | ^^^^^^^^^^^^^^^^^ -error: aborting due to 4 previous errors; 1 warning emitted +error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr index a4f5f4b8645b..ab2d9482364d 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr @@ -1,17 +1,17 @@ error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:8:45 + --> $DIR/generic_underconstrained2.rs:7:45 | LL | type Underconstrained = impl 'static; | ^^^^^^^^^^^^ error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:17:46 + --> $DIR/generic_underconstrained2.rs:16:46 | LL | type Underconstrained2 = impl 'static; | ^^^^^^^^^^^^ error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:12:33 + --> $DIR/generic_underconstrained2.rs:11:33 | LL | type Underconstrained = impl 'static; | --------------- required by this bound in `Underconstrained` @@ -25,7 +25,7 @@ LL | fn underconstrained(_: U) -> Underconstrained { | ^^^^^^^^^^^^^^^^^ error[E0277]: `V` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:21:43 + --> $DIR/generic_underconstrained2.rs:20:43 | LL | type Underconstrained2 = impl 'static; | --------------- required by this bound in `Underconstrained2` diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs index b3fb0748d2a6..01cd1b9b972f 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr index bdd88134290c..679f2f73919c 100644 --- a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr @@ -1,18 +1,9 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/impl-with-unconstrained-param.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/impl-with-unconstrained-param.rs:14:6 + --> $DIR/impl-with-unconstrained-param.rs:13:6 | LL | impl X for () { | ^ unconstrained type parameter -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr index eb59766b9139..679f2f73919c 100644 --- a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr @@ -1,5 +1,5 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/impl-with-unconstrained-param.rs:14:6 + --> $DIR/impl-with-unconstrained-param.rs:13:6 | LL | impl X for () { | ^ unconstrained type parameter diff --git a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs index 1aefa2474ffc..6759799b37d8 100644 --- a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs +++ b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait X { type I; diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr index 6d1a59aafeda..9435eaace371 100644 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/incoherent-assoc-imp-trait.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0119]: conflicting implementations of trait `std::ops::FnOnce<()>` for type `&_` - --> $DIR/incoherent-assoc-imp-trait.rs:13:1 + --> $DIR/incoherent-assoc-imp-trait.rs:12:1 | LL | impl FnOnce<()> for &F { | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -18,7 +9,7 @@ LL | impl FnOnce<()> for &F { where F: Fn, F: ?Sized; error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct`) - --> $DIR/incoherent-assoc-imp-trait.rs:13:6 + --> $DIR/incoherent-assoc-imp-trait.rs:12:6 | LL | impl FnOnce<()> for &F { | ^ type parameter `F` must be used as the type parameter for some local type @@ -26,7 +17,7 @@ LL | impl FnOnce<()> for &F { = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local = note: only traits defined in the current crate can be implemented for a type parameter -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors Some errors have detailed explanations: E0119, E0210. For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr index 5c02b602d528..9435eaace371 100644 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr @@ -1,5 +1,5 @@ error[E0119]: conflicting implementations of trait `std::ops::FnOnce<()>` for type `&_` - --> $DIR/incoherent-assoc-imp-trait.rs:13:1 + --> $DIR/incoherent-assoc-imp-trait.rs:12:1 | LL | impl FnOnce<()> for &F { | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -9,7 +9,7 @@ LL | impl FnOnce<()> for &F { where F: Fn, F: ?Sized; error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct`) - --> $DIR/incoherent-assoc-imp-trait.rs:13:6 + --> $DIR/incoherent-assoc-imp-trait.rs:12:6 | LL | impl FnOnce<()> for &F { | ^ type parameter `F` must be used as the type parameter for some local type diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs index b52b9c18f084..f73169d7d08a 100644 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs +++ b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![feature(fn_traits)] trait MyTrait {} diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr index 4effd87120e7..696f887a4d89 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-52843-closure-constrain.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: concrete type differs from previous defining opaque type use - --> $DIR/issue-52843-closure-constrain.rs:13:16 + --> $DIR/issue-52843-closure-constrain.rs:12:16 | LL | let null = || -> Opaque { 0 }; | ^^^^^^^^^^^^^^^^^^ expected `String`, got `i32` | note: previous use here - --> $DIR/issue-52843-closure-constrain.rs:12:5 + --> $DIR/issue-52843-closure-constrain.rs:11:5 | LL | fn _unused() -> Opaque { String::new() } | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr index c2cb4829fb78..68231d43f629 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr @@ -1,5 +1,5 @@ error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-52843-closure-constrain.rs:13:22 + --> $DIR/issue-52843-closure-constrain.rs:12:22 | LL | let null = || -> Opaque { 0 }; | ^^^^^^ @@ -8,13 +8,13 @@ LL | let null = || -> Opaque { 0 }; = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error: concrete type differs from previous defining opaque type use - --> $DIR/issue-52843-closure-constrain.rs:13:16 + --> $DIR/issue-52843-closure-constrain.rs:12:16 | LL | let null = || -> Opaque { 0 }; | ^^^^^^^^^^^^^^^^^^ expected `String`, got `[type error]` | note: previous use here - --> $DIR/issue-52843-closure-constrain.rs:12:5 + --> $DIR/issue-52843-closure-constrain.rs:11:5 | LL | fn _unused() -> Opaque { String::new() } | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs index 01f874155fa1..c7deb2e4eac9 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs +++ b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr index 35ac0993b29c..abd18392636c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-52843.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0277]: the trait bound `T: Default` is not satisfied - --> $DIR/issue-52843.rs:6:15 + --> $DIR/issue-52843.rs:5:15 | LL | type Foo = impl Default; | ^^^^^^^^^^^^ the trait `Default` is not implemented for `T` @@ -18,6 +9,6 @@ help: consider restricting type parameter `T` LL | type Foo = impl Default; | ^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr index 9fb760f34c19..abd18392636c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `T: Default` is not satisfied - --> $DIR/issue-52843.rs:6:15 + --> $DIR/issue-52843.rs:5:15 | LL | type Foo = impl Default; | ^^^^^^^^^^^^ the trait `Default` is not implemented for `T` diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.rs b/src/test/ui/type-alias-impl-trait/issue-52843.rs index 14f9db6eae2c..844bfa3b8461 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843.rs +++ b/src/test/ui/type-alias-impl-trait/issue-52843.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Foo = impl Default; //~^ ERROR: the trait bound `T: Default` is not satisfied diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr index a8dd6a93d3db..fb70582c31a2 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-53096.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53096.rs:14:1 + --> $DIR/issue-53096.rs:13:1 | LL | fn main() {} | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr index 4210d0c1cb17..fb70582c31a2 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr @@ -1,5 +1,5 @@ error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53096.rs:14:1 + --> $DIR/issue-53096.rs:13:1 | LL | fn main() {} | ^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.rs b/src/test/ui/type-alias-impl-trait/issue-53096.rs index 7bb0066b7ef4..249055bf26c3 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53096.rs +++ b/src/test/ui/type-alias-impl-trait/issue-53096.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Foo = impl Fn() -> usize; const fn bar() -> Foo { diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr index ee4b7eef0bdc..7087aef67681 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-53598.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-53598.rs:23:42 + --> $DIR/issue-53598.rs:22:42 | LL | fn foo(_: T) -> Self::Item { | __________________________________________^ @@ -17,5 +8,5 @@ LL | | S::(Default::default()) LL | | } | |_____^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr index 728721b6dbd7..7087aef67681 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr @@ -1,5 +1,5 @@ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-53598.rs:23:42 + --> $DIR/issue-53598.rs:22:42 | LL | fn foo(_: T) -> Self::Item { | __________________________________________^ diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.rs b/src/test/ui/type-alias-impl-trait/issue-53598.rs index 38067a722237..1680d6e58395 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53598.rs +++ b/src/test/ui/type-alias-impl-trait/issue-53598.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; @@ -21,7 +20,7 @@ impl Foo for S2 { type Item = impl Debug; fn foo(_: T) -> Self::Item { - //~^ Error type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + //~^ Error type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias S::(Default::default()) } } diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr index b23fed5dadfe..05b7173b80b5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-53678-generator-and-const-fn.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53678-generator-and-const-fn.rs:22:1 + --> $DIR/issue-53678-generator-and-const-fn.rs:21:1 | LL | fn main() {} | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr index fabba2183531..05b7173b80b5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr @@ -1,5 +1,5 @@ error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53678-generator-and-const-fn.rs:22:1 + --> $DIR/issue-53678-generator-and-const-fn.rs:21:1 | LL | fn main() {} | ^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs index a8215c41826f..9c50a3da95cb 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs +++ b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::ops::Generator; diff --git a/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.full_tait.stderr deleted file mode 100644 index 98778210bfb3..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-55099-lifetime-inference.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs b/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs index 2c24e9d744ae..fc32d455aaa8 100644 --- a/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs +++ b/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs @@ -6,15 +6,12 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete -trait Future { -} +trait Future {} struct AndThen(F); -impl Future for AndThen { -} +impl Future for AndThen {} struct Foo<'a> { x: &'a mut (), diff --git a/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.full_tait.stderr deleted file mode 100644 index d31c232fc239..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-57188-associate-impl-capture.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs b/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs index 645a4c5696d4..7207dda90dc4 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete struct Baz<'a> { source: &'a str, diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr index 61e8da91bbaa..70b6f264860e 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-57611-trait-alias.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: implementation of `FnOnce` is not general enough - --> $DIR/issue-57611-trait-alias.rs:20:16 + --> $DIR/issue-57611-trait-alias.rs:19:16 | LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough @@ -16,5 +7,5 @@ LL | type Bar = impl Baz; = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`... = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2` -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr index f65e91e52c71..70b6f264860e 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr @@ -1,5 +1,5 @@ error: implementation of `FnOnce` is not general enough - --> $DIR/issue-57611-trait-alias.rs:20:16 + --> $DIR/issue-57611-trait-alias.rs:19:16 | LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs index 508ecdd88a48..fcc3555b2312 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs @@ -6,7 +6,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Foo { type Bar: Baz; diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr index 4336532cdbba..2d8586267193 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-57700.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-57700.rs:19:58 + --> $DIR/issue-57700.rs:18:58 | LL | fn foo(self: impl Deref) -> Self::Bar { | __________________________________________________________^ @@ -17,5 +8,5 @@ LL | | self LL | | } | |_____^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr index 47ab31cd797b..2d8586267193 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr @@ -1,5 +1,5 @@ error: type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-57700.rs:19:58 + --> $DIR/issue-57700.rs:18:58 | LL | fn foo(self: impl Deref) -> Self::Bar { | __________________________________________________________^ diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.rs b/src/test/ui/type-alias-impl-trait/issue-57700.rs index 476a188cde69..19b3d1ce2c76 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57700.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57700.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::ops::Deref; @@ -17,7 +16,7 @@ impl Foo for C { type Bar = impl Foo; fn foo(self: impl Deref) -> Self::Bar { - //~^ Error type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias + //~^ Error type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias self } } diff --git a/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.full_tait.stderr deleted file mode 100644 index b35361c89a48..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-57807-associated-type.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs b/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs index 0a021149e700..9118648fe426 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Bar { type A; diff --git a/src/test/ui/type-alias-impl-trait/issue-58887.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-58887.full_tait.stderr deleted file mode 100644 index f0fd5f2f056a..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-58887.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-58887.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-58887.rs b/src/test/ui/type-alias-impl-trait/issue-58887.rs index f0803a663de3..0a09bd50a6ea 100644 --- a/src/test/ui/type-alias-impl-trait/issue-58887.rs +++ b/src/test/ui/type-alias-impl-trait/issue-58887.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait UnwrapItemsExt { type Iter; diff --git a/src/test/ui/type-alias-impl-trait/issue-58951.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-58951.full_tait.stderr deleted file mode 100644 index 164b8881714e..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-58951.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-58951.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-58951.rs b/src/test/ui/type-alias-impl-trait/issue-58951.rs index 3b1ea0d676bb..932684ec089b 100644 --- a/src/test/ui/type-alias-impl-trait/issue-58951.rs +++ b/src/test/ui/type-alias-impl-trait/issue-58951.rs @@ -3,11 +3,12 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type A = impl Iterator; -fn def_a() -> A { 0..1 } +fn def_a() -> A { + 0..1 +} pub fn use_a() { def_a().map(|x| x); diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr index 9d3f366ad810..adb07f5227b4 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-60407.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: fatal error triggered by #[rustc_error] - --> $DIR/issue-60407.rs:11:1 + --> $DIR/issue-60407.rs:10:1 | LL | fn main() { | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr index 1a3ceafa3e29..adb07f5227b4 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr @@ -1,5 +1,5 @@ error: fatal error triggered by #[rustc_error] - --> $DIR/issue-60407.rs:11:1 + --> $DIR/issue-60407.rs:10:1 | LL | fn main() { | ^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.rs b/src/test/ui/type-alias-impl-trait/issue-60407.rs index 3c6b873b4ca5..7319bcf4cd91 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60407.rs +++ b/src/test/ui/type-alias-impl-trait/issue-60407.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait, rustc_attrs)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Debuggable = impl core::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr index 72b6b0648f98..738718e770ac 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-60564.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/issue-60564.rs:22:34 + --> $DIR/issue-60564.rs:21:34 | LL | fn iter_bits(self, n: u8) -> Self::BitsIter { | ^^^^^^^^^^^^^^ | note: used non-generic type `u8` for generic parameter - --> $DIR/issue-60564.rs:11:25 + --> $DIR/issue-60564.rs:10:25 | LL | type IterBitsIter = impl std::iter::Iterator; | ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr index 72668c8056fc..738718e770ac 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/issue-60564.rs:22:34 + --> $DIR/issue-60564.rs:21:34 | LL | fn iter_bits(self, n: u8) -> Self::BitsIter { | ^^^^^^^^^^^^^^ | note: used non-generic type `u8` for generic parameter - --> $DIR/issue-60564.rs:11:25 + --> $DIR/issue-60564.rs:10:25 | LL | type IterBitsIter = impl std::iter::Iterator; | ^ diff --git a/src/test/ui/type-alias-impl-trait/issue-60564.rs b/src/test/ui/type-alias-impl-trait/issue-60564.rs index 10fbbd2ef292..7f780a253c95 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60564.rs +++ b/src/test/ui/type-alias-impl-trait/issue-60564.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait IterBits { type BitsIter: Iterator; diff --git a/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.full_tait.stderr deleted file mode 100644 index 1fc38d2f549a..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-62000-associate-impl-trait-lifetimes.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs b/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs index 4d9ca47b9474..38370cd008f7 100644 --- a/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs +++ b/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait MyTrait { type AssocType: Send; diff --git a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs b/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs index 3b8f6afcb005..634ec0f515f3 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs +++ b/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs @@ -5,7 +5,6 @@ // check-pass #![feature(min_type_alias_impl_trait, type_alias_impl_trait)] -//~^ WARN incomplete pub type Closure = impl FnOnce(); diff --git a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.stderr b/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.stderr deleted file mode 100644 index e1f4ecd3b981..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-63263-closure-return.rs:7:39 - | -LL | #![feature(min_type_alias_impl_trait, type_alias_impl_trait)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr index 53a0016c08eb..409cca865d1e 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-63279.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:11:5: 11:28] as FnOnce<()>>::Output == ()` - --> $DIR/issue-63279.rs:8:16 +error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:10:5: 10:28] as FnOnce<()>>::Output == ()` + --> $DIR/issue-63279.rs:7:16 | LL | type Closure = impl FnOnce(); | ^^^^^^^^^^^^^ expected `()`, found opaque type @@ -16,6 +7,6 @@ LL | type Closure = impl FnOnce(); = note: expected unit type `()` found opaque type `impl FnOnce<()>` -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr index be386ab90ea0..a93d2dfcee50 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr @@ -1,5 +1,5 @@ error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-63279.rs:11:11 + --> $DIR/issue-63279.rs:10:11 | LL | || -> Closure { || () } | ^^^^^^^ @@ -7,8 +7,8 @@ LL | || -> Closure { || () } = note: see issue #63063 for more information = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable -error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:11:5: 11:28] as FnOnce<()>>::Output == ()` - --> $DIR/issue-63279.rs:8:16 +error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:10:5: 10:28] as FnOnce<()>>::Output == ()` + --> $DIR/issue-63279.rs:7:16 | LL | type Closure = impl FnOnce(); | ^^^^^^^^^^^^^ expected `()`, found opaque type diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.rs b/src/test/ui/type-alias-impl-trait/issue-63279.rs index 086715626bc1..4c9c26a343c5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63279.rs +++ b/src/test/ui/type-alias-impl-trait/issue-63279.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Closure = impl FnOnce(); //~ ERROR: type mismatch resolving diff --git a/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.full_tait.stderr deleted file mode 100644 index fc8d8147167b..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-63677-type-alias-coherence.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs b/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs index 62d11ad38d62..b477fea41b72 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs +++ b/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub trait Trait {} pub struct S1(T); diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr index ee26789d204f..6b4ea787ea8d 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: fatal error triggered by #[rustc_error] - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:18:1 + --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:17:1 | LL | fn main() { | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr index 5b6c4b5cda1f..6798ecb9489f 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr @@ -1,5 +1,5 @@ error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:20:13 + --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:19:13 | LL | take(|| {}); | ^ @@ -8,7 +8,7 @@ LL | take(|| {}); = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:22:13 + --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:21:13 | LL | take(|| {}); | ^ diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs index d37be640e0b0..f181b3d06a67 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs +++ b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait, rustc_attrs)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type T = impl Sized; // The concrete type referred by impl-trait-type-alias(`T`) is guaranteed diff --git a/src/test/ui/type-alias-impl-trait/issue-65918.rs b/src/test/ui/type-alias-impl-trait/issue-65918.rs index ab05e4b1cbec..b15bff57a0d2 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65918.rs +++ b/src/test/ui/type-alias-impl-trait/issue-65918.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::marker::PhantomData; diff --git a/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.full_tait.stderr deleted file mode 100644 index 2fc46574512c..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-66580-closure-coherence.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs b/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs index 7b3ddc788684..7fdaa7fb99bc 100644 --- a/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs +++ b/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Closure = impl FnOnce(); @@ -13,7 +12,9 @@ fn closure() -> Closure { || {} } -struct Wrap { f: T } +struct Wrap { + f: T, +} impl Wrap {} diff --git a/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.full_tait.stderr deleted file mode 100644 index 81e27da0949a..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-67844-nested-opaque.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs b/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs index b9e29a01cddf..f47f0cdba88b 100644 --- a/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs +++ b/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs @@ -6,9 +6,10 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete -trait WithAssoc { type AssocType; } +trait WithAssoc { + type AssocType; +} trait WithParam {} @@ -23,7 +24,6 @@ impl WithAssoc for MyStruct { type AssocType = MyParam; } - fn my_fun() -> Return { MyStruct } diff --git a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr index 8b1ad19ac0cb..db3b89bc699c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-68368-non-defining-use.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/issue-68368-non-defining-use.rs:11:15 + --> $DIR/issue-68368-non-defining-use.rs:10:15 | LL | fn f<'a>() -> Alias<'a, ()> {} | ^^^^^^^^^^^^^ | note: used non-generic type `()` for generic parameter - --> $DIR/issue-68368-non-defining-use.rs:10:16 + --> $DIR/issue-68368-non-defining-use.rs:9:16 | LL | type Alias<'a, U> = impl Trait; | ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr index 01ae457851f2..db3b89bc699c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/issue-68368-non-defining-use.rs:11:15 + --> $DIR/issue-68368-non-defining-use.rs:10:15 | LL | fn f<'a>() -> Alias<'a, ()> {} | ^^^^^^^^^^^^^ | note: used non-generic type `()` for generic parameter - --> $DIR/issue-68368-non-defining-use.rs:10:16 + --> $DIR/issue-68368-non-defining-use.rs:9:16 | LL | type Alias<'a, U> = impl Trait; | ^ diff --git a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs index 92465076733b..b31c79b8b2bb 100644 --- a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs +++ b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Trait {} type Alias<'a, U> = impl Trait; fn f<'a>() -> Alias<'a, ()> {} diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr index 7f120af2408b..150bfbaef591 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr @@ -1,20 +1,11 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:20:65 + --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:19:65 | LL | type Return = impl WithAssoc; | - ^^ undeclared lifetime | | | help: consider introducing lifetime `'a` here: `'a,` -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0261`. diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr index e1fc94c3472a..150bfbaef591 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:20:65 + --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:19:65 | LL | type Return = impl WithAssoc; | - ^^ undeclared lifetime diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs index 61161d44e51a..ae89cdd1c087 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs +++ b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait SomeTrait {} diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.full_tait.stderr deleted file mode 100644 index 61e2e20dfd04..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-69136-inner-lifetime-resolve-ok.rs:7:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs index 01df967a4a51..05d50f0f1bf5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs +++ b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs @@ -5,7 +5,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait SomeTrait {} diff --git a/src/test/ui/type-alias-impl-trait/issue-69323.full.stderr b/src/test/ui/type-alias-impl-trait/issue-69323.full.stderr deleted file mode 100644 index 71cc6f61c378..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-69323.full.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-69323.rs:5:27 - | -LL | #![cfg_attr(full, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-69323.rs b/src/test/ui/type-alias-impl-trait/issue-69323.rs index 824558c1b342..9c4b4433f9fa 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69323.rs +++ b/src/test/ui/type-alias-impl-trait/issue-69323.rs @@ -3,7 +3,6 @@ // revisions: min full #![feature(min_type_alias_impl_trait)] #![cfg_attr(full, feature(type_alias_impl_trait))] -//[full]~^ WARN incomplete use std::iter::{once, Chain}; diff --git a/src/test/ui/type-alias-impl-trait/issue-70121.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-70121.full_tait.stderr deleted file mode 100644 index 9fe2e2cf88ee..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-70121.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-70121.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-70121.rs b/src/test/ui/type-alias-impl-trait/issue-70121.rs index 150eca46975d..1eb33c805bb1 100644 --- a/src/test/ui/type-alias-impl-trait/issue-70121.rs +++ b/src/test/ui/type-alias-impl-trait/issue-70121.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub type Successors<'a> = impl Iterator; diff --git a/src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr index e7729e47c36d..83c37001a45c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr @@ -1,18 +1,9 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-74244.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74244.rs:12:6 + --> $DIR/issue-74244.rs:11:6 | LL | impl Allocator for DefaultAllocator { | ^ unconstrained type parameter -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr index 6ee8c58826dd..83c37001a45c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr @@ -1,5 +1,5 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74244.rs:12:6 + --> $DIR/issue-74244.rs:11:6 | LL | impl Allocator for DefaultAllocator { | ^ unconstrained type parameter diff --git a/src/test/ui/type-alias-impl-trait/issue-74244.rs b/src/test/ui/type-alias-impl-trait/issue-74244.rs index 890eb23ef951..d9845a9b62ce 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74244.rs +++ b/src/test/ui/type-alias-impl-trait/issue-74244.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Allocator { type Buffer; diff --git a/src/test/ui/type-alias-impl-trait/issue-74761-2.rs b/src/test/ui/type-alias-impl-trait/issue-74761-2.rs index 4b0f2afee548..8e7ff45a72df 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761-2.rs +++ b/src/test/ui/type-alias-impl-trait/issue-74761-2.rs @@ -1,6 +1,5 @@ #![feature(member_constraints)] #![feature(type_alias_impl_trait)] -//~^ WARN incomplete pub trait A { type B; diff --git a/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr b/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr index 4506a6e23d5c..505e6436f5bd 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr @@ -1,5 +1,5 @@ error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/issue-74761-2.rs:12:14 + --> $DIR/issue-74761-2.rs:11:14 | LL | type B = impl core::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^ @@ -7,28 +7,19 @@ LL | type B = impl core::fmt::Debug; = note: see issue #63063 for more information = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-74761-2.rs:2:12 - | -LL | #![feature(type_alias_impl_trait)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761-2.rs:9:6 + --> $DIR/issue-74761-2.rs:8:6 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761-2.rs:9:10 + --> $DIR/issue-74761-2.rs:8:10 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter -error: aborting due to 3 previous errors; 1 warning emitted +error: aborting due to 3 previous errors Some errors have detailed explanations: E0207, E0658. For more information about an error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr index 05b63a00dfb1..112fc2ec7196 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr @@ -1,24 +1,15 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-74761.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:10:6 + --> $DIR/issue-74761.rs:9:6 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:10:10 + --> $DIR/issue-74761.rs:9:10 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr index ad111e23b15b..112fc2ec7196 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr @@ -1,11 +1,11 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:10:6 + --> $DIR/issue-74761.rs:9:6 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:10:10 + --> $DIR/issue-74761.rs:9:10 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter diff --git a/src/test/ui/type-alias-impl-trait/issue-74761.rs b/src/test/ui/type-alias-impl-trait/issue-74761.rs index bbc67ecc97aa..4f0db7aedc78 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761.rs +++ b/src/test/ui/type-alias-impl-trait/issue-74761.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub trait A { type B; diff --git a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr index 8fb4a3b66256..fb063800bdbc 100644 --- a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-76202-trait-impl-for-tait.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: cannot implement trait on type alias impl trait - --> $DIR/issue-76202-trait-impl-for-tait.rs:19:1 + --> $DIR/issue-76202-trait-impl-for-tait.rs:18:1 | LL | impl Test for F { | ^^^^^^^^^^^^^^^ | note: type alias impl trait defined here - --> $DIR/issue-76202-trait-impl-for-tait.rs:12:10 + --> $DIR/issue-76202-trait-impl-for-tait.rs:11:10 | LL | type F = impl Dummy; | ^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr index 3754553772c2..fb063800bdbc 100644 --- a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr @@ -1,11 +1,11 @@ error: cannot implement trait on type alias impl trait - --> $DIR/issue-76202-trait-impl-for-tait.rs:19:1 + --> $DIR/issue-76202-trait-impl-for-tait.rs:18:1 | LL | impl Test for F { | ^^^^^^^^^^^^^^^ | note: type alias impl trait defined here - --> $DIR/issue-76202-trait-impl-for-tait.rs:12:10 + --> $DIR/issue-76202-trait-impl-for-tait.rs:11:10 | LL | type F = impl Dummy; | ^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs index 276c770fe486..527fbd4bb2f4 100644 --- a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs +++ b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Dummy {} impl Dummy for () {} @@ -16,7 +15,8 @@ trait Test { fn test(self); } -impl Test for F { //~ ERROR cannot implement trait +impl Test for F { + //~^ ERROR cannot implement trait fn test(self) {} } diff --git a/src/test/ui/type-alias-impl-trait/issue-78450.rs b/src/test/ui/type-alias-impl-trait/issue-78450.rs index 640f929f8f11..bcc16a5b2aba 100644 --- a/src/test/ui/type-alias-impl-trait/issue-78450.rs +++ b/src/test/ui/type-alias-impl-trait/issue-78450.rs @@ -2,7 +2,6 @@ #![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)] -//~^ WARNING: the feature `type_alias_impl_trait` is incomplete pub trait AssociatedImpl { type ImplTrait; diff --git a/src/test/ui/type-alias-impl-trait/issue-78450.stderr b/src/test/ui/type-alias-impl-trait/issue-78450.stderr deleted file mode 100644 index efccf6241fb7..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-78450.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-78450.rs:4:12 - | -LL | #![feature(type_alias_impl_trait)] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.full_tait.stderr deleted file mode 100644 index 5e4307be17a0..000000000000 --- a/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/nested_type_alias_impl_trait.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs b/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs index f03563dfed6d..3c059fcf7d42 100644 --- a/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs +++ b/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs @@ -1,21 +1,20 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // build-pass (FIXME(62277): could be check-pass?) mod my_mod { - use std::fmt::Debug; + use std::fmt::Debug; - pub type Foo = impl Debug; - pub type Foot = impl Debug; + pub type Foo = impl Debug; + pub type Foot = impl Debug; - pub fn get_foo() -> Foo { - 5i32 - } + pub fn get_foo() -> Foo { + 5i32 + } - pub fn get_foot() -> Foot { - get_foo() - } + pub fn get_foot() -> Foot { + get_foo() + } } fn main() { diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr index 45c95469e95c..725958358a11 100644 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/never_reveal_concrete_type.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0308]: mismatched types - --> $DIR/never_reveal_concrete_type.rs:16:27 + --> $DIR/never_reveal_concrete_type.rs:15:27 | LL | type NoReveal = impl std::fmt::Debug; | -------------------- the found opaque type @@ -22,12 +13,12 @@ LL | let _: &'static str = x; found opaque type `impl Debug` error[E0605]: non-primitive cast: `impl Debug` as `&'static str` - --> $DIR/never_reveal_concrete_type.rs:17:13 + --> $DIR/never_reveal_concrete_type.rs:16:13 | LL | let _ = x as &'static str; | ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors Some errors have detailed explanations: E0308, E0605. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr index 530f8876cf20..725958358a11 100644 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/never_reveal_concrete_type.rs:16:27 + --> $DIR/never_reveal_concrete_type.rs:15:27 | LL | type NoReveal = impl std::fmt::Debug; | -------------------- the found opaque type @@ -13,7 +13,7 @@ LL | let _: &'static str = x; found opaque type `impl Debug` error[E0605]: non-primitive cast: `impl Debug` as `&'static str` - --> $DIR/never_reveal_concrete_type.rs:17:13 + --> $DIR/never_reveal_concrete_type.rs:16:13 | LL | let _ = x as &'static str; | ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs index c555b9cdded8..1672c49c604a 100644 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs +++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr index faddecb21766..917830c6a098 100644 --- a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/no_inferrable_concrete_type.rs:6:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: could not find defining uses - --> $DIR/no_inferrable_concrete_type.rs:9:12 + --> $DIR/no_inferrable_concrete_type.rs:8:12 | LL | type Foo = impl Copy; | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr index 3194bd761071..917830c6a098 100644 --- a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr @@ -1,5 +1,5 @@ error: could not find defining uses - --> $DIR/no_inferrable_concrete_type.rs:9:12 + --> $DIR/no_inferrable_concrete_type.rs:8:12 | LL | type Foo = impl Copy; | ^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs index 409eec7250fd..520954b50ab5 100644 --- a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs +++ b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs @@ -4,7 +4,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Foo = impl Copy; //~ could not find defining uses diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr index 8699b21929ff..0f0141dcb99f 100644 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/no_revealing_outside_defining_module.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:18:19 + --> $DIR/no_revealing_outside_defining_module.rs:17:19 | LL | pub type Boo = impl ::std::fmt::Debug; | ---------------------- the found opaque type @@ -22,7 +13,7 @@ LL | let _: &str = bomp(); found opaque type `impl Debug` error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:22:5 + --> $DIR/no_revealing_outside_defining_module.rs:21:5 | LL | pub type Boo = impl ::std::fmt::Debug; | ---------------------- the expected opaque type @@ -35,6 +26,6 @@ LL | "" = note: expected opaque type `impl Debug` found reference `&'static str` -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr index faaab4393521..0f0141dcb99f 100644 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:18:19 + --> $DIR/no_revealing_outside_defining_module.rs:17:19 | LL | pub type Boo = impl ::std::fmt::Debug; | ---------------------- the found opaque type @@ -13,7 +13,7 @@ LL | let _: &str = bomp(); found opaque type `impl Debug` error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:22:5 + --> $DIR/no_revealing_outside_defining_module.rs:21:5 | LL | pub type Boo = impl ::std::fmt::Debug; | ---------------------- the expected opaque type diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs index 566c311b9bdf..5ab793c0119f 100644 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs +++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr b/src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr index 76e3500e8a90..d7f8d04ff808 100644 --- a/src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr @@ -1,23 +1,14 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/not_a_defining_use.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: non-defining opaque type use in defining scope - --> $DIR/not_a_defining_use.rs:12:27 + --> $DIR/not_a_defining_use.rs:11:27 | LL | fn two(t: T) -> Two { | ^^^^^^^^^^^ | note: used non-generic type `u32` for generic parameter - --> $DIR/not_a_defining_use.rs:10:13 + --> $DIR/not_a_defining_use.rs:9:13 | LL | type Two = impl Debug; | ^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr b/src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr index f5dbfecc742f..d7f8d04ff808 100644 --- a/src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/not_a_defining_use.rs:12:27 + --> $DIR/not_a_defining_use.rs:11:27 | LL | fn two(t: T) -> Two { | ^^^^^^^^^^^ | note: used non-generic type `u32` for generic parameter - --> $DIR/not_a_defining_use.rs:10:13 + --> $DIR/not_a_defining_use.rs:9:13 | LL | type Two = impl Debug; | ^ diff --git a/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs b/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs index e58f33fcff48..57ccb58acc93 100644 --- a/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs +++ b/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr b/src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr index 38f086ec45d6..59f07482ddbc 100644 --- a/src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr @@ -1,18 +1,9 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/not_well_formed.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0220]: associated type `Assoc` not found for `V` - --> $DIR/not_well_formed.rs:13:29 + --> $DIR/not_well_formed.rs:11:29 | LL | type Foo = impl Trait; | ^^^^^ associated type `Assoc` not found -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0220`. diff --git a/src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr b/src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr index 3bac38cef7da..59f07482ddbc 100644 --- a/src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr @@ -1,5 +1,5 @@ error[E0220]: associated type `Assoc` not found for `V` - --> $DIR/not_well_formed.rs:13:29 + --> $DIR/not_well_formed.rs:11:29 | LL | type Foo = impl Trait; | ^^^^^ associated type `Assoc` not found diff --git a/src/test/ui/type-alias-impl-trait/not_well_formed.rs b/src/test/ui/type-alias-impl-trait/not_well_formed.rs index 6d511c581888..c3e9895524e1 100644 --- a/src/test/ui/type-alias-impl-trait/not_well_formed.rs +++ b/src/test/ui/type-alias-impl-trait/not_well_formed.rs @@ -1,10 +1,8 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete -fn main() { -} +fn main() {} trait TraitWithAssoc { type Assoc; diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr index d5a4fa52dfb7..ce0827d94f94 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/structural-match-no-leak.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `impl Send` cannot be used in patterns - --> $DIR/structural-match-no-leak.rs:18:9 + --> $DIR/structural-match-no-leak.rs:17:9 | LL | LEAK_FREE => (), | ^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr index b7caf8ed2986..ce0827d94f94 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr @@ -1,5 +1,5 @@ error: `impl Send` cannot be used in patterns - --> $DIR/structural-match-no-leak.rs:18:9 + --> $DIR/structural-match-no-leak.rs:17:9 | LL | LEAK_FREE => (), | ^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs index e2b10e7355fb..7a067c6f2d75 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs +++ b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Bar = impl Send; diff --git a/src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr index d394c99df802..cb2cf59774ba 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/structural-match.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: `impl Send` cannot be used in patterns - --> $DIR/structural-match.rs:19:9 + --> $DIR/structural-match.rs:18:9 | LL | VALUE => (), | ^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr index f63b1fb23df7..cb2cf59774ba 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr @@ -1,5 +1,5 @@ error: `impl Send` cannot be used in patterns - --> $DIR/structural-match.rs:19:9 + --> $DIR/structural-match.rs:18:9 | LL | VALUE => (), | ^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/structural-match.rs b/src/test/ui/type-alias-impl-trait/structural-match.rs index aed9334b3cc8..c30cd5f5958e 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match.rs +++ b/src/test/ui/type-alias-impl-trait/structural-match.rs @@ -2,7 +2,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Foo = impl Send; diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr index 6f817757cc4b..2a40ccc074b9 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr @@ -1,14 +1,5 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-const.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0308]: mismatched types - --> $DIR/type-alias-impl-trait-const.rs:13:19 + --> $DIR/type-alias-impl-trait-const.rs:12:19 | LL | pub type Foo = impl Debug; | ---------- the expected opaque type @@ -20,11 +11,11 @@ LL | const _FOO: Foo = 5; found type `{integer}` error: could not find defining uses - --> $DIR/type-alias-impl-trait-const.rs:10:16 + --> $DIR/type-alias-impl-trait-const.rs:9:16 | LL | pub type Foo = impl Debug; | ^^^^^^^^^^ -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr index ce98318333b0..2a40ccc074b9 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/type-alias-impl-trait-const.rs:13:19 + --> $DIR/type-alias-impl-trait-const.rs:12:19 | LL | pub type Foo = impl Debug; | ---------- the expected opaque type @@ -11,7 +11,7 @@ LL | const _FOO: Foo = 5; found type `{integer}` error: could not find defining uses - --> $DIR/type-alias-impl-trait-const.rs:10:16 + --> $DIR/type-alias-impl-trait-const.rs:9:16 | LL | pub type Foo = impl Debug; | ^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs index 751512c5dfc0..4432807916eb 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // Ensures that `const` items can constrain an opaque `impl Trait`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.full_tait.stderr deleted file mode 100644 index fb88c2043bd3..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-fns.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs index a6b00220084a..e3debedbde30 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // Regression test for issue #61863 @@ -11,20 +10,19 @@ pub trait MyTrait {} #[derive(Debug)] pub struct MyStruct { - v: u64 + v: u64, } impl MyTrait for MyStruct {} pub fn bla() -> TE { - return MyStruct {v:1} + return MyStruct { v: 1 }; } pub fn bla2() -> TE { bla() } - type TE = impl MyTrait; fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.full_tait.stderr deleted file mode 100644 index cbecd0bb3d48..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-sized.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs index b062739921fa..b0f6a5a2db3e 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs @@ -3,18 +3,25 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type A = impl Sized; -fn f1() -> A { 0 } +fn f1() -> A { + 0 +} type B = impl ?Sized; -fn f2() -> &'static B { &[0] } +fn f2() -> &'static B { + &[0] +} type C = impl ?Sized + 'static; -fn f3() -> &'static C { &[0] } +fn f3() -> &'static C { + &[0] +} type D = impl ?Sized; -fn f4() -> &'static D { &1 } +fn f4() -> &'static D { + &1 +} fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.full_tait.stderr deleted file mode 100644 index 1a351867bff2..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-tuple.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs index ad2c11d4f994..5f228ec03f73 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete #![allow(dead_code)] pub trait MyTrait {} diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr index b16d9c2c143b..c4bd4deaa061 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr @@ -1,18 +1,9 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:13:6 + --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:12:6 | LL | impl<'a, I: Iterator> Trait for (i32, I) { | ^^ unconstrained lifetime parameter -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr index 7d4abb0fafbb..c4bd4deaa061 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr @@ -1,5 +1,5 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:13:6 + --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:12:6 | LL | impl<'a, I: Iterator> Trait for (i32, I) { | ^^ unconstrained lifetime parameter diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs index 97294e81dca6..63bbbaa707c9 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete trait Trait { type Associated; diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr index e3fd076fc492..f1b9f23f0664 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-with-cycle-error.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error.rs:6:12 + --> $DIR/type-alias-impl-trait-with-cycle-error.rs:5:12 | LL | type Foo = impl Fn() -> Foo; | ^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr index 556779574e43..f1b9f23f0664 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr @@ -1,5 +1,5 @@ error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error.rs:6:12 + --> $DIR/type-alias-impl-trait-with-cycle-error.rs:5:12 | LL | type Foo = impl Fn() -> Foo; | ^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs index dba0d2c2cdf4..2b3694d50100 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Foo = impl Fn() -> Foo; //~^ ERROR: could not find defining uses diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr index eccf08b4a124..2df29d72c1e3 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr @@ -1,17 +1,8 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:10:12 + --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:9:12 | LL | type Foo = impl Bar; | ^^^^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr index 44d279cad171..2df29d72c1e3 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr @@ -1,5 +1,5 @@ error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:10:12 + --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:9:12 | LL | type Foo = impl Bar; | ^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs index f20440371258..2d7e21397072 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete pub trait Bar { type Item; @@ -14,6 +13,4 @@ fn crash(x: Foo) -> Foo { x } -fn main() { - -} +fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr index 6ada4b2fdffe..4c32549ce30b 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr @@ -1,23 +1,14 @@ error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:6:12 + --> $DIR/type-alias-impl-trait-with-no-traits.rs:5:12 | LL | type Foo = impl 'static; | ^^^^^^^^^^^^ error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:13:13 + --> $DIR/type-alias-impl-trait-with-no-traits.rs:12:13 | LL | fn bar() -> impl 'static { | ^^^^^^^^^^^^ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait-with-no-traits.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr index 5fd8aac55075..4c32549ce30b 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr @@ -1,11 +1,11 @@ error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:6:12 + --> $DIR/type-alias-impl-trait-with-no-traits.rs:5:12 | LL | type Foo = impl 'static; | ^^^^^^^^^^^^ error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:13:13 + --> $DIR/type-alias-impl-trait-with-no-traits.rs:12:13 | LL | fn bar() -> impl 'static { | ^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs index 7efc79005886..469f3875a8d4 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs @@ -1,7 +1,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete type Foo = impl 'static; //~^ ERROR: at least one trait must be specified diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.full_tait.stderr deleted file mode 100644 index 8c0f7758dae6..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-impl-trait.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs index 6176595534a3..934acb0d9afa 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs @@ -6,7 +6,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete fn main() { assert_eq!(foo().to_string(), "foo"); diff --git a/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.full_tait.stderr deleted file mode 100644 index ed4fe41da3ed..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/type-alias-nested-impl-trait.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs b/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs index 3023bf06562f..8bdac325cd70 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete use std::iter::{once, Chain}; diff --git a/src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr b/src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr index b70f36b67ab3..995a6dfbf877 100644 --- a/src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr @@ -1,23 +1,14 @@ error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:9:28 + --> $DIR/unused_generic_param.rs:7:28 | LL | type PartiallyDefined = impl 'static; | ^^^^^^^^^^^^ error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:16:29 + --> $DIR/unused_generic_param.rs:14:29 | LL | type PartiallyDefined2 = impl 'static; | ^^^^^^^^^^^^ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/unused_generic_param.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -error: aborting due to 2 previous errors; 1 warning emitted +error: aborting due to 2 previous errors diff --git a/src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr b/src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr index 561025c88f8f..995a6dfbf877 100644 --- a/src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr @@ -1,11 +1,11 @@ error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:9:28 + --> $DIR/unused_generic_param.rs:7:28 | LL | type PartiallyDefined = impl 'static; | ^^^^^^^^^^^^ error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:16:29 + --> $DIR/unused_generic_param.rs:14:29 | LL | type PartiallyDefined2 = impl 'static; | ^^^^^^^^^^^^ diff --git a/src/test/ui/type-alias-impl-trait/unused_generic_param.rs b/src/test/ui/type-alias-impl-trait/unused_generic_param.rs index 59c7646ade26..8c946238362c 100644 --- a/src/test/ui/type-alias-impl-trait/unused_generic_param.rs +++ b/src/test/ui/type-alias-impl-trait/unused_generic_param.rs @@ -1,10 +1,8 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete -fn main() { -} +fn main() {} type PartiallyDefined = impl 'static; //~^ ERROR: at least one trait must be specified diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr index b6aea9586b87..3427dc0e6221 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr +++ b/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr @@ -1,35 +1,35 @@ error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:157:18 + --> $DIR/typeck_type_placeholder_item.rs:156:18 | LL | struct BadStruct<_>(_); | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:160:16 + --> $DIR/typeck_type_placeholder_item.rs:159:16 | LL | trait BadTrait<_> {} | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:170:19 + --> $DIR/typeck_type_placeholder_item.rs:169:19 | LL | struct BadStruct1<_, _>(_); | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:170:22 + --> $DIR/typeck_type_placeholder_item.rs:169:22 | LL | struct BadStruct1<_, _>(_); | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:175:19 + --> $DIR/typeck_type_placeholder_item.rs:174:19 | LL | struct BadStruct2<_, T>(_, T); | ^ expected identifier, found reserved identifier error: associated constant in `impl` without body - --> $DIR/typeck_type_placeholder_item.rs:208:5 + --> $DIR/typeck_type_placeholder_item.rs:207:5 | LL | const C: _; | ^^^^^^^^^^- @@ -37,24 +37,15 @@ LL | const C: _; | help: provide a definition for the constant: `= ;` error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters - --> $DIR/typeck_type_placeholder_item.rs:170:22 + --> $DIR/typeck_type_placeholder_item.rs:169:22 | LL | struct BadStruct1<_, _>(_); | - ^ already used | | | first use of `_` -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/typeck_type_placeholder_item.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:10:14 + --> $DIR/typeck_type_placeholder_item.rs:9:14 | LL | fn test() -> _ { 5 } | ^ @@ -63,7 +54,7 @@ LL | fn test() -> _ { 5 } | help: replace with the correct return type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:13:16 + --> $DIR/typeck_type_placeholder_item.rs:12:16 | LL | fn test2() -> (_, _) { (5, 5) } | -^--^- @@ -73,7 +64,7 @@ LL | fn test2() -> (_, _) { (5, 5) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:16:15 + --> $DIR/typeck_type_placeholder_item.rs:15:15 | LL | static TEST3: _ = "test"; | ^ @@ -82,7 +73,7 @@ LL | static TEST3: _ = "test"; | help: replace with the correct type: `&str` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:19:15 + --> $DIR/typeck_type_placeholder_item.rs:18:15 | LL | static TEST4: _ = 145; | ^ @@ -91,13 +82,13 @@ LL | static TEST4: _ = 145; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:22:15 + --> $DIR/typeck_type_placeholder_item.rs:21:15 | LL | static TEST5: (_, _) = (1, 2); | ^^^^^^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:25:13 + --> $DIR/typeck_type_placeholder_item.rs:24:13 | LL | fn test6(_: _) { } | ^ not allowed in type signatures @@ -108,7 +99,7 @@ LL | fn test6(_: T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:28:18 + --> $DIR/typeck_type_placeholder_item.rs:27:18 | LL | fn test6_b(_: _, _: T) { } | ^ not allowed in type signatures @@ -119,7 +110,7 @@ LL | fn test6_b(_: U, _: T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:31:30 + --> $DIR/typeck_type_placeholder_item.rs:30:30 | LL | fn test6_c(_: _, _: (T, K, L, A, B)) { } | ^ not allowed in type signatures @@ -130,7 +121,7 @@ LL | fn test6_c(_: U, _: (T, K, L, A, B)) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:34:13 + --> $DIR/typeck_type_placeholder_item.rs:33:13 | LL | fn test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures @@ -141,7 +132,7 @@ LL | fn test7(x: T) { let _x: usize = x; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:37:22 + --> $DIR/typeck_type_placeholder_item.rs:36:22 | LL | fn test8(_f: fn() -> _) { } | ^ @@ -150,7 +141,7 @@ LL | fn test8(_f: fn() -> _) { } | help: use type parameters instead: `T` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:37:22 + --> $DIR/typeck_type_placeholder_item.rs:36:22 | LL | fn test8(_f: fn() -> _) { } | ^ not allowed in type signatures @@ -161,7 +152,7 @@ LL | fn test8(_f: fn() -> T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:51:26 + --> $DIR/typeck_type_placeholder_item.rs:50:26 | LL | fn test11(x: &usize) -> &_ { | -^ @@ -170,7 +161,7 @@ LL | fn test11(x: &usize) -> &_ { | help: replace with the correct return type: `&'static &'static usize` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:56:52 + --> $DIR/typeck_type_placeholder_item.rs:55:52 | LL | unsafe fn test12(x: *const usize) -> *const *const _ { | --------------^ @@ -179,7 +170,7 @@ LL | unsafe fn test12(x: *const usize) -> *const *const _ { | help: replace with the correct return type: `*const *const usize` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:70:8 + --> $DIR/typeck_type_placeholder_item.rs:69:8 | LL | a: _, | ^ not allowed in type signatures @@ -198,13 +189,13 @@ LL | b: (T, T), | error: missing type for `static` item - --> $DIR/typeck_type_placeholder_item.rs:76:12 + --> $DIR/typeck_type_placeholder_item.rs:75:12 | LL | static A = 42; | ^ help: provide a type for the static variable: `A: i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:78:15 + --> $DIR/typeck_type_placeholder_item.rs:77:15 | LL | static B: _ = 42; | ^ @@ -213,13 +204,13 @@ LL | static B: _ = 42; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:80:15 + --> $DIR/typeck_type_placeholder_item.rs:79:15 | LL | static C: Option<_> = Some(42); | ^^^^^^^^^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:82:21 + --> $DIR/typeck_type_placeholder_item.rs:81:21 | LL | fn fn_test() -> _ { 5 } | ^ @@ -228,7 +219,7 @@ LL | fn fn_test() -> _ { 5 } | help: replace with the correct return type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:85:23 + --> $DIR/typeck_type_placeholder_item.rs:84:23 | LL | fn fn_test2() -> (_, _) { (5, 5) } | -^--^- @@ -238,7 +229,7 @@ LL | fn fn_test2() -> (_, _) { (5, 5) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:88:22 + --> $DIR/typeck_type_placeholder_item.rs:87:22 | LL | static FN_TEST3: _ = "test"; | ^ @@ -247,7 +238,7 @@ LL | static FN_TEST3: _ = "test"; | help: replace with the correct type: `&str` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:91:22 + --> $DIR/typeck_type_placeholder_item.rs:90:22 | LL | static FN_TEST4: _ = 145; | ^ @@ -256,13 +247,13 @@ LL | static FN_TEST4: _ = 145; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:94:22 + --> $DIR/typeck_type_placeholder_item.rs:93:22 | LL | static FN_TEST5: (_, _) = (1, 2); | ^^^^^^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:97:20 + --> $DIR/typeck_type_placeholder_item.rs:96:20 | LL | fn fn_test6(_: _) { } | ^ not allowed in type signatures @@ -273,7 +264,7 @@ LL | fn fn_test6(_: T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:100:20 + --> $DIR/typeck_type_placeholder_item.rs:99:20 | LL | fn fn_test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures @@ -284,7 +275,7 @@ LL | fn fn_test7(x: T) { let _x: usize = x; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:103:29 + --> $DIR/typeck_type_placeholder_item.rs:102:29 | LL | fn fn_test8(_f: fn() -> _) { } | ^ @@ -293,7 +284,7 @@ LL | fn fn_test8(_f: fn() -> _) { } | help: use type parameters instead: `T` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:103:29 + --> $DIR/typeck_type_placeholder_item.rs:102:29 | LL | fn fn_test8(_f: fn() -> _) { } | ^ not allowed in type signatures @@ -304,7 +295,7 @@ LL | fn fn_test8(_f: fn() -> T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:126:12 + --> $DIR/typeck_type_placeholder_item.rs:125:12 | LL | a: _, | ^ not allowed in type signatures @@ -323,13 +314,13 @@ LL | b: (T, T), | error[E0282]: type annotations needed - --> $DIR/typeck_type_placeholder_item.rs:131:18 + --> $DIR/typeck_type_placeholder_item.rs:130:18 | LL | fn fn_test11(_: _) -> (_, _) { panic!() } | ^ cannot infer type error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:131:28 + --> $DIR/typeck_type_placeholder_item.rs:130:28 | LL | fn fn_test11(_: _) -> (_, _) { panic!() } | ^ ^ not allowed in type signatures @@ -337,7 +328,7 @@ LL | fn fn_test11(_: _) -> (_, _) { panic!() } | not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:135:30 + --> $DIR/typeck_type_placeholder_item.rs:134:30 | LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } | -^--^- @@ -347,7 +338,7 @@ LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:138:33 + --> $DIR/typeck_type_placeholder_item.rs:137:33 | LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } | ------^- @@ -356,7 +347,7 @@ LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:157:21 + --> $DIR/typeck_type_placeholder_item.rs:156:21 | LL | struct BadStruct<_>(_); | ^ not allowed in type signatures @@ -367,7 +358,7 @@ LL | struct BadStruct(T); | ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations - --> $DIR/typeck_type_placeholder_item.rs:162:15 + --> $DIR/typeck_type_placeholder_item.rs:161:15 | LL | impl BadTrait<_> for BadStruct<_> {} | ^ ^ not allowed in type signatures @@ -380,13 +371,13 @@ LL | impl BadTrait for BadStruct {} | ^^^ ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:165:34 + --> $DIR/typeck_type_placeholder_item.rs:164:34 | LL | fn impl_trait() -> impl BadTrait<_> { | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:170:25 + --> $DIR/typeck_type_placeholder_item.rs:169:25 | LL | struct BadStruct1<_, _>(_); | ^ not allowed in type signatures @@ -397,7 +388,7 @@ LL | struct BadStruct1(T); | ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:175:25 + --> $DIR/typeck_type_placeholder_item.rs:174:25 | LL | struct BadStruct2<_, T>(_, T); | ^ not allowed in type signatures @@ -408,19 +399,19 @@ LL | struct BadStruct2(U, T); | ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases - --> $DIR/typeck_type_placeholder_item.rs:179:14 + --> $DIR/typeck_type_placeholder_item.rs:178:14 | LL | type X = Box<_>; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:185:21 + --> $DIR/typeck_type_placeholder_item.rs:184:21 | LL | type Y = impl Trait<_>; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:219:31 + --> $DIR/typeck_type_placeholder_item.rs:218:31 | LL | fn value() -> Option<&'static _> { | ----------------^- @@ -429,7 +420,7 @@ LL | fn value() -> Option<&'static _> { | help: replace with the correct return type: `Option<&'static u8>` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:224:10 + --> $DIR/typeck_type_placeholder_item.rs:223:10 | LL | const _: Option<_> = map(value); | ^^^^^^^^^ @@ -438,7 +429,7 @@ LL | const _: Option<_> = map(value); | help: replace with the correct type: `Option` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:143:31 + --> $DIR/typeck_type_placeholder_item.rs:142:31 | LL | fn method_test1(&self, x: _); | ^ not allowed in type signatures @@ -449,7 +440,7 @@ LL | fn method_test1(&self, x: T); | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:145:31 + --> $DIR/typeck_type_placeholder_item.rs:144:31 | LL | fn method_test2(&self, x: _) -> _; | ^ ^ not allowed in type signatures @@ -462,7 +453,7 @@ LL | fn method_test2(&self, x: T) -> T; | ^^^ ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:147:31 + --> $DIR/typeck_type_placeholder_item.rs:146:31 | LL | fn method_test3(&self) -> _; | ^ not allowed in type signatures @@ -473,7 +464,7 @@ LL | fn method_test3(&self) -> T; | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:149:26 + --> $DIR/typeck_type_placeholder_item.rs:148:26 | LL | fn assoc_fn_test1(x: _); | ^ not allowed in type signatures @@ -484,7 +475,7 @@ LL | fn assoc_fn_test1(x: T); | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:151:26 + --> $DIR/typeck_type_placeholder_item.rs:150:26 | LL | fn assoc_fn_test2(x: _) -> _; | ^ ^ not allowed in type signatures @@ -497,7 +488,7 @@ LL | fn assoc_fn_test2(x: T) -> T; | ^^^ ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:153:28 + --> $DIR/typeck_type_placeholder_item.rs:152:28 | LL | fn assoc_fn_test3() -> _; | ^ not allowed in type signatures @@ -508,19 +499,19 @@ LL | fn assoc_fn_test3() -> T; | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:193:14 + --> $DIR/typeck_type_placeholder_item.rs:192:14 | LL | type B = _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:195:14 + --> $DIR/typeck_type_placeholder_item.rs:194:14 | LL | const C: _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:197:14 + --> $DIR/typeck_type_placeholder_item.rs:196:14 | LL | const D: _ = 42; | ^ @@ -529,13 +520,13 @@ LL | const D: _ = 42; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:200:26 + --> $DIR/typeck_type_placeholder_item.rs:199:26 | LL | type F: std::ops::Fn(_); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:44:24 + --> $DIR/typeck_type_placeholder_item.rs:43:24 | LL | fn test9(&self) -> _ { () } | ^ @@ -544,7 +535,7 @@ LL | fn test9(&self) -> _ { () } | help: replace with the correct return type: `()` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:47:27 + --> $DIR/typeck_type_placeholder_item.rs:46:27 | LL | fn test10(&self, _x : _) { } | ^ not allowed in type signatures @@ -555,7 +546,7 @@ LL | fn test10(&self, _x : T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:62:24 + --> $DIR/typeck_type_placeholder_item.rs:61:24 | LL | fn clone(&self) -> _ { Test9 } | ^ @@ -564,7 +555,7 @@ LL | fn clone(&self) -> _ { Test9 } | help: replace with the correct return type: `Test9` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:65:37 + --> $DIR/typeck_type_placeholder_item.rs:64:37 | LL | fn clone_from(&mut self, other: _) { *self = Test9; } | ^ not allowed in type signatures @@ -575,7 +566,7 @@ LL | fn clone_from(&mut self, other: T) { *self = Test9; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:110:31 + --> $DIR/typeck_type_placeholder_item.rs:109:31 | LL | fn fn_test9(&self) -> _ { () } | ^ @@ -584,7 +575,7 @@ LL | fn fn_test9(&self) -> _ { () } | help: replace with the correct return type: `()` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:113:34 + --> $DIR/typeck_type_placeholder_item.rs:112:34 | LL | fn fn_test10(&self, _x : _) { } | ^ not allowed in type signatures @@ -595,7 +586,7 @@ LL | fn fn_test10(&self, _x : T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:118:28 + --> $DIR/typeck_type_placeholder_item.rs:117:28 | LL | fn clone(&self) -> _ { FnTest9 } | ^ @@ -604,7 +595,7 @@ LL | fn clone(&self) -> _ { FnTest9 } | help: replace with the correct return type: `FnTest9` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:121:41 + --> $DIR/typeck_type_placeholder_item.rs:120:41 | LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } | ^ not allowed in type signatures @@ -615,25 +606,25 @@ LL | fn clone_from(&mut self, other: T) { *self = FnTest9; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:204:14 + --> $DIR/typeck_type_placeholder_item.rs:203:14 | LL | type A = _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:206:14 + --> $DIR/typeck_type_placeholder_item.rs:205:14 | LL | type B = _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:208:14 + --> $DIR/typeck_type_placeholder_item.rs:207:14 | LL | const C: _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:211:14 + --> $DIR/typeck_type_placeholder_item.rs:210:14 | LL | const D: _ = 42; | ^ @@ -641,7 +632,7 @@ LL | const D: _ = 42; | not allowed in type signatures | help: replace with the correct type: `i32` -error: aborting due to 69 previous errors; 1 warning emitted +error: aborting due to 69 previous errors Some errors have detailed explanations: E0121, E0282, E0403. For more information about an error, try `rustc --explain E0121`. diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr index 88cc3bfc7f8c..3427dc0e6221 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr +++ b/src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr @@ -1,35 +1,35 @@ error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:157:18 + --> $DIR/typeck_type_placeholder_item.rs:156:18 | LL | struct BadStruct<_>(_); | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:160:16 + --> $DIR/typeck_type_placeholder_item.rs:159:16 | LL | trait BadTrait<_> {} | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:170:19 + --> $DIR/typeck_type_placeholder_item.rs:169:19 | LL | struct BadStruct1<_, _>(_); | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:170:22 + --> $DIR/typeck_type_placeholder_item.rs:169:22 | LL | struct BadStruct1<_, _>(_); | ^ expected identifier, found reserved identifier error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:175:19 + --> $DIR/typeck_type_placeholder_item.rs:174:19 | LL | struct BadStruct2<_, T>(_, T); | ^ expected identifier, found reserved identifier error: associated constant in `impl` without body - --> $DIR/typeck_type_placeholder_item.rs:208:5 + --> $DIR/typeck_type_placeholder_item.rs:207:5 | LL | const C: _; | ^^^^^^^^^^- @@ -37,7 +37,7 @@ LL | const C: _; | help: provide a definition for the constant: `= ;` error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters - --> $DIR/typeck_type_placeholder_item.rs:170:22 + --> $DIR/typeck_type_placeholder_item.rs:169:22 | LL | struct BadStruct1<_, _>(_); | - ^ already used @@ -45,7 +45,7 @@ LL | struct BadStruct1<_, _>(_); | first use of `_` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:10:14 + --> $DIR/typeck_type_placeholder_item.rs:9:14 | LL | fn test() -> _ { 5 } | ^ @@ -54,7 +54,7 @@ LL | fn test() -> _ { 5 } | help: replace with the correct return type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:13:16 + --> $DIR/typeck_type_placeholder_item.rs:12:16 | LL | fn test2() -> (_, _) { (5, 5) } | -^--^- @@ -64,7 +64,7 @@ LL | fn test2() -> (_, _) { (5, 5) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:16:15 + --> $DIR/typeck_type_placeholder_item.rs:15:15 | LL | static TEST3: _ = "test"; | ^ @@ -73,7 +73,7 @@ LL | static TEST3: _ = "test"; | help: replace with the correct type: `&str` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:19:15 + --> $DIR/typeck_type_placeholder_item.rs:18:15 | LL | static TEST4: _ = 145; | ^ @@ -82,13 +82,13 @@ LL | static TEST4: _ = 145; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:22:15 + --> $DIR/typeck_type_placeholder_item.rs:21:15 | LL | static TEST5: (_, _) = (1, 2); | ^^^^^^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:25:13 + --> $DIR/typeck_type_placeholder_item.rs:24:13 | LL | fn test6(_: _) { } | ^ not allowed in type signatures @@ -99,7 +99,7 @@ LL | fn test6(_: T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:28:18 + --> $DIR/typeck_type_placeholder_item.rs:27:18 | LL | fn test6_b(_: _, _: T) { } | ^ not allowed in type signatures @@ -110,7 +110,7 @@ LL | fn test6_b(_: U, _: T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:31:30 + --> $DIR/typeck_type_placeholder_item.rs:30:30 | LL | fn test6_c(_: _, _: (T, K, L, A, B)) { } | ^ not allowed in type signatures @@ -121,7 +121,7 @@ LL | fn test6_c(_: U, _: (T, K, L, A, B)) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:34:13 + --> $DIR/typeck_type_placeholder_item.rs:33:13 | LL | fn test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures @@ -132,7 +132,7 @@ LL | fn test7(x: T) { let _x: usize = x; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:37:22 + --> $DIR/typeck_type_placeholder_item.rs:36:22 | LL | fn test8(_f: fn() -> _) { } | ^ @@ -141,7 +141,7 @@ LL | fn test8(_f: fn() -> _) { } | help: use type parameters instead: `T` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:37:22 + --> $DIR/typeck_type_placeholder_item.rs:36:22 | LL | fn test8(_f: fn() -> _) { } | ^ not allowed in type signatures @@ -152,7 +152,7 @@ LL | fn test8(_f: fn() -> T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:51:26 + --> $DIR/typeck_type_placeholder_item.rs:50:26 | LL | fn test11(x: &usize) -> &_ { | -^ @@ -161,7 +161,7 @@ LL | fn test11(x: &usize) -> &_ { | help: replace with the correct return type: `&'static &'static usize` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:56:52 + --> $DIR/typeck_type_placeholder_item.rs:55:52 | LL | unsafe fn test12(x: *const usize) -> *const *const _ { | --------------^ @@ -170,7 +170,7 @@ LL | unsafe fn test12(x: *const usize) -> *const *const _ { | help: replace with the correct return type: `*const *const usize` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:70:8 + --> $DIR/typeck_type_placeholder_item.rs:69:8 | LL | a: _, | ^ not allowed in type signatures @@ -189,13 +189,13 @@ LL | b: (T, T), | error: missing type for `static` item - --> $DIR/typeck_type_placeholder_item.rs:76:12 + --> $DIR/typeck_type_placeholder_item.rs:75:12 | LL | static A = 42; | ^ help: provide a type for the static variable: `A: i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:78:15 + --> $DIR/typeck_type_placeholder_item.rs:77:15 | LL | static B: _ = 42; | ^ @@ -204,13 +204,13 @@ LL | static B: _ = 42; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:80:15 + --> $DIR/typeck_type_placeholder_item.rs:79:15 | LL | static C: Option<_> = Some(42); | ^^^^^^^^^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:82:21 + --> $DIR/typeck_type_placeholder_item.rs:81:21 | LL | fn fn_test() -> _ { 5 } | ^ @@ -219,7 +219,7 @@ LL | fn fn_test() -> _ { 5 } | help: replace with the correct return type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:85:23 + --> $DIR/typeck_type_placeholder_item.rs:84:23 | LL | fn fn_test2() -> (_, _) { (5, 5) } | -^--^- @@ -229,7 +229,7 @@ LL | fn fn_test2() -> (_, _) { (5, 5) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:88:22 + --> $DIR/typeck_type_placeholder_item.rs:87:22 | LL | static FN_TEST3: _ = "test"; | ^ @@ -238,7 +238,7 @@ LL | static FN_TEST3: _ = "test"; | help: replace with the correct type: `&str` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:91:22 + --> $DIR/typeck_type_placeholder_item.rs:90:22 | LL | static FN_TEST4: _ = 145; | ^ @@ -247,13 +247,13 @@ LL | static FN_TEST4: _ = 145; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:94:22 + --> $DIR/typeck_type_placeholder_item.rs:93:22 | LL | static FN_TEST5: (_, _) = (1, 2); | ^^^^^^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:97:20 + --> $DIR/typeck_type_placeholder_item.rs:96:20 | LL | fn fn_test6(_: _) { } | ^ not allowed in type signatures @@ -264,7 +264,7 @@ LL | fn fn_test6(_: T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:100:20 + --> $DIR/typeck_type_placeholder_item.rs:99:20 | LL | fn fn_test7(x: _) { let _x: usize = x; } | ^ not allowed in type signatures @@ -275,7 +275,7 @@ LL | fn fn_test7(x: T) { let _x: usize = x; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:103:29 + --> $DIR/typeck_type_placeholder_item.rs:102:29 | LL | fn fn_test8(_f: fn() -> _) { } | ^ @@ -284,7 +284,7 @@ LL | fn fn_test8(_f: fn() -> _) { } | help: use type parameters instead: `T` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:103:29 + --> $DIR/typeck_type_placeholder_item.rs:102:29 | LL | fn fn_test8(_f: fn() -> _) { } | ^ not allowed in type signatures @@ -295,7 +295,7 @@ LL | fn fn_test8(_f: fn() -> T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:126:12 + --> $DIR/typeck_type_placeholder_item.rs:125:12 | LL | a: _, | ^ not allowed in type signatures @@ -314,13 +314,13 @@ LL | b: (T, T), | error[E0282]: type annotations needed - --> $DIR/typeck_type_placeholder_item.rs:131:18 + --> $DIR/typeck_type_placeholder_item.rs:130:18 | LL | fn fn_test11(_: _) -> (_, _) { panic!() } | ^ cannot infer type error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:131:28 + --> $DIR/typeck_type_placeholder_item.rs:130:28 | LL | fn fn_test11(_: _) -> (_, _) { panic!() } | ^ ^ not allowed in type signatures @@ -328,7 +328,7 @@ LL | fn fn_test11(_: _) -> (_, _) { panic!() } | not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:135:30 + --> $DIR/typeck_type_placeholder_item.rs:134:30 | LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } | -^--^- @@ -338,7 +338,7 @@ LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:138:33 + --> $DIR/typeck_type_placeholder_item.rs:137:33 | LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } | ------^- @@ -347,7 +347,7 @@ LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } | help: replace with the correct return type: `(i32, i32)` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:157:21 + --> $DIR/typeck_type_placeholder_item.rs:156:21 | LL | struct BadStruct<_>(_); | ^ not allowed in type signatures @@ -358,7 +358,7 @@ LL | struct BadStruct(T); | ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations - --> $DIR/typeck_type_placeholder_item.rs:162:15 + --> $DIR/typeck_type_placeholder_item.rs:161:15 | LL | impl BadTrait<_> for BadStruct<_> {} | ^ ^ not allowed in type signatures @@ -371,13 +371,13 @@ LL | impl BadTrait for BadStruct {} | ^^^ ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:165:34 + --> $DIR/typeck_type_placeholder_item.rs:164:34 | LL | fn impl_trait() -> impl BadTrait<_> { | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:170:25 + --> $DIR/typeck_type_placeholder_item.rs:169:25 | LL | struct BadStruct1<_, _>(_); | ^ not allowed in type signatures @@ -388,7 +388,7 @@ LL | struct BadStruct1(T); | ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:175:25 + --> $DIR/typeck_type_placeholder_item.rs:174:25 | LL | struct BadStruct2<_, T>(_, T); | ^ not allowed in type signatures @@ -399,19 +399,19 @@ LL | struct BadStruct2(U, T); | ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases - --> $DIR/typeck_type_placeholder_item.rs:179:14 + --> $DIR/typeck_type_placeholder_item.rs:178:14 | LL | type X = Box<_>; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:185:21 + --> $DIR/typeck_type_placeholder_item.rs:184:21 | LL | type Y = impl Trait<_>; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:219:31 + --> $DIR/typeck_type_placeholder_item.rs:218:31 | LL | fn value() -> Option<&'static _> { | ----------------^- @@ -420,7 +420,7 @@ LL | fn value() -> Option<&'static _> { | help: replace with the correct return type: `Option<&'static u8>` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:224:10 + --> $DIR/typeck_type_placeholder_item.rs:223:10 | LL | const _: Option<_> = map(value); | ^^^^^^^^^ @@ -429,7 +429,7 @@ LL | const _: Option<_> = map(value); | help: replace with the correct type: `Option` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:143:31 + --> $DIR/typeck_type_placeholder_item.rs:142:31 | LL | fn method_test1(&self, x: _); | ^ not allowed in type signatures @@ -440,7 +440,7 @@ LL | fn method_test1(&self, x: T); | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:145:31 + --> $DIR/typeck_type_placeholder_item.rs:144:31 | LL | fn method_test2(&self, x: _) -> _; | ^ ^ not allowed in type signatures @@ -453,7 +453,7 @@ LL | fn method_test2(&self, x: T) -> T; | ^^^ ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:147:31 + --> $DIR/typeck_type_placeholder_item.rs:146:31 | LL | fn method_test3(&self) -> _; | ^ not allowed in type signatures @@ -464,7 +464,7 @@ LL | fn method_test3(&self) -> T; | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:149:26 + --> $DIR/typeck_type_placeholder_item.rs:148:26 | LL | fn assoc_fn_test1(x: _); | ^ not allowed in type signatures @@ -475,7 +475,7 @@ LL | fn assoc_fn_test1(x: T); | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:151:26 + --> $DIR/typeck_type_placeholder_item.rs:150:26 | LL | fn assoc_fn_test2(x: _) -> _; | ^ ^ not allowed in type signatures @@ -488,7 +488,7 @@ LL | fn assoc_fn_test2(x: T) -> T; | ^^^ ^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:153:28 + --> $DIR/typeck_type_placeholder_item.rs:152:28 | LL | fn assoc_fn_test3() -> _; | ^ not allowed in type signatures @@ -499,19 +499,19 @@ LL | fn assoc_fn_test3() -> T; | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:193:14 + --> $DIR/typeck_type_placeholder_item.rs:192:14 | LL | type B = _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:195:14 + --> $DIR/typeck_type_placeholder_item.rs:194:14 | LL | const C: _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:197:14 + --> $DIR/typeck_type_placeholder_item.rs:196:14 | LL | const D: _ = 42; | ^ @@ -520,13 +520,13 @@ LL | const D: _ = 42; | help: replace with the correct type: `i32` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:200:26 + --> $DIR/typeck_type_placeholder_item.rs:199:26 | LL | type F: std::ops::Fn(_); | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:44:24 + --> $DIR/typeck_type_placeholder_item.rs:43:24 | LL | fn test9(&self) -> _ { () } | ^ @@ -535,7 +535,7 @@ LL | fn test9(&self) -> _ { () } | help: replace with the correct return type: `()` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:47:27 + --> $DIR/typeck_type_placeholder_item.rs:46:27 | LL | fn test10(&self, _x : _) { } | ^ not allowed in type signatures @@ -546,7 +546,7 @@ LL | fn test10(&self, _x : T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:62:24 + --> $DIR/typeck_type_placeholder_item.rs:61:24 | LL | fn clone(&self) -> _ { Test9 } | ^ @@ -555,7 +555,7 @@ LL | fn clone(&self) -> _ { Test9 } | help: replace with the correct return type: `Test9` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:65:37 + --> $DIR/typeck_type_placeholder_item.rs:64:37 | LL | fn clone_from(&mut self, other: _) { *self = Test9; } | ^ not allowed in type signatures @@ -566,7 +566,7 @@ LL | fn clone_from(&mut self, other: T) { *self = Test9; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:110:31 + --> $DIR/typeck_type_placeholder_item.rs:109:31 | LL | fn fn_test9(&self) -> _ { () } | ^ @@ -575,7 +575,7 @@ LL | fn fn_test9(&self) -> _ { () } | help: replace with the correct return type: `()` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:113:34 + --> $DIR/typeck_type_placeholder_item.rs:112:34 | LL | fn fn_test10(&self, _x : _) { } | ^ not allowed in type signatures @@ -586,7 +586,7 @@ LL | fn fn_test10(&self, _x : T) { } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:118:28 + --> $DIR/typeck_type_placeholder_item.rs:117:28 | LL | fn clone(&self) -> _ { FnTest9 } | ^ @@ -595,7 +595,7 @@ LL | fn clone(&self) -> _ { FnTest9 } | help: replace with the correct return type: `FnTest9` error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:121:41 + --> $DIR/typeck_type_placeholder_item.rs:120:41 | LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } | ^ not allowed in type signatures @@ -606,25 +606,25 @@ LL | fn clone_from(&mut self, other: T) { *self = FnTest9; } | ^^^ ^ error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:204:14 + --> $DIR/typeck_type_placeholder_item.rs:203:14 | LL | type A = _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:206:14 + --> $DIR/typeck_type_placeholder_item.rs:205:14 | LL | type B = _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:208:14 + --> $DIR/typeck_type_placeholder_item.rs:207:14 | LL | const C: _; | ^ not allowed in type signatures error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:211:14 + --> $DIR/typeck_type_placeholder_item.rs:210:14 | LL | const D: _ = 42; | ^ diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.rs b/src/test/ui/typeck/typeck_type_placeholder_item.rs index 55f5d44d46b3..3d30ab32bace 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_item.rs +++ b/src/test/ui/typeck/typeck_type_placeholder_item.rs @@ -3,7 +3,6 @@ // revisions: min_tait full_tait #![feature(min_type_alias_impl_trait)] #![cfg_attr(full_tait, feature(type_alias_impl_trait))] -//[full_tait]~^ WARN incomplete // This test checks that it is not possible to enable global type // inference by using the `_` type placeholder. From 38bdd0e0198196b545aeb64f0305707de163a83a Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 26 Jul 2021 17:01:16 -0300 Subject: [PATCH 14/22] Make all tests use type_alias_impl_trait feature instead of min --- compiler/rustc_ast_passes/src/feature_gate.rs | 2 +- src/test/rustdoc-ui/coverage/traits.rs | 2 +- .../trait-alias-closure.rs | 2 +- .../error-in-impl-trait/trait-alias.rs | 2 +- src/test/rustdoc/auxiliary/issue-73061.rs | 2 +- src/test/rustdoc/impl-trait-alias.rs | 2 +- src/test/rustdoc/return-impl-trait.rs | 2 +- .../ui/associated-type-bounds/duplicate.rs | 4 +- .../associated-type-bounds/duplicate.stderr | 483 +++++++++++++ .../trait-alias-impl-trait.rs | 4 +- src/test/ui/associated-types/issue-63591.rs | 4 +- .../issues/issue-60655-latebound-regions.rs | 4 +- ...orted_main_const_fn_item_type_forbidden.rs | 2 +- ...d_main_const_fn_item_type_forbidden.stderr | 2 +- ...ture-gate-min_type_alias_impl_trait.stderr | 22 +- .../feature-gate-type_alias_impl_trait.rs | 4 +- .../feature-gate-type_alias_impl_trait.stderr | 14 +- src/test/ui/generator/layout-error.rs | 6 +- src/test/ui/generator/layout-error.stderr | 9 + .../metadata-sufficient-for-layout.rs | 4 +- .../metadata-sufficient-for-layout.stderr | 8 + ...ssociated-impl-trait-type-generic-trait.rs | 4 +- .../associated-impl-trait-type-trivial.rs | 4 +- .../impl-trait/associated-impl-trait-type.rs | 4 +- src/test/ui/impl-trait/auto-trait.rs | 4 +- src/test/ui/impl-trait/auto-trait.stderr | 12 + .../ui/impl-trait/bound-normalization-pass.rs | 2 +- src/test/ui/impl-trait/issue-55872-1.rs | 4 +- src/test/ui/impl-trait/issue-55872-1.stderr | 48 ++ src/test/ui/impl-trait/issue-55872-2.rs | 4 +- src/test/ui/impl-trait/issue-55872-2.stderr | 19 + src/test/ui/impl-trait/issue-55872.rs | 4 +- src/test/ui/impl-trait/issue-55872.stderr | 12 + src/test/ui/impl-trait/issue-86465.rs | 2 +- src/test/ui/impl-trait/issues/issue-53457.rs | 5 +- src/test/ui/impl-trait/issues/issue-70877.rs | 5 +- .../ui/impl-trait/issues/issue-70877.stderr | 15 + src/test/ui/impl-trait/issues/issue-78722.rs | 4 +- .../ui/impl-trait/issues/issue-78722.stderr | 23 + src/test/ui/impl-trait/issues/issue-86201.rs | 2 +- .../multiple-lifetimes/error-handling-2.rs | 4 +- .../error-handling-2.stderr | 15 + .../multiple-lifetimes/error-handling.rs | 4 +- .../multiple-lifetimes/error-handling.stderr | 15 + ...nds-pick-original-type-alias-impl-trait.rs | 2 +- src/test/ui/impl-trait/negative-reasoning.rs | 4 +- .../ui/impl-trait/negative-reasoning.stderr | 14 + .../ui/impl-trait/type-alias-generic-param.rs | 4 +- .../type-alias-impl-trait-in-fn-body.rs | 4 +- src/test/ui/impl-trait/where-allowed.stderr | 6 +- .../ui/issues/issue-60662.full_tait.stdout | 2 +- .../ui/issues/issue-60662.min_tait.stdout | 2 +- src/test/ui/issues/issue-60662.rs | 4 +- src/test/ui/issues/issue-60662.stdout | 14 + src/test/ui/layout/debug.rs | 2 +- .../ui/lint/inline-trait-and-foreign-items.rs | 4 +- .../inline-trait-and-foreign-items.stderr | 72 ++ src/test/ui/lint/lint-ctypes-73249-2.rs | 4 +- src/test/ui/lint/lint-ctypes-73249-2.stderr | 15 + src/test/ui/lint/lint-ctypes-73249-3.rs | 4 +- src/test/ui/lint/lint-ctypes-73249-3.stderr | 15 + src/test/ui/lint/lint-ctypes-73249-5.rs | 4 +- src/test/ui/lint/lint-ctypes-73249-5.stderr | 15 + src/test/ui/lint/lint-ctypes-73251-1.rs | 4 +- src/test/ui/lint/lint-ctypes-73251-1.stderr | 15 + src/test/ui/lint/lint-ctypes-73251-2.rs | 4 +- src/test/ui/lint/lint-ctypes-73251-2.stderr | 15 + src/test/ui/lint/lint-ctypes-73251.rs | 4 +- src/test/ui/lint/opaque-ty-ffi-unsafe.rs | 4 +- src/test/ui/lint/opaque-ty-ffi-unsafe.stderr | 15 + src/test/ui/mir/issue-75053.rs | 4 +- src/test/ui/mir/issue-75053.stderr | 8 + .../ui/privacy/private-in-public-assoc-ty.rs | 4 +- .../privacy/private-in-public-assoc-ty.stderr | 68 ++ ...private-in-public-type-alias-impl-trait.rs | 4 +- src/test/ui/save-analysis/issue-68621.rs | 4 +- src/test/ui/save-analysis/issue-68621.stderr | 8 + src/test/ui/traits/alias/issue-83613.rs | 2 +- .../type-alias-impl-trait/assoc-type-const.rs | 4 +- .../assoc-type-const.stderr | 11 + .../assoc-type-lifetime-unconstrained.rs | 4 +- .../assoc-type-lifetime-unconstrained.stderr | 9 + .../assoc-type-lifetime.rs | 4 +- .../associated-type-alias-impl-trait.rs | 4 +- .../auxiliary/cross_crate_ice.rs | 4 +- .../auxiliary/cross_crate_ice2.rs | 4 +- .../type-alias-impl-trait/bound_reduction.rs | 4 +- .../type-alias-impl-trait/bound_reduction2.rs | 4 +- .../bound_reduction2.stderr | 14 + .../bounds-are-checked-2.rs | 4 +- .../bounds-are-checked-2.stderr | 14 + .../bounds-are-checked.rs | 4 +- .../bounds-are-checked.stderr | 26 + .../ui/type-alias-impl-trait/coherence.rs | 4 +- .../ui/type-alias-impl-trait/coherence.stderr | 9 + .../declared_but_never_defined.rs | 4 +- .../declared_but_never_defined.stderr | 8 + .../declared_but_not_defined_in_scope.rs | 4 +- .../declared_but_not_defined_in_scope.stderr | 23 + .../different_defining_uses.rs | 4 +- .../different_defining_uses.stderr | 14 + .../different_defining_uses_never_type.rs | 4 +- .../different_defining_uses_never_type.stderr | 26 + .../different_defining_uses_never_type2.rs | 4 +- src/test/ui/type-alias-impl-trait/fallback.rs | 4 +- .../generic_different_defining_uses.rs | 4 +- .../generic_different_defining_uses.stderr | 14 + .../generic_duplicate_lifetime_param.rs | 4 +- .../generic_duplicate_lifetime_param.stderr | 14 + .../generic_duplicate_param_use.rs | 10 +- .../generic_duplicate_param_use.stderr | 38 ++ .../generic_duplicate_param_use10.rs | 4 +- .../generic_duplicate_param_use2.rs | 4 +- .../generic_duplicate_param_use2.stderr | 14 + .../generic_duplicate_param_use3.rs | 4 +- .../generic_duplicate_param_use3.stderr | 14 + .../generic_duplicate_param_use4.rs | 4 +- .../generic_duplicate_param_use4.stderr | 14 + .../generic_duplicate_param_use5.rs | 4 +- .../generic_duplicate_param_use5.stderr | 39 ++ .../generic_duplicate_param_use6.rs | 4 +- .../generic_duplicate_param_use6.stderr | 27 + .../generic_duplicate_param_use7.rs | 4 +- .../generic_duplicate_param_use8.rs | 4 +- .../generic_duplicate_param_use8.stderr | 27 + .../generic_duplicate_param_use9.rs | 4 +- .../generic_duplicate_param_use9.stderr | 51 ++ .../generic_lifetime_param.rs | 4 +- .../generic_nondefining_use.rs | 12 +- .../generic_nondefining_use.stderr | 35 + .../type-alias-impl-trait/generic_not_used.rs | 4 +- .../generic_not_used.stderr | 18 + .../generic_type_does_not_live_long_enough.rs | 4 +- ...eric_type_does_not_live_long_enough.stderr | 33 + .../generic_underconstrained.rs | 4 +- .../generic_underconstrained.stderr | 23 + .../generic_underconstrained2.rs | 4 +- .../generic_underconstrained2.stderr | 43 ++ .../impl-with-unconstrained-param.rs | 4 +- .../impl-with-unconstrained-param.stderr | 9 + .../incoherent-assoc-imp-trait.rs | 4 +- .../incoherent-assoc-imp-trait.stderr | 23 + ...ue-52843-closure-constrain.min_tait.stderr | 24 - .../issue-52843-closure-constrain.rs | 6 +- .../issue-52843-closure-constrain.stderr | 14 + .../ui/type-alias-impl-trait/issue-52843.rs | 4 +- .../type-alias-impl-trait/issue-52843.stderr | 14 + .../issue-53096.full_tait.stderr | 9 +- .../ui/type-alias-impl-trait/issue-53096.rs | 4 +- .../type-alias-impl-trait/issue-53096.stderr | 8 + .../ui/type-alias-impl-trait/issue-53598.rs | 4 +- .../type-alias-impl-trait/issue-53598.stderr | 12 + .../issue-53678-generator-and-const-fn.rs | 4 +- .../issue-53678-generator-and-const-fn.stderr | 8 + .../issue-55099-lifetime-inference.rs | 4 +- .../issue-57188-associate-impl-capture.rs | 4 +- .../issue-57611-trait-alias.rs | 4 +- .../issue-57611-trait-alias.stderr | 11 + .../ui/type-alias-impl-trait/issue-57700.rs | 4 +- .../type-alias-impl-trait/issue-57700.stderr | 12 + .../issue-57807-associated-type.rs | 4 +- .../ui/type-alias-impl-trait/issue-58887.rs | 4 +- .../ui/type-alias-impl-trait/issue-58951.rs | 4 +- .../type-alias-impl-trait/issue-60371.stderr | 2 +- .../issue-60407.full_tait.stderr | 9 +- .../ui/type-alias-impl-trait/issue-60407.rs | 4 +- .../type-alias-impl-trait/issue-60407.stderr | 8 + .../ui/type-alias-impl-trait/issue-60564.rs | 4 +- .../type-alias-impl-trait/issue-60564.stderr | 14 + ...ue-62000-associate-impl-trait-lifetimes.rs | 4 +- .../issue-63263-closure-return.rs | 2 +- .../issue-63279.min_tait.stderr | 22 - .../ui/type-alias-impl-trait/issue-63279.rs | 6 +- .../type-alias-impl-trait/issue-63279.stderr | 12 + .../ui/type-alias-impl-trait/issue-63355.rs | 4 +- .../issue-63677-type-alias-coherence.rs | 4 +- .../ui/type-alias-impl-trait/issue-65384.rs | 2 +- ...-opaque-ty-from-val-twice.full_tait.stderr | 9 +- ...t-opaque-ty-from-val-twice.min_tait.stderr | 21 - ...sue-65679-inst-opaque-ty-from-val-twice.rs | 8 +- ...65679-inst-opaque-ty-from-val-twice.stderr | 8 + .../ui/type-alias-impl-trait/issue-65918.rs | 4 +- .../issue-66580-closure-coherence.rs | 4 +- .../issue-67844-nested-opaque.rs | 4 +- .../issue-68368-non-defining-use.rs | 4 +- .../issue-68368-non-defining-use.stderr | 14 + ...ssue-69136-inner-lifetime-resolve-error.rs | 4 +- ...-69136-inner-lifetime-resolve-error.stderr | 11 + .../issue-69136-inner-lifetime-resolve-ok.rs | 4 +- .../ui/type-alias-impl-trait/issue-69323.rs | 4 +- .../ui/type-alias-impl-trait/issue-70121.rs | 4 +- .../ui/type-alias-impl-trait/issue-74244.rs | 4 +- .../type-alias-impl-trait/issue-74244.stderr | 9 + .../ui/type-alias-impl-trait/issue-74761-2.rs | 2 - .../issue-74761-2.stderr | 14 +- .../ui/type-alias-impl-trait/issue-74761.rs | 4 +- .../type-alias-impl-trait/issue-74761.stderr | 15 + .../issue-76202-trait-impl-for-tait.rs | 4 +- .../issue-76202-trait-impl-for-tait.stderr | 14 + .../ui/type-alias-impl-trait/issue-78450.rs | 1 - .../multiple-def-uses-in-one-fn-pass.rs | 2 +- .../multiple-def-uses-in-one-fn.rs | 2 +- .../multiple-def-uses-in-one-fn2.rs | 2 +- .../multiple-def-uses-in-one-fn3.rs | 2 +- .../nested_type_alias_impl_trait.rs | 4 +- .../never_reveal_concrete_type.rs | 4 +- .../never_reveal_concrete_type.stderr | 24 + .../no_inferrable_concrete_type.rs | 4 +- .../no_inferrable_concrete_type.stderr | 8 + .../no_revealing_outside_defining_module.rs | 4 +- ...o_revealing_outside_defining_module.stderr | 31 + .../not_a_defining_use.rs | 4 +- .../not_a_defining_use.stderr | 14 + .../type-alias-impl-trait/not_well_formed.rs | 4 +- .../not_well_formed.stderr | 9 + .../structural-match-no-leak.rs | 4 +- .../structural-match-no-leak.stderr | 8 + .../type-alias-impl-trait/structural-match.rs | 4 +- .../structural-match.stderr | 8 + .../type-alias-impl-trait-const.rs | 4 +- .../type-alias-impl-trait-const.stderr | 21 + .../type-alias-impl-trait-fns.rs | 4 +- .../type-alias-impl-trait-sized.rs | 4 +- .../type-alias-impl-trait-tuple.rs | 4 +- ...alias-impl-trait-unconstrained-lifetime.rs | 4 +- ...s-impl-trait-unconstrained-lifetime.stderr | 9 + .../type-alias-impl-trait-with-cycle-error.rs | 4 +- ...e-alias-impl-trait-with-cycle-error.stderr | 8 + ...type-alias-impl-trait-with-cycle-error2.rs | 4 +- ...-alias-impl-trait-with-cycle-error2.stderr | 8 + .../type-alias-impl-trait-with-no-traits.rs | 4 +- ...ype-alias-impl-trait-with-no-traits.stderr | 14 + .../type-alias-impl-trait.rs | 4 +- .../type-alias-nested-impl-trait.rs | 4 +- .../unused_generic_param.rs | 4 +- .../unused_generic_param.stderr | 14 + .../ui/typeck/typeck_type_placeholder_item.rs | 4 +- .../typeck_type_placeholder_item.stderr | 638 ++++++++++++++++++ 238 files changed, 2713 insertions(+), 523 deletions(-) create mode 100644 src/test/ui/associated-type-bounds/duplicate.stderr create mode 100644 src/test/ui/generator/layout-error.stderr create mode 100644 src/test/ui/generator/metadata-sufficient-for-layout.stderr create mode 100644 src/test/ui/impl-trait/auto-trait.stderr create mode 100644 src/test/ui/impl-trait/issue-55872-1.stderr create mode 100644 src/test/ui/impl-trait/issue-55872-2.stderr create mode 100644 src/test/ui/impl-trait/issue-55872.stderr create mode 100644 src/test/ui/impl-trait/issues/issue-70877.stderr create mode 100644 src/test/ui/impl-trait/issues/issue-78722.stderr create mode 100644 src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr create mode 100644 src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr create mode 100644 src/test/ui/impl-trait/negative-reasoning.stderr create mode 100644 src/test/ui/issues/issue-60662.stdout create mode 100644 src/test/ui/lint/inline-trait-and-foreign-items.stderr create mode 100644 src/test/ui/lint/lint-ctypes-73249-2.stderr create mode 100644 src/test/ui/lint/lint-ctypes-73249-3.stderr create mode 100644 src/test/ui/lint/lint-ctypes-73249-5.stderr create mode 100644 src/test/ui/lint/lint-ctypes-73251-1.stderr create mode 100644 src/test/ui/lint/lint-ctypes-73251-2.stderr create mode 100644 src/test/ui/lint/opaque-ty-ffi-unsafe.stderr create mode 100644 src/test/ui/mir/issue-75053.stderr create mode 100644 src/test/ui/privacy/private-in-public-assoc-ty.stderr create mode 100644 src/test/ui/save-analysis/issue-68621.stderr create mode 100644 src/test/ui/type-alias-impl-trait/assoc-type-const.stderr create mode 100644 src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr create mode 100644 src/test/ui/type-alias-impl-trait/bound_reduction2.stderr create mode 100644 src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr create mode 100644 src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr create mode 100644 src/test/ui/type-alias-impl-trait/coherence.stderr create mode 100644 src/test/ui/type-alias-impl-trait/declared_but_never_defined.stderr create mode 100644 src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.stderr create mode 100644 src/test/ui/type-alias-impl-trait/different_defining_uses.stderr create mode 100644 src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_different_defining_uses.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_not_used.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr create mode 100644 src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr create mode 100644 src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr create mode 100644 src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-52843.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-53096.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-53598.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-57700.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-60407.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-60564.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-63279.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-74244.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-74761.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.stderr create mode 100644 src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr create mode 100644 src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr create mode 100644 src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr create mode 100644 src/test/ui/type-alias-impl-trait/not_a_defining_use.stderr create mode 100644 src/test/ui/type-alias-impl-trait/not_well_formed.stderr create mode 100644 src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr create mode 100644 src/test/ui/type-alias-impl-trait/structural-match.stderr create mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.stderr create mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr create mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr create mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr create mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.stderr create mode 100644 src/test/ui/type-alias-impl-trait/unused_generic_param.stderr create mode 100644 src/test/ui/typeck/typeck_type_placeholder_item.stderr diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 3e757e3843e3..89b59e5f00f1 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -287,7 +287,7 @@ fn visit_ty(&mut self, ty: &ast::Ty) { if let ast::TyKind::ImplTrait(..) = ty.kind { gate_feature_post!( &self.vis, - min_type_alias_impl_trait, + type_alias_impl_trait, ty.span, "`impl Trait` in type aliases is unstable" ); diff --git a/src/test/rustdoc-ui/coverage/traits.rs b/src/test/rustdoc-ui/coverage/traits.rs index 2a108dac2a5d..daa08ec25823 100644 --- a/src/test/rustdoc-ui/coverage/traits.rs +++ b/src/test/rustdoc-ui/coverage/traits.rs @@ -2,7 +2,7 @@ // check-pass #![feature(trait_alias)] -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] /// look at this trait right here pub trait ThisTrait { diff --git a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs index 3e7b42802348..31dd786cbbf8 100644 --- a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs +++ b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs @@ -1,5 +1,5 @@ // check-pass -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] pub trait ValidTrait {} type ImplTrait = impl ValidTrait; diff --git a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs index 7ebf4d544de1..c18a024af4bb 100644 --- a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs +++ b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs @@ -1,5 +1,5 @@ // check-pass -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] pub trait ValidTrait {} type ImplTrait = impl ValidTrait; diff --git a/src/test/rustdoc/auxiliary/issue-73061.rs b/src/test/rustdoc/auxiliary/issue-73061.rs index 9b4129e771f8..e05a3bc6d918 100644 --- a/src/test/rustdoc/auxiliary/issue-73061.rs +++ b/src/test/rustdoc/auxiliary/issue-73061.rs @@ -1,6 +1,6 @@ //edition:2018 -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] pub trait Foo { type X: std::future::Future; diff --git a/src/test/rustdoc/impl-trait-alias.rs b/src/test/rustdoc/impl-trait-alias.rs index bf73a833580c..54c3f856ddb3 100644 --- a/src/test/rustdoc/impl-trait-alias.rs +++ b/src/test/rustdoc/impl-trait-alias.rs @@ -1,4 +1,4 @@ -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] trait MyTrait {} impl MyTrait for i32 {} diff --git a/src/test/rustdoc/return-impl-trait.rs b/src/test/rustdoc/return-impl-trait.rs index da4945aadf7f..1ccf5ac46119 100644 --- a/src/test/rustdoc/return-impl-trait.rs +++ b/src/test/rustdoc/return-impl-trait.rs @@ -1,4 +1,4 @@ -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] pub trait Backend {} diff --git a/src/test/ui/associated-type-bounds/duplicate.rs b/src/test/ui/associated-type-bounds/duplicate.rs index e1a2ab37a3a3..e1dc6f8f4b63 100644 --- a/src/test/ui/associated-type-bounds/duplicate.rs +++ b/src/test/ui/associated-type-bounds/duplicate.rs @@ -1,7 +1,5 @@ #![feature(associated_type_bounds)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![feature(untagged_unions)] use std::iter; diff --git a/src/test/ui/associated-type-bounds/duplicate.stderr b/src/test/ui/associated-type-bounds/duplicate.stderr new file mode 100644 index 000000000000..e4f4836f71ab --- /dev/null +++ b/src/test/ui/associated-type-bounds/duplicate.stderr @@ -0,0 +1,483 @@ +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:7:36 + | +LL | struct SI1> { + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:11:36 + | +LL | struct SI2> { + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:15:39 + | +LL | struct SI3> { + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:21:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:28:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:35:32 + | +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:41:34 + | +LL | enum EI1> { + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:45:34 + | +LL | enum EI2> { + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:49:37 + | +LL | enum EI3> { + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:55:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:62:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:69:32 + | +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:75:35 + | +LL | union UI1> { + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:79:35 + | +LL | union UI2> { + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:83:38 + | +LL | union UI3> { + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:89:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:96:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:103:32 + | +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:109:32 + | +LL | fn FI1>() {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:111:32 + | +LL | fn FI2>() {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:113:35 + | +LL | fn FI3>() {} + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:117:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:123:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:129:32 + | +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:143:40 + | +LL | fn FAPIT1(_: impl Iterator) {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:145:40 + | +LL | fn FAPIT2(_: impl Iterator) {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:147:43 + | +LL | fn FAPIT3(_: impl Iterator) {} + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:150:35 + | +LL | type TAI1> = T; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:152:35 + | +LL | type TAI2> = T; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:154:38 + | +LL | type TAI3> = T; + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:158:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:163:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:168:32 + | +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:172:36 + | +LL | type ETAI1> = impl Copy; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:174:36 + | +LL | type ETAI2> = impl Copy; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:176:39 + | +LL | type ETAI3> = impl Copy; + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:178:40 + | +LL | type ETAI4 = impl Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:180:40 + | +LL | type ETAI5 = impl Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:182:43 + | +LL | type ETAI6 = impl Iterator; + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:185:36 + | +LL | trait TRI1> {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:187:36 + | +LL | trait TRI2> {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:189:39 + | +LL | trait TRI3> {} + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:191:34 + | +LL | trait TRS1: Iterator {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:193:34 + | +LL | trait TRS2: Iterator {} + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:195:37 + | +LL | trait TRS3: Iterator {} + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:199:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:205:29 + | +LL | T: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:211:32 + | +LL | T: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:217:32 + | +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:217:32 + | +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:224:32 + | +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:224:32 + | +LL | Self: Iterator, + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:231:35 + | +LL | Self: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:231:35 + | +LL | Self: Iterator, + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:249:40 + | +LL | type TADyn1 = dyn Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:251:44 + | +LL | type TADyn2 = Box>; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:253:43 + | +LL | type TADyn3 = dyn Iterator; + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:237:34 + | +LL | type A: Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:241:34 + | +LL | type A: Iterator; + | ---------- ^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified + --> $DIR/duplicate.rs:245:37 + | +LL | type A: Iterator; + | ------------- ^^^^^^^^^^^^^ re-bound here + | | + | `Item` bound here first + +error: aborting due to 60 previous errors + +For more information about this error, try `rustc --explain E0719`. diff --git a/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs b/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs index 9a9031043b65..e223a8957417 100644 --- a/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs +++ b/src/test/ui/associated-type-bounds/trait-alias-impl-trait.rs @@ -1,9 +1,7 @@ // run-pass #![feature(associated_type_bounds)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::ops::Add; diff --git a/src/test/ui/associated-types/issue-63591.rs b/src/test/ui/associated-types/issue-63591.rs index 04b688674960..4d2e39f4da60 100644 --- a/src/test/ui/associated-types/issue-63591.rs +++ b/src/test/ui/associated-types/issue-63591.rs @@ -1,9 +1,7 @@ // check-pass #![feature(associated_type_bounds)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs index c132d9b9d7de..66a3b07c3bd9 100644 --- a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs +++ b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs @@ -3,9 +3,7 @@ // check-pass // edition:2018 -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::future::Future; diff --git a/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.rs b/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.rs index d8553815b75d..e0bb7dbfae9f 100644 --- a/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.rs +++ b/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.rs @@ -1,5 +1,5 @@ #![feature(imported_main)] -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] #![allow(incomplete_features)] //~^^^ ERROR `main` function not found in crate pub mod foo { diff --git a/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr b/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr index c4c0afc5687c..6aa170fdfd2a 100644 --- a/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr +++ b/src/test/ui/entry-point/imported_main_const_fn_item_type_forbidden.stderr @@ -2,7 +2,7 @@ error[E0601]: `main` function not found in crate `imported_main_const_fn_item_ty --> $DIR/imported_main_const_fn_item_type_forbidden.rs:1:1 | LL | / #![feature(imported_main)] -LL | | #![feature(min_type_alias_impl_trait)] +LL | | #![feature(type_alias_impl_trait)] LL | | #![allow(incomplete_features)] LL | | ... | diff --git a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr b/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr index 07857289aaeb..c87f1f4f00de 100644 --- a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr +++ b/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr @@ -5,7 +5,7 @@ LL | type Foo = impl Debug; | ^^^^^^^^^^ | = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:12:16 @@ -14,7 +14,7 @@ LL | type Baa = impl Debug; | ^^^^^^^^^^ | = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: associated type defaults are unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:5 @@ -32,7 +32,7 @@ LL | type Assoc = impl Debug; | ^^^^^^^^^^ | = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:24 @@ -41,7 +41,7 @@ LL | type NestedFree = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:37 @@ -50,7 +50,7 @@ LL | type NestedFree = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:49 @@ -59,7 +59,7 @@ LL | type NestedFree = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:70 @@ -68,7 +68,7 @@ LL | type NestedFree = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:21 @@ -77,7 +77,7 @@ LL | type Baa = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:34 @@ -86,7 +86,7 @@ LL | type Baa = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:46 @@ -95,7 +95,7 @@ LL | type Baa = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:67 @@ -104,7 +104,7 @@ LL | type Baa = (Vec, impl Debug, impl Iterator for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0562]: `impl Trait` not allowed outside of function and method return types --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18 diff --git a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs index 4fb1cd2aae1d..ea82837d4bf5 100644 --- a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs +++ b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs @@ -1,5 +1,5 @@ // ignore-compare-mode-chalk -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; type Foo = impl Debug; @@ -13,7 +13,7 @@ fn define() -> Bar { type Foo2 = impl Debug; fn define2() { - let x = || -> Foo2 { 42 }; //~ ERROR not permitted here + let x = || -> Foo2 { 42 }; } type Foo3 = impl Debug; diff --git a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr index 10409d5fc4ba..da3ddb1c5097 100644 --- a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr +++ b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr @@ -10,15 +10,6 @@ LL | Bar(42) = note: expected opaque type `impl Debug` found type `{integer}` -error[E0658]: type alias impl trait is not permitted here - --> $DIR/feature-gate-type_alias_impl_trait.rs:16:19 - | -LL | let x = || -> Foo2 { 42 }; - | ^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - error[E0308]: mismatched types --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18 | @@ -77,7 +68,6 @@ error: could not find defining uses LL | type Foo4 = impl Debug; | ^^^^^^^^^^ -error: aborting due to 8 previous errors +error: aborting due to 7 previous errors -Some errors have detailed explanations: E0308, E0658. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/generator/layout-error.rs b/src/test/ui/generator/layout-error.rs index e8fd4f807e01..7c3d187409a2 100644 --- a/src/test/ui/generator/layout-error.rs +++ b/src/test/ui/generator/layout-error.rs @@ -3,9 +3,7 @@ // // edition:2018 -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::future::Future; pub struct Task(F); @@ -26,5 +24,5 @@ async fn cb() { type F = impl Future; // Check that statics are inhabited computes they layout. static POOL: Task = Task::new(); - Task::spawn(&POOL, || cb()); //[min_tait]~ ERROR type alias impl trait is not permitted here + Task::spawn(&POOL, || cb()); } diff --git a/src/test/ui/generator/layout-error.stderr b/src/test/ui/generator/layout-error.stderr new file mode 100644 index 000000000000..b1a258f4f2ca --- /dev/null +++ b/src/test/ui/generator/layout-error.stderr @@ -0,0 +1,9 @@ +error[E0425]: cannot find value `Foo` in this scope + --> $DIR/layout-error.rs:21:17 + | +LL | let a = Foo; + | ^^^ not found in this scope + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/generator/metadata-sufficient-for-layout.rs b/src/test/ui/generator/metadata-sufficient-for-layout.rs index 50093987e4b5..d0e648ee775f 100644 --- a/src/test/ui/generator/metadata-sufficient-for-layout.rs +++ b/src/test/ui/generator/metadata-sufficient-for-layout.rs @@ -5,9 +5,7 @@ // // aux-build:metadata-sufficient-for-layout.rs -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait, rustc_attrs)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait, rustc_attrs)] #![feature(generator_trait)] extern crate metadata_sufficient_for_layout; diff --git a/src/test/ui/generator/metadata-sufficient-for-layout.stderr b/src/test/ui/generator/metadata-sufficient-for-layout.stderr new file mode 100644 index 000000000000..3488b04f2267 --- /dev/null +++ b/src/test/ui/generator/metadata-sufficient-for-layout.stderr @@ -0,0 +1,8 @@ +error: fatal error triggered by #[rustc_error] + --> $DIR/metadata-sufficient-for-layout.rs:25:1 + | +LL | fn main() {} + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs b/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs index fb816fb39e68..6c7c46b0e3db 100644 --- a/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs +++ b/src/test/ui/impl-trait/associated-impl-trait-type-generic-trait.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs b/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs index 57747b286bf9..cdda341cad87 100644 --- a/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs +++ b/src/test/ui/impl-trait/associated-impl-trait-type-trivial.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/impl-trait/associated-impl-trait-type.rs b/src/test/ui/impl-trait/associated-impl-trait-type.rs index 39e98ebe665b..d0661d66f4b4 100644 --- a/src/test/ui/impl-trait/associated-impl-trait-type.rs +++ b/src/test/ui/impl-trait/associated-impl-trait-type.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/impl-trait/auto-trait.rs b/src/test/ui/impl-trait/auto-trait.rs index 59bd09e348a9..cf2773f4ef59 100644 --- a/src/test/ui/impl-trait/auto-trait.rs +++ b/src/test/ui/impl-trait/auto-trait.rs @@ -1,8 +1,6 @@ // Tests that type alias impls traits do not leak auto-traits for // the purposes of coherence checking -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait OpaqueTrait {} impl OpaqueTrait for T {} diff --git a/src/test/ui/impl-trait/auto-trait.stderr b/src/test/ui/impl-trait/auto-trait.stderr new file mode 100644 index 000000000000..26cd8fb6a9b5 --- /dev/null +++ b/src/test/ui/impl-trait/auto-trait.stderr @@ -0,0 +1,12 @@ +error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` + --> $DIR/auto-trait.rs:21:1 + | +LL | impl AnotherTrait for T {} + | -------------------------------- first implementation here +... +LL | impl AnotherTrait for D { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/impl-trait/bound-normalization-pass.rs b/src/test/ui/impl-trait/bound-normalization-pass.rs index 4218bc520659..51718079d2c4 100644 --- a/src/test/ui/impl-trait/bound-normalization-pass.rs +++ b/src/test/ui/impl-trait/bound-normalization-pass.rs @@ -4,7 +4,7 @@ //[sa] compile-flags: -Z save-analysis //-^ To make this the regression test for #75962. -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] // See issue 60414 diff --git a/src/test/ui/impl-trait/issue-55872-1.rs b/src/test/ui/impl-trait/issue-55872-1.rs index c6a331e58fee..72a060abae3e 100644 --- a/src/test/ui/impl-trait/issue-55872-1.rs +++ b/src/test/ui/impl-trait/issue-55872-1.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub trait Bar { type E: Copy; diff --git a/src/test/ui/impl-trait/issue-55872-1.stderr b/src/test/ui/impl-trait/issue-55872-1.stderr new file mode 100644 index 000000000000..6411c1b5d1ca --- /dev/null +++ b/src/test/ui/impl-trait/issue-55872-1.stderr @@ -0,0 +1,48 @@ +error[E0276]: impl has stricter requirements than trait + --> $DIR/issue-55872-1.rs:14:5 + | +LL | fn foo() -> Self::E; + | ----------------------- definition of `foo` from trait +... +LL | fn foo() -> Self::E { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default` + +error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` + --> $DIR/issue-55872-1.rs:10:14 + | +LL | type E = impl Copy; + | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` + | + = note: required because it appears within the type `(S, T)` +help: consider further restricting this bound + | +LL | impl Bar for S { + | ^^^^^^^^^^^^^^^^^^^ + +error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` + --> $DIR/issue-55872-1.rs:10:14 + | +LL | type E = impl Copy; + | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` + | + = note: required because it appears within the type `(S, T)` +help: consider further restricting this bound + | +LL | fn foo() -> Self::E { + | ^^^^^^^^^^^^^^^^^^^ + +error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + --> $DIR/issue-55872-1.rs:14:37 + | +LL | fn foo() -> Self::E { + | _____________________________________^ +LL | | +LL | | +LL | | (S::default(), T::default()) +LL | | } + | |_____^ + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0276, E0277. +For more information about an error, try `rustc --explain E0276`. diff --git a/src/test/ui/impl-trait/issue-55872-2.rs b/src/test/ui/impl-trait/issue-55872-2.rs index 44839e5e845a..6eda1dc62ec6 100644 --- a/src/test/ui/impl-trait/issue-55872-2.rs +++ b/src/test/ui/impl-trait/issue-55872-2.rs @@ -1,9 +1,7 @@ // edition:2018 // ignore-compare-mode-chalk -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub trait Bar { type E: Copy; diff --git a/src/test/ui/impl-trait/issue-55872-2.stderr b/src/test/ui/impl-trait/issue-55872-2.stderr new file mode 100644 index 000000000000..58c5ee45051a --- /dev/null +++ b/src/test/ui/impl-trait/issue-55872-2.stderr @@ -0,0 +1,19 @@ +error[E0277]: the trait bound `impl Future: Copy` is not satisfied + --> $DIR/issue-55872-2.rs:13:14 + | +LL | type E = impl std::marker::Copy; + | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future` + +error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + --> $DIR/issue-55872-2.rs:15:28 + | +LL | fn foo() -> Self::E { + | ____________________________^ +LL | | +LL | | async {} +LL | | } + | |_____^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/issue-55872.rs b/src/test/ui/impl-trait/issue-55872.rs index 049d61a425e3..bbd940254178 100644 --- a/src/test/ui/impl-trait/issue-55872.rs +++ b/src/test/ui/impl-trait/issue-55872.rs @@ -1,7 +1,5 @@ // ignore-compare-mode-chalk -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub trait Bar { type E: Copy; diff --git a/src/test/ui/impl-trait/issue-55872.stderr b/src/test/ui/impl-trait/issue-55872.stderr new file mode 100644 index 000000000000..60654ec34610 --- /dev/null +++ b/src/test/ui/impl-trait/issue-55872.stderr @@ -0,0 +1,12 @@ +error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + --> $DIR/issue-55872.rs:13:28 + | +LL | fn foo() -> Self::E { + | ____________________________^ +LL | | +LL | | || () +LL | | } + | |_____^ + +error: aborting due to previous error + diff --git a/src/test/ui/impl-trait/issue-86465.rs b/src/test/ui/impl-trait/issue-86465.rs index 23a3748c12c6..a6976daff018 100644 --- a/src/test/ui/impl-trait/issue-86465.rs +++ b/src/test/ui/impl-trait/issue-86465.rs @@ -1,4 +1,4 @@ -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] type X<'a, 'b> = impl std::fmt::Debug; diff --git a/src/test/ui/impl-trait/issues/issue-53457.rs b/src/test/ui/impl-trait/issues/issue-53457.rs index c6d7be47dfe6..7b9c2c53aad4 100644 --- a/src/test/ui/impl-trait/issues/issue-53457.rs +++ b/src/test/ui/impl-trait/issues/issue-53457.rs @@ -1,9 +1,6 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] - +#![feature(type_alias_impl_trait)] type X = impl Clone; fn bar(f: F) -> F { diff --git a/src/test/ui/impl-trait/issues/issue-70877.rs b/src/test/ui/impl-trait/issues/issue-70877.rs index 29aa705ef9d4..853c2a82bede 100644 --- a/src/test/ui/impl-trait/issues/issue-70877.rs +++ b/src/test/ui/impl-trait/issues/issue-70877.rs @@ -1,7 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] -#![allow(incomplete_features)] +#![feature(type_alias_impl_trait)] type FooArg<'a> = &'a dyn ToString; type FooRet = impl std::fmt::Debug; diff --git a/src/test/ui/impl-trait/issues/issue-70877.stderr b/src/test/ui/impl-trait/issues/issue-70877.stderr new file mode 100644 index 000000000000..b6861039f6a9 --- /dev/null +++ b/src/test/ui/impl-trait/issues/issue-70877.stderr @@ -0,0 +1,15 @@ +error[E0271]: type mismatch resolving `::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option + 'static)>` + --> $DIR/issue-70877.rs:7:12 + | +LL | type FooRet = impl std::fmt::Debug; + | -------------------- the found opaque type +... +LL | type Foo = impl Iterator; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found opaque type + | + = note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option + 'static)>` + found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/impl-trait/issues/issue-78722.rs b/src/test/ui/impl-trait/issues/issue-78722.rs index 0b8569b6e5fa..bdbd20f9d2b8 100644 --- a/src/test/ui/impl-trait/issues/issue-78722.rs +++ b/src/test/ui/impl-trait/issues/issue-78722.rs @@ -1,8 +1,6 @@ // edition:2018 -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type F = impl core::future::Future; diff --git a/src/test/ui/impl-trait/issues/issue-78722.stderr b/src/test/ui/impl-trait/issues/issue-78722.stderr new file mode 100644 index 000000000000..f42d66d12435 --- /dev/null +++ b/src/test/ui/impl-trait/issues/issue-78722.stderr @@ -0,0 +1,23 @@ +error[E0308]: mismatched types + --> $DIR/issue-78722.rs:12:20 + | +LL | type F = impl core::future::Future; + | -------------------------------------- the expected opaque type +... +LL | let f: F = async { 1 }; + | - ^^^^^^^^^^^ expected opaque type, found a different opaque type + | | + | expected due to this + | + ::: $SRC_DIR/core/src/future/mod.rs:LL:COL + | +LL | pub const fn from_generator(gen: T) -> impl Future + | ------------------------------- the found opaque type + | + = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:5:10>) + found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>) + = note: distinct uses of `impl Trait` result in different opaque types + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/impl-trait/issues/issue-86201.rs b/src/test/ui/impl-trait/issues/issue-86201.rs index 8dc76f4f752a..8cc4fef890ab 100644 --- a/src/test/ui/impl-trait/issues/issue-86201.rs +++ b/src/test/ui/impl-trait/issues/issue-86201.rs @@ -1,5 +1,5 @@ #![feature(unboxed_closures)] -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] type FunType = impl Fn<()>; //~^ could not find defining uses diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs index cfc493928c07..96d891b2cf1d 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.rs @@ -1,9 +1,7 @@ // compile-flags:-Zborrowck=mir #![feature(member_constraints)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #[derive(Clone)] struct CopyIfEq(T, U); diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr new file mode 100644 index 000000000000..59105f11805c --- /dev/null +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.stderr @@ -0,0 +1,15 @@ +error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds + --> $DIR/error-handling-2.rs:13:60 + | +LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { + | ^^^^^^^^^ + | +note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 13:8 + --> $DIR/error-handling-2.rs:13:8 + | +LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { + | ^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0700`. diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs index 23d5c9da3113..6d88f16ea8ab 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs @@ -1,8 +1,6 @@ // compile-flags:-Zborrowck=mir -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #[derive(Clone)] struct CopyIfEq(T, U); diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr new file mode 100644 index 000000000000..ccd0040030da --- /dev/null +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr @@ -0,0 +1,15 @@ +error: lifetime may not live long enough + --> $DIR/error-handling.rs:22:16 + | +LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _: &'b i32 = *u.0; + | ^^^^^^^ type annotation requires that `'a` must outlive `'b` + | + = help: consider adding the following bound: `'a: 'b` + +error: aborting due to previous error + diff --git a/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs b/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs index b9857b7aa2f1..529dcd8ece6f 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-pick-original-type-alias-impl-trait.rs @@ -3,7 +3,7 @@ // revisions: migrate mir //[mir]compile-flags: -Z borrowck=mir -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] trait Trait<'a, 'b> {} impl Trait<'_, '_> for T {} diff --git a/src/test/ui/impl-trait/negative-reasoning.rs b/src/test/ui/impl-trait/negative-reasoning.rs index 0838f32b932b..d173fe83fb79 100644 --- a/src/test/ui/impl-trait/negative-reasoning.rs +++ b/src/test/ui/impl-trait/negative-reasoning.rs @@ -1,8 +1,6 @@ // Tests that we cannot assume that an opaque type does *not* implement some // other trait -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait OpaqueTrait {} impl OpaqueTrait for T {} diff --git a/src/test/ui/impl-trait/negative-reasoning.stderr b/src/test/ui/impl-trait/negative-reasoning.stderr new file mode 100644 index 000000000000..e39a8e53f798 --- /dev/null +++ b/src/test/ui/impl-trait/negative-reasoning.stderr @@ -0,0 +1,14 @@ +error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` + --> $DIR/negative-reasoning.rs:19:1 + | +LL | impl AnotherTrait for T {} + | ------------------------------------------- first implementation here +... +LL | impl AnotherTrait for D { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D` + | + = note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `impl OpaqueTrait` in future versions + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/impl-trait/type-alias-generic-param.rs b/src/test/ui/impl-trait/type-alias-generic-param.rs index 9cb9a6de2d6f..3499b2859267 100644 --- a/src/test/ui/impl-trait/type-alias-generic-param.rs +++ b/src/test/ui/impl-trait/type-alias-generic-param.rs @@ -3,9 +3,7 @@ // types in 'item' position when generic parameters are involved // // run-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Meow { type MeowType; diff --git a/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs b/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs index 996840dc1960..91be4efd56a1 100644 --- a/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs +++ b/src/test/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/impl-trait/where-allowed.stderr b/src/test/ui/impl-trait/where-allowed.stderr index 93a3de61ccf8..7f11d30dbaa5 100644 --- a/src/test/ui/impl-trait/where-allowed.stderr +++ b/src/test/ui/impl-trait/where-allowed.stderr @@ -23,7 +23,7 @@ LL | type Out = impl Debug; | ^^^^^^^^^^ | = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/where-allowed.rs:154:23 @@ -32,7 +32,7 @@ LL | type InTypeAlias = impl Debug; | ^^^^^^^^^^ | = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/where-allowed.rs:157:39 @@ -41,7 +41,7 @@ LL | type InReturnInTypeAlias = fn() -> impl Debug; | ^^^^^^^^^^ | = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0562]: `impl Trait` not allowed outside of function and method return types --> $DIR/where-allowed.rs:15:40 diff --git a/src/test/ui/issues/issue-60662.full_tait.stdout b/src/test/ui/issues/issue-60662.full_tait.stdout index 9ee4434d5595..88bbbd143fb8 100644 --- a/src/test/ui/issues/issue-60662.full_tait.stdout +++ b/src/test/ui/issues/issue-60662.full_tait.stdout @@ -2,7 +2,7 @@ // compile-flags: -Z unpretty=hir // revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)] #[prelude_import] use ::std::prelude::rust_2015::*; diff --git a/src/test/ui/issues/issue-60662.min_tait.stdout b/src/test/ui/issues/issue-60662.min_tait.stdout index d0db578f5709..c2495556f602 100644 --- a/src/test/ui/issues/issue-60662.min_tait.stdout +++ b/src/test/ui/issues/issue-60662.min_tait.stdout @@ -2,7 +2,7 @@ // compile-flags: -Z unpretty=hir // revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] diff --git a/src/test/ui/issues/issue-60662.rs b/src/test/ui/issues/issue-60662.rs index 5079e33650f7..b9faa668b80e 100644 --- a/src/test/ui/issues/issue-60662.rs +++ b/src/test/ui/issues/issue-60662.rs @@ -1,9 +1,7 @@ // check-pass // compile-flags: -Z unpretty=hir -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Animal {} diff --git a/src/test/ui/issues/issue-60662.stdout b/src/test/ui/issues/issue-60662.stdout new file mode 100644 index 000000000000..14a49f20e6b2 --- /dev/null +++ b/src/test/ui/issues/issue-60662.stdout @@ -0,0 +1,14 @@ +// check-pass +// compile-flags: -Z unpretty=hir + +#![feature(type_alias_impl_trait)] +#[prelude_import] +use ::std::prelude::rust_2015::*; +#[macro_use] +extern crate std; + +trait Animal { } + +fn main() { + pub type ServeFut = /*impl Trait*/; + } diff --git a/src/test/ui/layout/debug.rs b/src/test/ui/layout/debug.rs index 317955f0e39d..299151df6649 100644 --- a/src/test/ui/layout/debug.rs +++ b/src/test/ui/layout/debug.rs @@ -1,5 +1,5 @@ // normalize-stderr-test "pref: Align \{\n *pow2: [1-3],\n *\}" -> "pref: $$PREF_ALIGN" -#![feature(never_type, rustc_attrs, min_type_alias_impl_trait)] +#![feature(never_type, rustc_attrs, type_alias_impl_trait)] #![crate_type = "lib"] #[rustc_layout(debug)] diff --git a/src/test/ui/lint/inline-trait-and-foreign-items.rs b/src/test/ui/lint/inline-trait-and-foreign-items.rs index 9d9579ec26c2..6321b3c76e4d 100644 --- a/src/test/ui/lint/inline-trait-and-foreign-items.rs +++ b/src/test/ui/lint/inline-trait-and-foreign-items.rs @@ -1,7 +1,5 @@ #![feature(extern_types)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![warn(unused_attributes)] diff --git a/src/test/ui/lint/inline-trait-and-foreign-items.stderr b/src/test/ui/lint/inline-trait-and-foreign-items.stderr new file mode 100644 index 000000000000..6ac884c12ceb --- /dev/null +++ b/src/test/ui/lint/inline-trait-and-foreign-items.stderr @@ -0,0 +1,72 @@ +warning: `#[inline]` is ignored on constants + --> $DIR/inline-trait-and-foreign-items.rs:7:5 + | +LL | #[inline] + | ^^^^^^^^^ + | +note: the lint level is defined here + --> $DIR/inline-trait-and-foreign-items.rs:4:9 + | +LL | #![warn(unused_attributes)] + | ^^^^^^^^^^^^^^^^^ + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: see issue #65833 for more information + +error[E0518]: attribute should be applied to function or closure + --> $DIR/inline-trait-and-foreign-items.rs:11:5 + | +LL | #[inline] + | ^^^^^^^^^ +LL | type T; + | ------- not a function or closure + +warning: `#[inline]` is ignored on constants + --> $DIR/inline-trait-and-foreign-items.rs:18:5 + | +LL | #[inline] + | ^^^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: see issue #65833 for more information + +error[E0518]: attribute should be applied to function or closure + --> $DIR/inline-trait-and-foreign-items.rs:22:5 + | +LL | #[inline] + | ^^^^^^^^^ +LL | type T = Self; + | -------------- not a function or closure + +error[E0518]: attribute should be applied to function or closure + --> $DIR/inline-trait-and-foreign-items.rs:25:5 + | +LL | #[inline] + | ^^^^^^^^^ +LL | type U = impl Trait; + | -------------------- not a function or closure + +error[E0518]: attribute should be applied to function or closure + --> $DIR/inline-trait-and-foreign-items.rs:30:5 + | +LL | #[inline] + | ^^^^^^^^^ +LL | static X: u32; + | -------------- not a function or closure + +error[E0518]: attribute should be applied to function or closure + --> $DIR/inline-trait-and-foreign-items.rs:33:5 + | +LL | #[inline] + | ^^^^^^^^^ +LL | type T; + | ------- not a function or closure + +error: could not find defining uses + --> $DIR/inline-trait-and-foreign-items.rs:26:14 + | +LL | type U = impl Trait; + | ^^^^^^^^^^ + +error: aborting due to 6 previous errors; 2 warnings emitted + +For more information about this error, try `rustc --explain E0518`. diff --git a/src/test/ui/lint/lint-ctypes-73249-2.rs b/src/test/ui/lint/lint-ctypes-73249-2.rs index 8535307756ba..fe578f51b63a 100644 --- a/src/test/ui/lint/lint-ctypes-73249-2.rs +++ b/src/test/ui/lint/lint-ctypes-73249-2.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] pub trait Baz {} diff --git a/src/test/ui/lint/lint-ctypes-73249-2.stderr b/src/test/ui/lint/lint-ctypes-73249-2.stderr new file mode 100644 index 000000000000..36dbe3217d75 --- /dev/null +++ b/src/test/ui/lint/lint-ctypes-73249-2.stderr @@ -0,0 +1,15 @@ +error: `extern` block uses type `impl Baz`, which is not FFI-safe + --> $DIR/lint-ctypes-73249-2.rs:26:25 + | +LL | pub fn lint_me() -> A<()>; + | ^^^^^ not FFI-safe + | +note: the lint level is defined here + --> $DIR/lint-ctypes-73249-2.rs:2:9 + | +LL | #![deny(improper_ctypes)] + | ^^^^^^^^^^^^^^^ + = note: opaque types have no C equivalent + +error: aborting due to previous error + diff --git a/src/test/ui/lint/lint-ctypes-73249-3.rs b/src/test/ui/lint/lint-ctypes-73249-3.rs index 287287d449cf..ec12de00739e 100644 --- a/src/test/ui/lint/lint-ctypes-73249-3.rs +++ b/src/test/ui/lint/lint-ctypes-73249-3.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] pub trait Baz {} diff --git a/src/test/ui/lint/lint-ctypes-73249-3.stderr b/src/test/ui/lint/lint-ctypes-73249-3.stderr new file mode 100644 index 000000000000..e987ec90228c --- /dev/null +++ b/src/test/ui/lint/lint-ctypes-73249-3.stderr @@ -0,0 +1,15 @@ +error: `extern` block uses type `impl Baz`, which is not FFI-safe + --> $DIR/lint-ctypes-73249-3.rs:20:25 + | +LL | pub fn lint_me() -> A; + | ^ not FFI-safe + | +note: the lint level is defined here + --> $DIR/lint-ctypes-73249-3.rs:2:9 + | +LL | #![deny(improper_ctypes)] + | ^^^^^^^^^^^^^^^ + = note: opaque types have no C equivalent + +error: aborting due to previous error + diff --git a/src/test/ui/lint/lint-ctypes-73249-5.rs b/src/test/ui/lint/lint-ctypes-73249-5.rs index b877364d9b6f..58c2d7a501ad 100644 --- a/src/test/ui/lint/lint-ctypes-73249-5.rs +++ b/src/test/ui/lint/lint-ctypes-73249-5.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] pub trait Baz {} diff --git a/src/test/ui/lint/lint-ctypes-73249-5.stderr b/src/test/ui/lint/lint-ctypes-73249-5.stderr new file mode 100644 index 000000000000..749714c7df8d --- /dev/null +++ b/src/test/ui/lint/lint-ctypes-73249-5.stderr @@ -0,0 +1,15 @@ +error: `extern` block uses type `impl Baz`, which is not FFI-safe + --> $DIR/lint-ctypes-73249-5.rs:20:25 + | +LL | pub fn lint_me() -> A; + | ^ not FFI-safe + | +note: the lint level is defined here + --> $DIR/lint-ctypes-73249-5.rs:2:9 + | +LL | #![deny(improper_ctypes)] + | ^^^^^^^^^^^^^^^ + = note: opaque types have no C equivalent + +error: aborting due to previous error + diff --git a/src/test/ui/lint/lint-ctypes-73251-1.rs b/src/test/ui/lint/lint-ctypes-73251-1.rs index 042878c97780..dc4c7efd7ef2 100644 --- a/src/test/ui/lint/lint-ctypes-73251-1.rs +++ b/src/test/ui/lint/lint-ctypes-73251-1.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] pub trait Baz {} diff --git a/src/test/ui/lint/lint-ctypes-73251-1.stderr b/src/test/ui/lint/lint-ctypes-73251-1.stderr new file mode 100644 index 000000000000..505ccd5a930c --- /dev/null +++ b/src/test/ui/lint/lint-ctypes-73251-1.stderr @@ -0,0 +1,15 @@ +error: `extern` block uses type `impl Baz`, which is not FFI-safe + --> $DIR/lint-ctypes-73251-1.rs:23:25 + | +LL | pub fn lint_me() -> ::Assoc; + | ^^^^^^^^^^^^^^^^^^^ not FFI-safe + | +note: the lint level is defined here + --> $DIR/lint-ctypes-73251-1.rs:2:9 + | +LL | #![deny(improper_ctypes)] + | ^^^^^^^^^^^^^^^ + = note: opaque types have no C equivalent + +error: aborting due to previous error + diff --git a/src/test/ui/lint/lint-ctypes-73251-2.rs b/src/test/ui/lint/lint-ctypes-73251-2.rs index 5a124b2fea50..79effd054b08 100644 --- a/src/test/ui/lint/lint-ctypes-73251-2.rs +++ b/src/test/ui/lint/lint-ctypes-73251-2.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] pub trait TraitA { diff --git a/src/test/ui/lint/lint-ctypes-73251-2.stderr b/src/test/ui/lint/lint-ctypes-73251-2.stderr new file mode 100644 index 000000000000..94ee95d422e0 --- /dev/null +++ b/src/test/ui/lint/lint-ctypes-73251-2.stderr @@ -0,0 +1,15 @@ +error: `extern` block uses type `impl TraitA`, which is not FFI-safe + --> $DIR/lint-ctypes-73251-2.rs:36:25 + | +LL | pub fn lint_me() -> ::Assoc; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe + | +note: the lint level is defined here + --> $DIR/lint-ctypes-73251-2.rs:2:9 + | +LL | #![deny(improper_ctypes)] + | ^^^^^^^^^^^^^^^ + = note: opaque types have no C equivalent + +error: aborting due to previous error + diff --git a/src/test/ui/lint/lint-ctypes-73251.rs b/src/test/ui/lint/lint-ctypes-73251.rs index 24742b64f8e9..ebc2ca77b67a 100644 --- a/src/test/ui/lint/lint-ctypes-73251.rs +++ b/src/test/ui/lint/lint-ctypes-73251.rs @@ -1,8 +1,6 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] pub trait Foo { diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.rs b/src/test/ui/lint/opaque-ty-ffi-unsafe.rs index 0c9fed8b98c2..fadb7471952f 100644 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.rs +++ b/src/test/ui/lint/opaque-ty-ffi-unsafe.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(improper_ctypes)] type A = impl Fn(); diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.stderr b/src/test/ui/lint/opaque-ty-ffi-unsafe.stderr new file mode 100644 index 000000000000..9d46f6d936e2 --- /dev/null +++ b/src/test/ui/lint/opaque-ty-ffi-unsafe.stderr @@ -0,0 +1,15 @@ +error: `extern` block uses type `impl Fn<()>`, which is not FFI-safe + --> $DIR/opaque-ty-ffi-unsafe.rs:11:17 + | +LL | pub fn a(_: A); + | ^ not FFI-safe + | +note: the lint level is defined here + --> $DIR/opaque-ty-ffi-unsafe.rs:2:9 + | +LL | #![deny(improper_ctypes)] + | ^^^^^^^^^^^^^^^ + = note: opaque types have no C equivalent + +error: aborting due to previous error + diff --git a/src/test/ui/mir/issue-75053.rs b/src/test/ui/mir/issue-75053.rs index bcd689775a09..cb56eaa0b13d 100644 --- a/src/test/ui/mir/issue-75053.rs +++ b/src/test/ui/mir/issue-75053.rs @@ -1,8 +1,6 @@ // compile-flags: -Z mir-opt-level=3 -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait, rustc_attrs)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait, rustc_attrs)] use std::marker::PhantomData; diff --git a/src/test/ui/mir/issue-75053.stderr b/src/test/ui/mir/issue-75053.stderr new file mode 100644 index 000000000000..64e59e6c4482 --- /dev/null +++ b/src/test/ui/mir/issue-75053.stderr @@ -0,0 +1,8 @@ +error: fatal error triggered by #[rustc_error] + --> $DIR/issue-75053.rs:46:1 + | +LL | fn main() { + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.rs b/src/test/ui/privacy/private-in-public-assoc-ty.rs index dd2dcc6a2ea9..fba72c13170f 100644 --- a/src/test/ui/privacy/private-in-public-assoc-ty.rs +++ b/src/test/ui/privacy/private-in-public-assoc-ty.rs @@ -2,9 +2,7 @@ // This test also ensures that the checks are performed even inside private modules. #![feature(associated_type_defaults)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] mod m { struct Priv; diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.stderr new file mode 100644 index 000000000000..ba62a228b09f --- /dev/null +++ b/src/test/ui/privacy/private-in-public-assoc-ty.stderr @@ -0,0 +1,68 @@ +error[E0446]: private type `Priv` in public interface + --> $DIR/private-in-public-assoc-ty.rs:17:9 + | +LL | struct Priv; + | ------------ `Priv` declared as private +... +LL | type A = Priv; + | ^^^^^^^^^^^^^^ can't leak private type + +warning: private trait `PrivTr` in public interface (error E0445) + --> $DIR/private-in-public-assoc-ty.rs:24:9 + | +LL | type Alias1: PrivTr; + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(private_in_public)]` on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #34537 + +warning: private type `Priv` in public interface (error E0446) + --> $DIR/private-in-public-assoc-ty.rs:27:9 + | +LL | type Alias2: PubTrAux1 = u8; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #34537 + +warning: private type `Priv` in public interface (error E0446) + --> $DIR/private-in-public-assoc-ty.rs:30:9 + | +LL | type Alias3: PubTrAux2 = u8; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #34537 + +error[E0446]: private type `Priv` in public interface + --> $DIR/private-in-public-assoc-ty.rs:34:9 + | +LL | struct Priv; + | ------------ `Priv` declared as private +... +LL | type Alias4 = Priv; + | ^^^^^^^^^^^^^^^^^^^ can't leak private type + +error[E0446]: private type `Priv` in public interface + --> $DIR/private-in-public-assoc-ty.rs:41:9 + | +LL | struct Priv; + | ------------ `Priv` declared as private +... +LL | type Alias1 = Priv; + | ^^^^^^^^^^^^^^^^^^^ can't leak private type + +error[E0445]: private trait `PrivTr` in public interface + --> $DIR/private-in-public-assoc-ty.rs:44:9 + | +LL | trait PrivTr {} + | ------------ `PrivTr` declared as private +... +LL | type Exist = impl PrivTr; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait + +error: aborting due to 4 previous errors; 3 warnings emitted + +Some errors have detailed explanations: E0445, E0446. +For more information about an error, try `rustc --explain E0445`. diff --git a/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs b/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs index 91dade4a2c14..c7df31529bcf 100644 --- a/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs +++ b/src/test/ui/privacy/private-in-public-type-alias-impl-trait.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![deny(private_in_public)] pub type Pub = impl Default; diff --git a/src/test/ui/save-analysis/issue-68621.rs b/src/test/ui/save-analysis/issue-68621.rs index 33bb55e50e0f..96af085c5b6b 100644 --- a/src/test/ui/save-analysis/issue-68621.rs +++ b/src/test/ui/save-analysis/issue-68621.rs @@ -1,8 +1,6 @@ // compile-flags: -Zsave-analysis -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Trait {} diff --git a/src/test/ui/save-analysis/issue-68621.stderr b/src/test/ui/save-analysis/issue-68621.stderr new file mode 100644 index 000000000000..3af6d0a3e076 --- /dev/null +++ b/src/test/ui/save-analysis/issue-68621.stderr @@ -0,0 +1,8 @@ +error: could not find defining uses + --> $DIR/issue-68621.rs:14:19 + | +LL | type Future = impl Trait; + | ^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/traits/alias/issue-83613.rs b/src/test/ui/traits/alias/issue-83613.rs index 146920ac685b..0013d5d66f17 100644 --- a/src/test/ui/traits/alias/issue-83613.rs +++ b/src/test/ui/traits/alias/issue-83613.rs @@ -1,4 +1,4 @@ -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] trait OpaqueTrait {} impl OpaqueTrait for T {} type OpaqueType = impl OpaqueTrait; diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.rs b/src/test/ui/type-alias-impl-trait/assoc-type-const.rs index 4db32a3113c7..d53f562e99f4 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-const.rs +++ b/src/test/ui/type-alias-impl-trait/assoc-type-const.rs @@ -2,9 +2,7 @@ // const generics in an associated opaque type // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![feature(const_generics)] //~^ WARN the feature `const_generics` is incomplete diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-const.stderr new file mode 100644 index 000000000000..e0c1b0238612 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/assoc-type-const.stderr @@ -0,0 +1,11 @@ +warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/assoc-type-const.rs:6:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #44580 for more information + +warning: 1 warning emitted + diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs index cb849e129422..3f34b00ec77e 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs +++ b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs @@ -1,9 +1,7 @@ // Tests that we don't allow unconstrained lifetime parameters in impls when // the lifetime is used in an associated opaque type. -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait UnwrapItemsExt { type Iter; diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr new file mode 100644 index 000000000000..e594dc577b1c --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr @@ -0,0 +1,9 @@ +error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates + --> $DIR/assoc-type-lifetime-unconstrained.rs:17:6 + | +LL | impl<'a, I> UnwrapItemsExt for I { + | ^^ unconstrained lifetime parameter + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs index 28535fe55674..39f785d8cc55 100644 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs +++ b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime.rs @@ -2,9 +2,7 @@ // lifetimes are used in an associated opaque type // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait UnwrapItemsExt<'a> { type Iter; diff --git a/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs b/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs index b9324991a5f0..42f07d49ffe2 100644 --- a/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs +++ b/src/test/ui/type-alias-impl-trait/associated-type-alias-impl-trait.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs index 64bf96259f01..e7bca2231de4 100644 --- a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs +++ b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs @@ -1,9 +1,7 @@ // Crate that exports an opaque `impl Trait` type. Used for testing cross-crate. #![crate_type = "rlib"] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub type Foo = impl std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs index 09aa2691804d..119f7df1ffda 100644 --- a/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs +++ b/src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs @@ -1,9 +1,7 @@ // Crate that exports an opaque `impl Trait` type. Used for testing cross-crate. #![crate_type = "rlib"] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub trait View { type Tmp: Iterator; diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction.rs b/src/test/ui/type-alias-impl-trait/bound_reduction.rs index b45105ea8f29..b9b50f0b77aa 100644 --- a/src/test/ui/type-alias-impl-trait/bound_reduction.rs +++ b/src/test/ui/type-alias-impl-trait/bound_reduction.rs @@ -1,9 +1,7 @@ // build-pass (FIXME(62277): could be check-pass?) #![allow(warnings)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() { } diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction2.rs b/src/test/ui/type-alias-impl-trait/bound_reduction2.rs index 3e56d115b474..a15074c35936 100644 --- a/src/test/ui/type-alias-impl-trait/bound_reduction2.rs +++ b/src/test/ui/type-alias-impl-trait/bound_reduction2.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction2.stderr b/src/test/ui/type-alias-impl-trait/bound_reduction2.stderr new file mode 100644 index 000000000000..c9d6a43b9094 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/bound_reduction2.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/bound_reduction2.rs:15:46 + | +LL | fn foo_desugared(_: T) -> Foo { + | ^^^^^^^^^^^^^ + | +note: used non-generic type `::Assoc` for generic parameter + --> $DIR/bound_reduction2.rs:9:10 + | +LL | type Foo = impl Trait; + | ^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs index 5ffcd7ae5460..c0359159aebe 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.rs @@ -1,9 +1,7 @@ // Make sure that we check that impl trait types implement the traits that they // claim to. -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type X = impl Clone; //~^ ERROR the trait bound `T: Clone` is not satisfied diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr new file mode 100644 index 000000000000..c1f58aa6de66 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.stderr @@ -0,0 +1,14 @@ +error[E0277]: the trait bound `T: Clone` is not satisfied + --> $DIR/bounds-are-checked-2.rs:6:13 + | +LL | type X = impl Clone; + | ^^^^^^^^^^ the trait `Clone` is not implemented for `T` + | +help: consider restricting type parameter `T` + | +LL | type X = impl Clone; + | ^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs b/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs index 74c49a9c6c7f..eecef2338c14 100644 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked.rs @@ -1,9 +1,7 @@ // Make sure that we check that impl trait types implement the traits that they // claim to. -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type X<'a> = impl Into<&'static str> + From<&'a str>; //~^ ERROR mismatched types diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr new file mode 100644 index 000000000000..d5fafe05887b --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/bounds-are-checked.stderr @@ -0,0 +1,26 @@ +warning: unnecessary lifetime parameter `'a` + --> $DIR/bounds-are-checked.rs:9:6 + | +LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { + | ^^^^^^^^^^^ + | + = help: you can use the `'static` lifetime directly, in place of `'a` + +error[E0308]: mismatched types + --> $DIR/bounds-are-checked.rs:6:14 + | +LL | type X<'a> = impl Into<&'static str> + From<&'a str>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch + | + = note: expected trait `From<&'a str>` + found trait `From<&'static str>` +note: the lifetime `'a` as defined on the item at 6:8... + --> $DIR/bounds-are-checked.rs:6:8 + | +LL | type X<'a> = impl Into<&'static str> + From<&'a str>; + | ^^ + = note: ...does not necessarily outlive the static lifetime + +error: aborting due to previous error; 1 warning emitted + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/coherence.rs b/src/test/ui/type-alias-impl-trait/coherence.rs index 998eadeb2717..1c0f83d6c12d 100644 --- a/src/test/ui/type-alias-impl-trait/coherence.rs +++ b/src/test/ui/type-alias-impl-trait/coherence.rs @@ -1,7 +1,5 @@ // aux-build:foreign-crate.rs -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] extern crate foreign_crate; diff --git a/src/test/ui/type-alias-impl-trait/coherence.stderr b/src/test/ui/type-alias-impl-trait/coherence.stderr new file mode 100644 index 000000000000..6ede0fa14ba7 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/coherence.stderr @@ -0,0 +1,9 @@ +error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates + --> $DIR/coherence.rs:14:6 + | +LL | impl foreign_crate::ForeignTrait for AliasOfForeignType {} + | ^ unconstrained type parameter + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs index a62ae2aff70b..c4bf56a91972 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs +++ b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.stderr b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.stderr new file mode 100644 index 000000000000..21c2e8a9db61 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.stderr @@ -0,0 +1,8 @@ +error: could not find defining uses + --> $DIR/declared_but_never_defined.rs:6:12 + | +LL | type Bar = impl std::fmt::Debug; + | ^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs index 0ada4a38da3f..7ea517eb734a 100644 --- a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs +++ b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.stderr b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.stderr new file mode 100644 index 000000000000..0b4c262bbb43 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.stderr @@ -0,0 +1,23 @@ +error: could not find defining uses + --> $DIR/declared_but_not_defined_in_scope.rs:7:20 + | +LL | pub type Boo = impl ::std::fmt::Debug; + | ^^^^^^^^^^^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/declared_but_not_defined_in_scope.rs:11:5 + | +LL | pub type Boo = impl ::std::fmt::Debug; + | ---------------------- the expected opaque type +... +LL | fn bomp() -> boo::Boo { + | -------- expected `impl Debug` because of return type +LL | "" + | ^^ expected opaque type, found `&str` + | + = note: expected opaque type `impl Debug` + found reference `&'static str` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses.rs b/src/test/ui/type-alias-impl-trait/different_defining_uses.rs index bb981959b220..272af7a5204f 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses.rs +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses.stderr new file mode 100644 index 000000000000..eaa716bc71c3 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses.stderr @@ -0,0 +1,14 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/different_defining_uses.rs:12:1 + | +LL | fn bar() -> Foo { + | ^^^^^^^^^^^^^^^ expected `&'static str`, got `i32` + | +note: previous use here + --> $DIR/different_defining_uses.rs:8:1 + | +LL | fn foo() -> Foo { + | ^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs index 716c7383c611..95cbcfec2dc1 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr new file mode 100644 index 000000000000..6274029e4f52 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.stderr @@ -0,0 +1,26 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/different_defining_uses_never_type.rs:12:1 + | +LL | fn bar() -> Foo { + | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` + | +note: previous use here + --> $DIR/different_defining_uses_never_type.rs:8:1 + | +LL | fn foo() -> Foo { + | ^^^^^^^^^^^^^^^ + +error: concrete type differs from previous defining opaque type use + --> $DIR/different_defining_uses_never_type.rs:17:1 + | +LL | fn boo() -> Foo { + | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` + | +note: previous use here + --> $DIR/different_defining_uses_never_type.rs:8:1 + | +LL | fn foo() -> Foo { + | ^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs index 8383f38ddbec..8549687ea781 100644 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs +++ b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type2.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/fallback.rs b/src/test/ui/type-alias-impl-trait/fallback.rs index 204dc0496ede..fe1ca2230dac 100644 --- a/src/test/ui/type-alias-impl-trait/fallback.rs +++ b/src/test/ui/type-alias-impl-trait/fallback.rs @@ -2,9 +2,7 @@ // inference variable being completely unconstrained. // // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Foo = impl Copy; diff --git a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs index adf4c1f86563..075351307589 100644 --- a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs +++ b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.stderr b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.stderr new file mode 100644 index 000000000000..f8a058170e37 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.stderr @@ -0,0 +1,14 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_different_defining_uses.rs:11:1 + | +LL | fn my_iter2(t: T) -> MyIter { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `std::iter::Once`, got `std::option::IntoIter` + | +note: previous use here + --> $DIR/generic_different_defining_uses.rs:7:1 + | +LL | fn my_iter(t: T) -> MyIter { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs index f0b80db2a831..31f992976b18 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr new file mode 100644 index 000000000000..08b26b8fc130 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/generic_duplicate_lifetime_param.rs:7:26 + | +LL | fn one<'a>(t: &'a ()) -> Two<'a, 'a> { + | ^^^^^^^^^^^ + | +note: lifetime used multiple times + --> $DIR/generic_duplicate_lifetime_param.rs:5:10 + | +LL | type Two<'a, 'b> = impl std::fmt::Debug; + | ^^ ^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs index 12ff5a2e713d..e45950c4926b 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.rs @@ -1,7 +1,5 @@ #![feature(const_generics)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![allow(incomplete_features)] use std::fmt::Debug; @@ -14,16 +12,16 @@ fn main() {} type TwoConsts = impl Debug; fn one_ty(t: T) -> TwoTys { -//~^ ERROR non-defining opaque type use in defining scope + //~^ ERROR non-defining opaque type use in defining scope t } fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> { -//~^ ERROR non-defining opaque type use in defining scope + //~^ ERROR non-defining opaque type use in defining scope t } fn one_const(t: *mut [u8; N]) -> TwoConsts { -//~^ ERROR non-defining opaque type use in defining scope + //~^ ERROR non-defining opaque type use in defining scope t } diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr new file mode 100644 index 000000000000..7ea5efd4e6b0 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.stderr @@ -0,0 +1,38 @@ +error: non-defining opaque type use in defining scope + --> $DIR/generic_duplicate_param_use.rs:14:30 + | +LL | fn one_ty(t: T) -> TwoTys { + | ^^^^^^^^^^^^ + | +note: type used multiple times + --> $DIR/generic_duplicate_param_use.rs:10:13 + | +LL | type TwoTys = impl Debug; + | ^ ^ + +error: non-defining opaque type use in defining scope + --> $DIR/generic_duplicate_param_use.rs:19:36 + | +LL | fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> { + | ^^^^^^^^^^^^^^^^^^^^ + | +note: lifetime used multiple times + --> $DIR/generic_duplicate_param_use.rs:11:19 + | +LL | type TwoLifetimes<'a, 'b> = impl Debug; + | ^^ ^^ + +error: non-defining opaque type use in defining scope + --> $DIR/generic_duplicate_param_use.rs:24:50 + | +LL | fn one_const(t: *mut [u8; N]) -> TwoConsts { + | ^^^^^^^^^^^^^^^ + | +note: constant used multiple times + --> $DIR/generic_duplicate_param_use.rs:12:22 + | +LL | type TwoConsts = impl Debug; + | ^ ^ + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs index afd2be267458..c17d595dbb3a 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use10.rs @@ -1,7 +1,5 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs index 9627689b15c3..a74731df6951 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr new file mode 100644 index 000000000000..d87e8c5783b6 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/generic_duplicate_param_use2.rs:10:27 + | +LL | fn one(t: T) -> Two { + | ^^^^^^^^^ + | +note: type used multiple times + --> $DIR/generic_duplicate_param_use2.rs:8:10 + | +LL | type Two = impl Debug; + | ^ ^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs index 04d00600c939..0597b8385d25 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.stderr new file mode 100644 index 000000000000..711de855f0d1 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/generic_duplicate_param_use3.rs:10:27 + | +LL | fn one(t: T) -> Two { + | ^^^^^^^^^ + | +note: type used multiple times + --> $DIR/generic_duplicate_param_use3.rs:8:10 + | +LL | type Two = impl Debug; + | ^ ^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs index 0d2979626ac4..e77c94988f73 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr new file mode 100644 index 000000000000..fcf01f5164ae --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/generic_duplicate_param_use4.rs:10:27 + | +LL | fn one(t: T) -> Two { + | ^^^^^^^^^ + | +note: type used multiple times + --> $DIR/generic_duplicate_param_use4.rs:8:10 + | +LL | type Two = impl Debug; + | ^ ^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs index 30ed7557c976..dd2f202cf5dc 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr new file mode 100644 index 000000000000..cb43b897cf9b --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.stderr @@ -0,0 +1,39 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use5.rs:16:1 + | +LL | fn three(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, U)`, got `(U, T)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use5.rs:12:1 + | +LL | fn two(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use5.rs:8:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, U)` +help: consider restricting type parameter `T` + | +LL | type Two = impl Debug; + | ^^^^^^^^^^^^^^^^^ + +error[E0277]: `U` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use5.rs:8:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, U)` +help: consider restricting type parameter `U` + | +LL | type Two = impl Debug; + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs index 04644f1e18b9..d54d3cd62e02 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr new file mode 100644 index 000000000000..509da2320e86 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.stderr @@ -0,0 +1,27 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use6.rs:15:1 + | +LL | fn three(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use6.rs:11:1 + | +LL | fn two(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use6.rs:8:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, T)` +help: consider restricting type parameter `T` + | +LL | type Two = impl Debug; + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs index df12882abada..feebf81eef2a 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use7.rs @@ -1,7 +1,5 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs index 283e0c1d660e..4a723b64cdc4 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr new file mode 100644 index 000000000000..a09f2506258f --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.stderr @@ -0,0 +1,27 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use8.rs:14:1 + | +LL | fn three(_: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, u32)`, got `(U, u32)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use8.rs:10:1 + | +LL | fn two(t: T, _: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: `T` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use8.rs:7:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(T, u32)` +help: consider restricting type parameter `T` + | +LL | type Two = impl Debug; + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs index 4c3b0877d239..747081933172 100644 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr new file mode 100644 index 000000000000..68a30820951f --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.stderr @@ -0,0 +1,51 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/generic_duplicate_param_use9.rs:21:1 + | +LL | fn three(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, ::Bar)`, got `(A, B, i32)` + | +note: previous use here + --> $DIR/generic_duplicate_param_use9.rs:17:1 + | +LL | fn two(t: T, u: U) -> Two { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, ::Bar)` + --> $DIR/generic_duplicate_param_use9.rs:7:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ within `(A, B, ::Bar)`, the trait `Foo` is not implemented for `A` + | + = note: required because it appears within the type `(A, B, ::Bar)` +help: consider restricting type parameter `A` + | +LL | type Two = impl Debug; + | ^^^^^ + +error[E0277]: `A` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use9.rs:7:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` +help: consider restricting type parameter `A` + | +LL | type Two = impl Debug; + | ^^^^^^^^^^^^^^^^^ + +error[E0277]: `B` doesn't implement `Debug` + --> $DIR/generic_duplicate_param_use9.rs:7:18 + | +LL | type Two = impl Debug; + | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` +help: consider restricting type parameter `B` + | +LL | type Two = impl Debug; + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs b/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs index 7274f4f76f8c..e109c38c9869 100644 --- a/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs +++ b/src/test/ui/type-alias-impl-trait/generic_lifetime_param.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.rs b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.rs index c69884d8d6ed..9f1bffff77c9 100644 --- a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.rs +++ b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.rs @@ -1,7 +1,5 @@ #![feature(const_generics)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![allow(incomplete_features)] use std::fmt::Debug; @@ -15,16 +13,16 @@ fn main() {} // Not defining uses, because they doesn't define *all* possible generics. fn concrete_ty() -> OneTy { -//~^ ERROR non-defining opaque type use in defining scope + //~^ ERROR non-defining opaque type use in defining scope 5u32 } fn concrete_lifetime() -> OneLifetime<'static> { -//~^ ERROR non-defining opaque type use in defining scope + //~^ ERROR non-defining opaque type use in defining scope 6u32 } -fn concrete_const() -> OneConst<{123}> { -//~^ ERROR non-defining opaque type use in defining scope +fn concrete_const() -> OneConst<{ 123 }> { + //~^ ERROR non-defining opaque type use in defining scope 7u32 } diff --git a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr new file mode 100644 index 000000000000..eb0c296bb626 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.stderr @@ -0,0 +1,35 @@ +error: non-defining opaque type use in defining scope + --> $DIR/generic_nondefining_use.rs:15:21 + | +LL | fn concrete_ty() -> OneTy { + | ^^^^^^^^^^ + | +note: used non-generic type `u32` for generic parameter + --> $DIR/generic_nondefining_use.rs:9:12 + | +LL | type OneTy = impl Debug; + | ^ + +error: non-defining opaque type use in defining scope + --> $DIR/generic_nondefining_use.rs:20:27 + | +LL | type OneLifetime<'a> = impl Debug; + | -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type +... +LL | fn concrete_lifetime() -> OneLifetime<'static> { + | ^^^^^^^^^^^^^^^^^^^^ + +error: non-defining opaque type use in defining scope + --> $DIR/generic_nondefining_use.rs:25:24 + | +LL | fn concrete_const() -> OneConst<{ 123 }> { + | ^^^^^^^^^^^^^^^^^ + | +note: used non-generic constant `{ 123 }` for generic parameter + --> $DIR/generic_nondefining_use.rs:11:21 + | +LL | type OneConst = impl Debug; + | ^ + +error: aborting due to 3 previous errors + diff --git a/src/test/ui/type-alias-impl-trait/generic_not_used.rs b/src/test/ui/type-alias-impl-trait/generic_not_used.rs index 36fae028d4ec..dd6300a64f42 100644 --- a/src/test/ui/type-alias-impl-trait/generic_not_used.rs +++ b/src/test/ui/type-alias-impl-trait/generic_not_used.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_not_used.stderr b/src/test/ui/type-alias-impl-trait/generic_not_used.stderr new file mode 100644 index 000000000000..8015ff7eded9 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_not_used.stderr @@ -0,0 +1,18 @@ +error: at least one trait must be specified + --> $DIR/generic_not_used.rs:5:33 + | +LL | type WrongGeneric = impl 'static; + | ^^^^^^^^^^^^ + +error: type parameter `V` is part of concrete type but not used in parameter list for the `impl Trait` type alias + --> $DIR/generic_not_used.rs:8:73 + | +LL | fn wrong_generic(_: U, v: V) -> WrongGeneric { + | _________________________________________________________________________^ +LL | | +LL | | v +LL | | } + | |_^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs index bd0fc8cbace4..9c6b93b7ba04 100644 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs +++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() { let y = 42; diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr new file mode 100644 index 000000000000..18d8daa05e63 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.stderr @@ -0,0 +1,33 @@ +error: at least one trait must be specified + --> $DIR/generic_type_does_not_live_long_enough.rs:9:24 + | +LL | type WrongGeneric = impl 'static; + | ^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/generic_type_does_not_live_long_enough.rs:6:18 + | +LL | let z: i32 = x; + | --- ^ expected `i32`, found opaque type + | | + | expected due to this +... +LL | type WrongGeneric = impl 'static; + | ------------ the found opaque type + | + = note: expected type `i32` + found opaque type `impl Sized` + +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/generic_type_does_not_live_long_enough.rs:9:24 + | +LL | type WrongGeneric = impl 'static; + | ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds +... +LL | fn wrong_generic(t: T) -> WrongGeneric { + | - help: consider adding an explicit lifetime bound...: `T: 'static` + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0308, E0310. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs b/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs index 5d723e5bc621..766ee36c02be 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr new file mode 100644 index 000000000000..cefc5d99b379 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained.stderr @@ -0,0 +1,23 @@ +error: at least one trait must be specified + --> $DIR/generic_underconstrained.rs:6:35 + | +LL | type Underconstrained = impl 'static; + | ^^^^^^^^^^^^ + +error[E0277]: the trait bound `T: Trait` is not satisfied + --> $DIR/generic_underconstrained.rs:10:31 + | +LL | type Underconstrained = impl 'static; + | ----- required by this bound in `Underconstrained` +... +LL | fn underconstrain(_: T) -> Underconstrained { + | ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T` + | +help: consider restricting type parameter `T` + | +LL | fn underconstrain(_: T) -> Underconstrained { + | ^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs index 01cd1b9b972f..cd7c962e2d15 100644 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr new file mode 100644 index 000000000000..8bba62a913e1 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.stderr @@ -0,0 +1,43 @@ +error: at least one trait must be specified + --> $DIR/generic_underconstrained2.rs:5:45 + | +LL | type Underconstrained = impl 'static; + | ^^^^^^^^^^^^ + +error: at least one trait must be specified + --> $DIR/generic_underconstrained2.rs:14:46 + | +LL | type Underconstrained2 = impl 'static; + | ^^^^^^^^^^^^ + +error[E0277]: `U` doesn't implement `Debug` + --> $DIR/generic_underconstrained2.rs:9:33 + | +LL | type Underconstrained = impl 'static; + | --------------- required by this bound in `Underconstrained` +... +LL | fn underconstrained(_: U) -> Underconstrained { + | ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | +help: consider restricting type parameter `U` + | +LL | fn underconstrained(_: U) -> Underconstrained { + | ^^^^^^^^^^^^^^^^^ + +error[E0277]: `V` doesn't implement `Debug` + --> $DIR/generic_underconstrained2.rs:18:43 + | +LL | type Underconstrained2 = impl 'static; + | --------------- required by this bound in `Underconstrained2` +... +LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { + | ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | +help: consider restricting type parameter `V` + | +LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs index 6759799b37d8..851c2f66c475 100644 --- a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs +++ b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs @@ -1,9 +1,7 @@ // Ensure that we don't ICE if associated type impl trait is used in an impl // with an unconstrained type parameter. -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait X { type I; diff --git a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr new file mode 100644 index 000000000000..8cf8fb1d16c4 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr @@ -0,0 +1,9 @@ +error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates + --> $DIR/impl-with-unconstrained-param.rs:11:6 + | +LL | impl X for () { + | ^ unconstrained type parameter + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs index f73169d7d08a..c46c4715924e 100644 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs +++ b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs @@ -1,9 +1,7 @@ // Regression test for issue 67856 #![feature(unboxed_closures)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![feature(fn_traits)] trait MyTrait {} diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr new file mode 100644 index 000000000000..e1e259187f5f --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr @@ -0,0 +1,23 @@ +error[E0119]: conflicting implementations of trait `std::ops::FnOnce<()>` for type `&_` + --> $DIR/incoherent-assoc-imp-trait.rs:10:1 + | +LL | impl FnOnce<()> for &F { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: conflicting implementation in crate `core`: + - impl FnOnce for &F + where F: Fn, F: ?Sized; + +error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct`) + --> $DIR/incoherent-assoc-imp-trait.rs:10:6 + | +LL | impl FnOnce<()> for &F { + | ^ type parameter `F` must be used as the type parameter for some local type + | + = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local + = note: only traits defined in the current crate can be implemented for a type parameter + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0119, E0210. +For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr deleted file mode 100644 index 68231d43f629..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.min_tait.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-52843-closure-constrain.rs:12:22 - | -LL | let null = || -> Opaque { 0 }; - | ^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error: concrete type differs from previous defining opaque type use - --> $DIR/issue-52843-closure-constrain.rs:12:16 - | -LL | let null = || -> Opaque { 0 }; - | ^^^^^^^^^^^^^^^^^^ expected `String`, got `[type error]` - | -note: previous use here - --> $DIR/issue-52843-closure-constrain.rs:11:5 - | -LL | fn _unused() -> Opaque { String::new() } - | ^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs index c7deb2e4eac9..50eeff0b18fd 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs +++ b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.rs @@ -1,15 +1,13 @@ // Checks to ensure that we properly detect when a closure constrains an opaque type -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; fn main() { type Opaque = impl Debug; fn _unused() -> Opaque { String::new() } - let null = || -> Opaque { 0 }; //[min_tait]~ ERROR: not permitted here + let null = || -> Opaque { 0 }; //~^ ERROR: concrete type differs from previous defining opaque type use println!("{:?}", null()); } diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr new file mode 100644 index 000000000000..d82050e263ee --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.stderr @@ -0,0 +1,14 @@ +error: concrete type differs from previous defining opaque type use + --> $DIR/issue-52843-closure-constrain.rs:10:16 + | +LL | let null = || -> Opaque { 0 }; + | ^^^^^^^^^^^^^^^^^^ expected `String`, got `i32` + | +note: previous use here + --> $DIR/issue-52843-closure-constrain.rs:9:5 + | +LL | fn _unused() -> Opaque { String::new() } + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.rs b/src/test/ui/type-alias-impl-trait/issue-52843.rs index 844bfa3b8461..b24959d72072 100644 --- a/src/test/ui/type-alias-impl-trait/issue-52843.rs +++ b/src/test/ui/type-alias-impl-trait/issue-52843.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Foo = impl Default; //~^ ERROR: the trait bound `T: Default` is not satisfied diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.stderr new file mode 100644 index 000000000000..8718a57d9d4f --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-52843.stderr @@ -0,0 +1,14 @@ +error[E0277]: the trait bound `T: Default` is not satisfied + --> $DIR/issue-52843.rs:3:15 + | +LL | type Foo = impl Default; + | ^^^^^^^^^^^^ the trait `Default` is not implemented for `T` + | +help: consider restricting type parameter `T` + | +LL | type Foo = impl Default; + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr index fb70582c31a2..554215fe8945 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr @@ -1,8 +1,9 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53096.rs:13:1 +error[E0636]: the feature `type_alias_impl_trait` has already been declared + --> $DIR/issue-53096.rs:4:32 | -LL | fn main() {} - | ^^^^^^^^^ +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error +For more information about this error, try `rustc --explain E0636`. diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.rs b/src/test/ui/type-alias-impl-trait/issue-53096.rs index 249055bf26c3..792bd16527be 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53096.rs +++ b/src/test/ui/type-alias-impl-trait/issue-53096.rs @@ -1,7 +1,5 @@ #![feature(const_impl_trait, const_fn_fn_ptr_basics, rustc_attrs)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Foo = impl Fn() -> usize; const fn bar() -> Foo { diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.stderr b/src/test/ui/type-alias-impl-trait/issue-53096.stderr new file mode 100644 index 000000000000..0af3a75f8532 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-53096.stderr @@ -0,0 +1,8 @@ +error: fatal error triggered by #[rustc_error] + --> $DIR/issue-53096.rs:11:1 + | +LL | fn main() {} + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.rs b/src/test/ui/type-alias-impl-trait/issue-53598.rs index 1680d6e58395..37b330ba4b8f 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53598.rs +++ b/src/test/ui/type-alias-impl-trait/issue-53598.rs @@ -1,7 +1,5 @@ // ignore-compare-mode-chalk -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.stderr b/src/test/ui/type-alias-impl-trait/issue-53598.stderr new file mode 100644 index 000000000000..4c8144a23593 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-53598.stderr @@ -0,0 +1,12 @@ +error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + --> $DIR/issue-53598.rs:20:42 + | +LL | fn foo(_: T) -> Self::Item { + | __________________________________________^ +LL | | +LL | | S::(Default::default()) +LL | | } + | |_____^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs index 9c50a3da95cb..176118200e5e 100644 --- a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs +++ b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs @@ -1,7 +1,5 @@ #![feature(const_impl_trait, generators, generator_trait, rustc_attrs)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::ops::Generator; diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.stderr b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.stderr new file mode 100644 index 000000000000..eb1c9603a60d --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.stderr @@ -0,0 +1,8 @@ +error: fatal error triggered by #[rustc_error] + --> $DIR/issue-53678-generator-and-const-fn.rs:19:1 + | +LL | fn main() {} + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs b/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs index fc32d455aaa8..af0780ab0b99 100644 --- a/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs +++ b/src/test/ui/type-alias-impl-trait/issue-55099-lifetime-inference.rs @@ -3,9 +3,7 @@ // Tests that we don't incorrectly consider a lifetime to part // of the concrete type -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Future {} diff --git a/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs b/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs index 7207dda90dc4..3a7a5da075f1 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs @@ -2,9 +2,7 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] struct Baz<'a> { source: &'a str, diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs index fcc3555b2312..a55fbf9c48a5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs @@ -3,9 +3,7 @@ // FIXME: This should compile, but it currently doesn't #![feature(trait_alias)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Foo { type Bar: Baz; diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr new file mode 100644 index 000000000000..f87beb66d995 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr @@ -0,0 +1,11 @@ +error: implementation of `FnOnce` is not general enough + --> $DIR/issue-57611-trait-alias.rs:17:16 + | +LL | type Bar = impl Baz; + | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough + | + = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`... + = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2` + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.rs b/src/test/ui/type-alias-impl-trait/issue-57700.rs index 19b3d1ce2c76..f1db4d3291b4 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57700.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57700.rs @@ -1,8 +1,6 @@ // ignore-compare-mode-chalk #![feature(arbitrary_self_types)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::ops::Deref; diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.stderr b/src/test/ui/type-alias-impl-trait/issue-57700.stderr new file mode 100644 index 000000000000..c701e3e74ef5 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-57700.stderr @@ -0,0 +1,12 @@ +error: type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias + --> $DIR/issue-57700.rs:16:58 + | +LL | fn foo(self: impl Deref) -> Self::Bar { + | __________________________________________________________^ +LL | | +LL | | self +LL | | } + | |_____^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs b/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs index 9118648fe426..fcab2c7db260 100644 --- a/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs +++ b/src/test/ui/type-alias-impl-trait/issue-57807-associated-type.rs @@ -2,9 +2,7 @@ // that we properly unify associated types within // a type alias impl trait // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Bar { type A; diff --git a/src/test/ui/type-alias-impl-trait/issue-58887.rs b/src/test/ui/type-alias-impl-trait/issue-58887.rs index 0a09bd50a6ea..96ac7860283a 100644 --- a/src/test/ui/type-alias-impl-trait/issue-58887.rs +++ b/src/test/ui/type-alias-impl-trait/issue-58887.rs @@ -1,8 +1,6 @@ // run-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait UnwrapItemsExt { type Iter; diff --git a/src/test/ui/type-alias-impl-trait/issue-58951.rs b/src/test/ui/type-alias-impl-trait/issue-58951.rs index 932684ec089b..7303cbab4a81 100644 --- a/src/test/ui/type-alias-impl-trait/issue-58951.rs +++ b/src/test/ui/type-alias-impl-trait/issue-58951.rs @@ -1,8 +1,6 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type A = impl Iterator; diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.stderr b/src/test/ui/type-alias-impl-trait/issue-60371.stderr index a9df74689df2..9abdd70bbd92 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60371.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60371.stderr @@ -5,7 +5,7 @@ LL | type Item = impl Bug; | ^^^^^^^^ | = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable + = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable error[E0658]: type alias impl trait is not permitted here --> $DIR/issue-60371.rs:13:40 diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr index adb07f5227b4..9b2d21192cd8 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr @@ -1,8 +1,9 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-60407.rs:10:1 +error[E0636]: the feature `type_alias_impl_trait` has already been declared + --> $DIR/issue-60407.rs:3:32 | -LL | fn main() { - | ^^^^^^^^^ +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error +For more information about this error, try `rustc --explain E0636`. diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.rs b/src/test/ui/type-alias-impl-trait/issue-60407.rs index 7319bcf4cd91..b833429c7692 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60407.rs +++ b/src/test/ui/type-alias-impl-trait/issue-60407.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait, rustc_attrs)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait, rustc_attrs)] type Debuggable = impl core::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.stderr b/src/test/ui/type-alias-impl-trait/issue-60407.stderr new file mode 100644 index 000000000000..fecee27797a5 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-60407.stderr @@ -0,0 +1,8 @@ +error: fatal error triggered by #[rustc_error] + --> $DIR/issue-60407.rs:8:1 + | +LL | fn main() { + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-60564.rs b/src/test/ui/type-alias-impl-trait/issue-60564.rs index 7f780a253c95..78def0d1136d 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60564.rs +++ b/src/test/ui/type-alias-impl-trait/issue-60564.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait IterBits { type BitsIter: Iterator; diff --git a/src/test/ui/type-alias-impl-trait/issue-60564.stderr b/src/test/ui/type-alias-impl-trait/issue-60564.stderr new file mode 100644 index 000000000000..66fa862ef9d7 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-60564.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/issue-60564.rs:19:34 + | +LL | fn iter_bits(self, n: u8) -> Self::BitsIter { + | ^^^^^^^^^^^^^^ + | +note: used non-generic type `u8` for generic parameter + --> $DIR/issue-60564.rs:8:25 + | +LL | type IterBitsIter = impl std::iter::Iterator; + | ^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs b/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs index 38370cd008f7..36779a0ce89c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs +++ b/src/test/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs @@ -2,9 +2,7 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait MyTrait { type AssocType: Send; diff --git a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs b/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs index 634ec0f515f3..7414611a7489 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs +++ b/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.rs @@ -4,7 +4,7 @@ // check-pass -#![feature(min_type_alias_impl_trait, type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] pub type Closure = impl FnOnce(); diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr deleted file mode 100644 index a93d2dfcee50..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-63279.min_tait.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-63279.rs:10:11 - | -LL | || -> Closure { || () } - | ^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:10:5: 10:28] as FnOnce<()>>::Output == ()` - --> $DIR/issue-63279.rs:7:16 - | -LL | type Closure = impl FnOnce(); - | ^^^^^^^^^^^^^ expected `()`, found opaque type - | - = note: expected unit type `()` - found opaque type `impl FnOnce<()>` - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0271, E0658. -For more information about an error, try `rustc --explain E0271`. diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.rs b/src/test/ui/type-alias-impl-trait/issue-63279.rs index 4c9c26a343c5..b97192a2aed4 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63279.rs +++ b/src/test/ui/type-alias-impl-trait/issue-63279.rs @@ -1,13 +1,11 @@ // compile-flags: -Zsave-analysis -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Closure = impl FnOnce(); //~ ERROR: type mismatch resolving fn c() -> Closure { - || -> Closure { || () } //[min_tait]~ ERROR: not permitted here + || -> Closure { || () } } fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.stderr new file mode 100644 index 000000000000..63a83a60ff87 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-63279.stderr @@ -0,0 +1,12 @@ +error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:8:5: 8:28] as FnOnce<()>>::Output == ()` + --> $DIR/issue-63279.rs:5:16 + | +LL | type Closure = impl FnOnce(); + | ^^^^^^^^^^^^^ expected `()`, found opaque type + | + = note: expected unit type `()` + found opaque type `impl FnOnce<()>` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/type-alias-impl-trait/issue-63355.rs b/src/test/ui/type-alias-impl-trait/issue-63355.rs index 8762d189c738..ff4fd5dcec73 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63355.rs +++ b/src/test/ui/type-alias-impl-trait/issue-63355.rs @@ -1,4 +1,4 @@ -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)] #![allow(incomplete_features)] @@ -28,7 +28,7 @@ fn foo() -> Self::Foo { } } -// FIXME(#86731): The below is illegal use of `min_type_alias_impl_trait` +// FIXME(#86731): The below is illegal use of `type_alias_impl_trait` // but the compiler doesn't report it, we should fix it. pub type FooImpl = impl Foo; pub type BarImpl = impl Bar; diff --git a/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs b/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs index b477fea41b72..28f4a85c9f29 100644 --- a/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs +++ b/src/test/ui/type-alias-impl-trait/issue-63677-type-alias-coherence.rs @@ -2,9 +2,7 @@ // Regression test for issue #63677 - ensure that // coherence checking can properly handle 'impl trait' // in type aliases -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub trait Trait {} pub struct S1(T); diff --git a/src/test/ui/type-alias-impl-trait/issue-65384.rs b/src/test/ui/type-alias-impl-trait/issue-65384.rs index 63666c497c66..273928c4d663 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65384.rs +++ b/src/test/ui/type-alias-impl-trait/issue-65384.rs @@ -1,4 +1,4 @@ -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] #![feature(type_alias_impl_trait)] #![allow(incomplete_features)] diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr index 6b4ea787ea8d..98d20d6ca0d5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr @@ -1,8 +1,9 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:17:1 +error[E0636]: the feature `type_alias_impl_trait` has already been declared + --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:5:32 | -LL | fn main() { - | ^^^^^^^^^ +LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] + | ^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error +For more information about this error, try `rustc --explain E0636`. diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr deleted file mode 100644 index 6798ecb9489f..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.min_tait.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:19:13 - | -LL | take(|| {}); - | ^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: type alias impl trait is not permitted here - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:21:13 - | -LL | take(|| {}); - | ^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs index f181b3d06a67..0f0cd4e9227b 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs +++ b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs @@ -1,8 +1,6 @@ // compile-flags: -Zsave-analysis -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait, rustc_attrs)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait, rustc_attrs)] type T = impl Sized; // The concrete type referred by impl-trait-type-alias(`T`) is guaranteed @@ -15,9 +13,7 @@ fn take(_: fn() -> T) {} #[rustc_error] fn main() { - //[full_tait]~^ ERROR fatal error triggered by #[rustc_error] + //~^ ERROR fatal error triggered by #[rustc_error] take(|| {}); - //[min_tait]~^ ERROR not permitted here take(|| {}); - //[min_tait]~^ ERROR not permitted here } diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.stderr b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.stderr new file mode 100644 index 000000000000..f3683f2bf960 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.stderr @@ -0,0 +1,8 @@ +error: fatal error triggered by #[rustc_error] + --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:15:1 + | +LL | fn main() { + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-65918.rs b/src/test/ui/type-alias-impl-trait/issue-65918.rs index b15bff57a0d2..af6d50109201 100644 --- a/src/test/ui/type-alias-impl-trait/issue-65918.rs +++ b/src/test/ui/type-alias-impl-trait/issue-65918.rs @@ -2,9 +2,7 @@ // build-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::marker::PhantomData; diff --git a/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs b/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs index 7fdaa7fb99bc..d97270c3124d 100644 --- a/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs +++ b/src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs @@ -2,9 +2,7 @@ // Ensures that we don't try to determine whether a closure // is foreign when it's the underlying type of an opaque type // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Closure = impl FnOnce(); diff --git a/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs b/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs index f47f0cdba88b..cd219328a995 100644 --- a/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs +++ b/src/test/ui/type-alias-impl-trait/issue-67844-nested-opaque.rs @@ -3,9 +3,7 @@ // Ensures that we properly handle nested TAIT occurrences // with generic parameters -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait WithAssoc { type AssocType; diff --git a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs index b31c79b8b2bb..3b6decbe9c65 100644 --- a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs +++ b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.rs @@ -2,9 +2,7 @@ // Ensures that we don't ICE when emitting an error // for a non-defining use when lifetimes are involved -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Trait {} type Alias<'a, U> = impl Trait; fn f<'a>() -> Alias<'a, ()> {} diff --git a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.stderr b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.stderr new file mode 100644 index 000000000000..c2fa54f50f88 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/issue-68368-non-defining-use.rs:8:15 + | +LL | fn f<'a>() -> Alias<'a, ()> {} + | ^^^^^^^^^^^^^ + | +note: used non-generic type `()` for generic parameter + --> $DIR/issue-68368-non-defining-use.rs:7:16 + | +LL | type Alias<'a, U> = impl Trait; + | ^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs index ae89cdd1c087..6732902c09a5 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs +++ b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.rs @@ -1,8 +1,6 @@ // Regression test for #69136 -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait SomeTrait {} diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr new file mode 100644 index 000000000000..fe45e39d938f --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.stderr @@ -0,0 +1,11 @@ +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:17:65 + | +LL | type Return = impl WithAssoc; + | - ^^ undeclared lifetime + | | + | help: consider introducing lifetime `'a` here: `'a,` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0261`. diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs index 05d50f0f1bf5..a6916eda8b09 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs +++ b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-ok.rs @@ -2,9 +2,7 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait SomeTrait {} diff --git a/src/test/ui/type-alias-impl-trait/issue-69323.rs b/src/test/ui/type-alias-impl-trait/issue-69323.rs index 9c4b4433f9fa..a9bd6daf2acf 100644 --- a/src/test/ui/type-alias-impl-trait/issue-69323.rs +++ b/src/test/ui/type-alias-impl-trait/issue-69323.rs @@ -1,8 +1,6 @@ // check-pass -// revisions: min full -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::iter::{once, Chain}; diff --git a/src/test/ui/type-alias-impl-trait/issue-70121.rs b/src/test/ui/type-alias-impl-trait/issue-70121.rs index 1eb33c805bb1..dff0d89d465d 100644 --- a/src/test/ui/type-alias-impl-trait/issue-70121.rs +++ b/src/test/ui/type-alias-impl-trait/issue-70121.rs @@ -1,8 +1,6 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub type Successors<'a> = impl Iterator; diff --git a/src/test/ui/type-alias-impl-trait/issue-74244.rs b/src/test/ui/type-alias-impl-trait/issue-74244.rs index d9845a9b62ce..bb4104b3d251 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74244.rs +++ b/src/test/ui/type-alias-impl-trait/issue-74244.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Allocator { type Buffer; diff --git a/src/test/ui/type-alias-impl-trait/issue-74244.stderr b/src/test/ui/type-alias-impl-trait/issue-74244.stderr new file mode 100644 index 000000000000..ff6bacd277e1 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-74244.stderr @@ -0,0 +1,9 @@ +error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates + --> $DIR/issue-74244.rs:9:6 + | +LL | impl Allocator for DefaultAllocator { + | ^ unconstrained type parameter + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74761-2.rs b/src/test/ui/type-alias-impl-trait/issue-74761-2.rs index 8e7ff45a72df..4345b5d886ee 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761-2.rs +++ b/src/test/ui/type-alias-impl-trait/issue-74761-2.rs @@ -9,8 +9,6 @@ impl<'a, 'b> A for () { //~^ ERROR the lifetime parameter `'a` is not constrained //~| ERROR the lifetime parameter `'b` is not constrained type B = impl core::fmt::Debug; - //~^ ERROR is unstable - fn f(&self) -> Self::B {} } diff --git a/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr b/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr index 505e6436f5bd..7a321458b0bf 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-74761-2.stderr @@ -1,12 +1,3 @@ -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/issue-74761-2.rs:11:14 - | -LL | type B = impl core::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable - error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-74761-2.rs:8:6 | @@ -19,7 +10,6 @@ error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors have detailed explanations: E0207, E0658. -For more information about an error, try `rustc --explain E0207`. +For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74761.rs b/src/test/ui/type-alias-impl-trait/issue-74761.rs index 4f0db7aedc78..d26ca5c3ead3 100644 --- a/src/test/ui/type-alias-impl-trait/issue-74761.rs +++ b/src/test/ui/type-alias-impl-trait/issue-74761.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub trait A { type B; diff --git a/src/test/ui/type-alias-impl-trait/issue-74761.stderr b/src/test/ui/type-alias-impl-trait/issue-74761.stderr new file mode 100644 index 000000000000..1d016fe070f9 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-74761.stderr @@ -0,0 +1,15 @@ +error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates + --> $DIR/issue-74761.rs:7:6 + | +LL | impl<'a, 'b> A for () { + | ^^ unconstrained lifetime parameter + +error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates + --> $DIR/issue-74761.rs:7:10 + | +LL | impl<'a, 'b> A for () { + | ^^ unconstrained lifetime parameter + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs index 527fbd4bb2f4..fb56cc54d634 100644 --- a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs +++ b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.rs @@ -1,9 +1,7 @@ // Regression test for issue #76202 // Tests that we don't ICE when we have a trait impl on a TAIT. -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Dummy {} impl Dummy for () {} diff --git a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.stderr b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.stderr new file mode 100644 index 000000000000..8689ee53660f --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.stderr @@ -0,0 +1,14 @@ +error: cannot implement trait on type alias impl trait + --> $DIR/issue-76202-trait-impl-for-tait.rs:16:1 + | +LL | impl Test for F { + | ^^^^^^^^^^^^^^^ + | +note: type alias impl trait defined here + --> $DIR/issue-76202-trait-impl-for-tait.rs:9:10 + | +LL | type F = impl Dummy; + | ^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/issue-78450.rs b/src/test/ui/type-alias-impl-trait/issue-78450.rs index bcc16a5b2aba..fccbfb74fa2c 100644 --- a/src/test/ui/type-alias-impl-trait/issue-78450.rs +++ b/src/test/ui/type-alias-impl-trait/issue-78450.rs @@ -1,6 +1,5 @@ // check-pass -#![feature(min_type_alias_impl_trait)] #![feature(type_alias_impl_trait)] pub trait AssociatedImpl { diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs index ecad910f7d54..f412b2d0e7db 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-pass.rs @@ -1,5 +1,5 @@ // check-pass -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] type X = impl ToString; diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs index 67351e201599..371dff475d1d 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn.rs @@ -2,7 +2,7 @@ // This test used to cause unsoundness, since one of the two possible // resolutions was chosen at random instead of erroring due to conflicts. -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] type X = impl Into<&'static A>; //~^ ERROR the trait bound `&'static B: From<&A>` is not satisfied diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.rs b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.rs index 11756017ad84..06e1990fd7f4 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.rs +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn2.rs @@ -2,7 +2,7 @@ // This test used to cause unsoundness, since one of the two possible // resolutions was chosen at random instead of erroring due to conflicts. -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] type X = impl ToString; diff --git a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.rs b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.rs index 5f25365666c7..bcd9aeff6b45 100644 --- a/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.rs +++ b/src/test/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn3.rs @@ -2,7 +2,7 @@ // This test used to cause unsoundness, since one of the two possible // resolutions was chosen at random instead of erroring due to conflicts. -#![feature(min_type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] type X = impl ToString; diff --git a/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs b/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs index 3c059fcf7d42..6282264d8fee 100644 --- a/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs +++ b/src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // build-pass (FIXME(62277): could be check-pass?) mod my_mod { use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs index 1672c49c604a..8787c023eb0c 100644 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs +++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr new file mode 100644 index 000000000000..b438f8445164 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.stderr @@ -0,0 +1,24 @@ +error[E0308]: mismatched types + --> $DIR/never_reveal_concrete_type.rs:13:27 + | +LL | type NoReveal = impl std::fmt::Debug; + | -------------------- the found opaque type +... +LL | let _: &'static str = x; + | ------------ ^ expected `&str`, found opaque type + | | + | expected due to this + | + = note: expected reference `&'static str` + found opaque type `impl Debug` + +error[E0605]: non-primitive cast: `impl Debug` as `&'static str` + --> $DIR/never_reveal_concrete_type.rs:14:13 + | +LL | let _ = x as &'static str; + | ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0308, E0605. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs index 520954b50ab5..1197c7bc58ec 100644 --- a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs +++ b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.rs @@ -1,9 +1,7 @@ // Issue 52985: user code provides no use case that allows a type alias `impl Trait` // We now emit a 'could not find defining uses' error -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Foo = impl Copy; //~ could not find defining uses diff --git a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr new file mode 100644 index 000000000000..61025e846921 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.stderr @@ -0,0 +1,8 @@ +error: could not find defining uses + --> $DIR/no_inferrable_concrete_type.rs:6:12 + | +LL | type Foo = impl Copy; + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs index 5ab793c0119f..61153b1e1714 100644 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs +++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr new file mode 100644 index 000000000000..67752acb8c9a --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.stderr @@ -0,0 +1,31 @@ +error[E0308]: mismatched types + --> $DIR/no_revealing_outside_defining_module.rs:15:19 + | +LL | pub type Boo = impl ::std::fmt::Debug; + | ---------------------- the found opaque type +... +LL | let _: &str = bomp(); + | ---- ^^^^^^ expected `&str`, found opaque type + | | + | expected due to this + | + = note: expected reference `&str` + found opaque type `impl Debug` + +error[E0308]: mismatched types + --> $DIR/no_revealing_outside_defining_module.rs:19:5 + | +LL | pub type Boo = impl ::std::fmt::Debug; + | ---------------------- the expected opaque type +... +LL | fn bomp() -> boo::Boo { + | -------- expected `impl Debug` because of return type +LL | "" + | ^^ expected opaque type, found `&str` + | + = note: expected opaque type `impl Debug` + found reference `&'static str` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs b/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs index 57ccb58acc93..f29b980dfd0e 100644 --- a/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs +++ b/src/test/ui/type-alias-impl-trait/not_a_defining_use.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::fmt::Debug; diff --git a/src/test/ui/type-alias-impl-trait/not_a_defining_use.stderr b/src/test/ui/type-alias-impl-trait/not_a_defining_use.stderr new file mode 100644 index 000000000000..2fa236b373a4 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/not_a_defining_use.stderr @@ -0,0 +1,14 @@ +error: non-defining opaque type use in defining scope + --> $DIR/not_a_defining_use.rs:9:27 + | +LL | fn two(t: T) -> Two { + | ^^^^^^^^^^^ + | +note: used non-generic type `u32` for generic parameter + --> $DIR/not_a_defining_use.rs:7:13 + | +LL | type Two = impl Debug; + | ^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/not_well_formed.rs b/src/test/ui/type-alias-impl-trait/not_well_formed.rs index c3e9895524e1..fbb7a4d58e4b 100644 --- a/src/test/ui/type-alias-impl-trait/not_well_formed.rs +++ b/src/test/ui/type-alias-impl-trait/not_well_formed.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/not_well_formed.stderr b/src/test/ui/type-alias-impl-trait/not_well_formed.stderr new file mode 100644 index 000000000000..91c1d031e4e5 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/not_well_formed.stderr @@ -0,0 +1,9 @@ +error[E0220]: associated type `Assoc` not found for `V` + --> $DIR/not_well_formed.rs:9:29 + | +LL | type Foo = impl Trait; + | ^^^^^ associated type `Assoc` not found + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0220`. diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs index 7a067c6f2d75..51a7b6454c35 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs +++ b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.rs @@ -1,7 +1,5 @@ #![feature(const_impl_trait)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Bar = impl Send; diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr new file mode 100644 index 000000000000..7e41b374452a --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.stderr @@ -0,0 +1,8 @@ +error: `impl Send` cannot be used in patterns + --> $DIR/structural-match-no-leak.rs:15:9 + | +LL | LEAK_FREE => (), + | ^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/structural-match.rs b/src/test/ui/type-alias-impl-trait/structural-match.rs index c30cd5f5958e..73558d39ad56 100644 --- a/src/test/ui/type-alias-impl-trait/structural-match.rs +++ b/src/test/ui/type-alias-impl-trait/structural-match.rs @@ -1,7 +1,5 @@ #![feature(const_impl_trait)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Foo = impl Send; diff --git a/src/test/ui/type-alias-impl-trait/structural-match.stderr b/src/test/ui/type-alias-impl-trait/structural-match.stderr new file mode 100644 index 000000000000..b43f2148dea5 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/structural-match.stderr @@ -0,0 +1,8 @@ +error: `impl Send` cannot be used in patterns + --> $DIR/structural-match.rs:16:9 + | +LL | VALUE => (), + | ^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs index 4432807916eb..1a8113848f92 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // Ensures that `const` items can constrain an opaque `impl Trait`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.stderr new file mode 100644 index 000000000000..e2567e87ac67 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.stderr @@ -0,0 +1,21 @@ +error[E0308]: mismatched types + --> $DIR/type-alias-impl-trait-const.rs:10:19 + | +LL | pub type Foo = impl Debug; + | ---------- the expected opaque type +... +LL | const _FOO: Foo = 5; + | ^ expected opaque type, found integer + | + = note: expected opaque type `impl Debug` + found type `{integer}` + +error: could not find defining uses + --> $DIR/type-alias-impl-trait-const.rs:7:16 + | +LL | pub type Foo = impl Debug; + | ^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs index e3debedbde30..07c891f0638c 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs @@ -1,8 +1,6 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // Regression test for issue #61863 diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs index b0f6a5a2db3e..c5e8068e5c8e 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs @@ -1,8 +1,6 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type A = impl Sized; fn f1() -> A { diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs index 5f228ec03f73..86c9d4821438 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-tuple.rs @@ -1,8 +1,6 @@ // check-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] #![allow(dead_code)] pub trait MyTrait {} diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs index 63bbbaa707c9..efbf4f1e351f 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs @@ -1,8 +1,6 @@ // regression test for #74018 -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] trait Trait { type Associated; diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr new file mode 100644 index 000000000000..8cdce2f8e81c --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr @@ -0,0 +1,9 @@ +error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates + --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:10:6 + | +LL | impl<'a, I: Iterator> Trait for (i32, I) { + | ^^ unconstrained lifetime parameter + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs index 2b3694d50100..c009952eab75 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Foo = impl Fn() -> Foo; //~^ ERROR: could not find defining uses diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr new file mode 100644 index 000000000000..726f4ea6e00f --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.stderr @@ -0,0 +1,8 @@ +error: could not find defining uses + --> $DIR/type-alias-impl-trait-with-cycle-error.rs:3:12 + | +LL | type Foo = impl Fn() -> Foo; + | ^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs index 2d7e21397072..f3898bca64b9 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] pub trait Bar { type Item; diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr new file mode 100644 index 000000000000..3947cc4d2705 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.stderr @@ -0,0 +1,8 @@ +error: could not find defining uses + --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:7:12 + | +LL | type Foo = impl Bar; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs index 469f3875a8d4..8ca279eec921 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] type Foo = impl 'static; //~^ ERROR: at least one trait must be specified diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.stderr new file mode 100644 index 000000000000..3f7acd338301 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.stderr @@ -0,0 +1,14 @@ +error: at least one trait must be specified + --> $DIR/type-alias-impl-trait-with-no-traits.rs:3:12 + | +LL | type Foo = impl 'static; + | ^^^^^^^^^^^^ + +error: at least one trait must be specified + --> $DIR/type-alias-impl-trait-with-no-traits.rs:10:13 + | +LL | fn bar() -> impl 'static { + | ^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs index 934acb0d9afa..80192d19af98 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait.rs @@ -3,9 +3,7 @@ #![allow(dead_code)] #![allow(unused_assignments)] #![allow(unused_variables)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() { assert_eq!(foo().to_string(), "foo"); diff --git a/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs b/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs index 8bdac325cd70..fd954801dc04 100644 --- a/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs +++ b/src/test/ui/type-alias-impl-trait/type-alias-nested-impl-trait.rs @@ -1,8 +1,6 @@ // run-pass -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] use std::iter::{once, Chain}; diff --git a/src/test/ui/type-alias-impl-trait/unused_generic_param.rs b/src/test/ui/type-alias-impl-trait/unused_generic_param.rs index 8c946238362c..04a5c58cd36e 100644 --- a/src/test/ui/type-alias-impl-trait/unused_generic_param.rs +++ b/src/test/ui/type-alias-impl-trait/unused_generic_param.rs @@ -1,6 +1,4 @@ -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/type-alias-impl-trait/unused_generic_param.stderr b/src/test/ui/type-alias-impl-trait/unused_generic_param.stderr new file mode 100644 index 000000000000..4e11854b0718 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/unused_generic_param.stderr @@ -0,0 +1,14 @@ +error: at least one trait must be specified + --> $DIR/unused_generic_param.rs:5:28 + | +LL | type PartiallyDefined = impl 'static; + | ^^^^^^^^^^^^ + +error: at least one trait must be specified + --> $DIR/unused_generic_param.rs:12:29 + | +LL | type PartiallyDefined2 = impl 'static; + | ^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.rs b/src/test/ui/typeck/typeck_type_placeholder_item.rs index 3d30ab32bace..a3b75543510a 100644 --- a/src/test/ui/typeck/typeck_type_placeholder_item.rs +++ b/src/test/ui/typeck/typeck_type_placeholder_item.rs @@ -1,8 +1,6 @@ // Needed for `type Y = impl Trait<_>` and `type B = _;` #![feature(associated_type_defaults)] -// revisions: min_tait full_tait -#![feature(min_type_alias_impl_trait)] -#![cfg_attr(full_tait, feature(type_alias_impl_trait))] +#![feature(type_alias_impl_trait)] // This test checks that it is not possible to enable global type // inference by using the `_` type placeholder. diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.stderr new file mode 100644 index 000000000000..4827439bfbfe --- /dev/null +++ b/src/test/ui/typeck/typeck_type_placeholder_item.stderr @@ -0,0 +1,638 @@ +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:154:18 + | +LL | struct BadStruct<_>(_); + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:157:16 + | +LL | trait BadTrait<_> {} + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:167:19 + | +LL | struct BadStruct1<_, _>(_); + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:167:22 + | +LL | struct BadStruct1<_, _>(_); + | ^ expected identifier, found reserved identifier + +error: expected identifier, found reserved identifier `_` + --> $DIR/typeck_type_placeholder_item.rs:172:19 + | +LL | struct BadStruct2<_, T>(_, T); + | ^ expected identifier, found reserved identifier + +error: associated constant in `impl` without body + --> $DIR/typeck_type_placeholder_item.rs:205:5 + | +LL | const C: _; + | ^^^^^^^^^^- + | | + | help: provide a definition for the constant: `= ;` + +error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters + --> $DIR/typeck_type_placeholder_item.rs:167:22 + | +LL | struct BadStruct1<_, _>(_); + | - ^ already used + | | + | first use of `_` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:7:14 + | +LL | fn test() -> _ { 5 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:10:16 + | +LL | fn test2() -> (_, _) { (5, 5) } + | -^--^- + | || | + | || not allowed in type signatures + | |not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:13:15 + | +LL | static TEST3: _ = "test"; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `&str` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:16:15 + | +LL | static TEST4: _ = 145; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:19:15 + | +LL | static TEST5: (_, _) = (1, 2); + | ^^^^^^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:22:13 + | +LL | fn test6(_: _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test6(_: T) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:25:18 + | +LL | fn test6_b(_: _, _: T) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test6_b(_: U, _: T) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:28:30 + | +LL | fn test6_c(_: _, _: (T, K, L, A, B)) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test6_c(_: U, _: (T, K, L, A, B)) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:31:13 + | +LL | fn test7(x: _) { let _x: usize = x; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test7(x: T) { let _x: usize = x; } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:34:22 + | +LL | fn test8(_f: fn() -> _) { } + | ^ + | | + | not allowed in type signatures + | help: use type parameters instead: `T` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:34:22 + | +LL | fn test8(_f: fn() -> _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test8(_f: fn() -> T) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:48:26 + | +LL | fn test11(x: &usize) -> &_ { + | -^ + | || + | |not allowed in type signatures + | help: replace with the correct return type: `&'static &'static usize` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:53:52 + | +LL | unsafe fn test12(x: *const usize) -> *const *const _ { + | --------------^ + | | | + | | not allowed in type signatures + | help: replace with the correct return type: `*const *const usize` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:67:8 + | +LL | a: _, + | ^ not allowed in type signatures +LL | +LL | b: (_, _), + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | struct Test10 { +LL | a: T, +LL | +LL | b: (T, T), + | + +error: missing type for `static` item + --> $DIR/typeck_type_placeholder_item.rs:73:12 + | +LL | static A = 42; + | ^ help: provide a type for the static variable: `A: i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:75:15 + | +LL | static B: _ = 42; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:77:15 + | +LL | static C: Option<_> = Some(42); + | ^^^^^^^^^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:79:21 + | +LL | fn fn_test() -> _ { 5 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:82:23 + | +LL | fn fn_test2() -> (_, _) { (5, 5) } + | -^--^- + | || | + | || not allowed in type signatures + | |not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:85:22 + | +LL | static FN_TEST3: _ = "test"; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `&str` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:88:22 + | +LL | static FN_TEST4: _ = 145; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables + --> $DIR/typeck_type_placeholder_item.rs:91:22 + | +LL | static FN_TEST5: (_, _) = (1, 2); + | ^^^^^^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:94:20 + | +LL | fn fn_test6(_: _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test6(_: T) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:97:20 + | +LL | fn fn_test7(x: _) { let _x: usize = x; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test7(x: T) { let _x: usize = x; } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:100:29 + | +LL | fn fn_test8(_f: fn() -> _) { } + | ^ + | | + | not allowed in type signatures + | help: use type parameters instead: `T` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:100:29 + | +LL | fn fn_test8(_f: fn() -> _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test8(_f: fn() -> T) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:123:12 + | +LL | a: _, + | ^ not allowed in type signatures +LL | +LL | b: (_, _), + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | struct FnTest10 { +LL | a: T, +LL | +LL | b: (T, T), + | + +error[E0282]: type annotations needed + --> $DIR/typeck_type_placeholder_item.rs:128:18 + | +LL | fn fn_test11(_: _) -> (_, _) { panic!() } + | ^ cannot infer type + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:128:28 + | +LL | fn fn_test11(_: _) -> (_, _) { panic!() } + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:132:30 + | +LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } + | -^--^- + | || | + | || not allowed in type signatures + | |not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:135:33 + | +LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } + | ------^- + | | | + | | not allowed in type signatures + | help: replace with the correct return type: `(i32, i32)` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:154:21 + | +LL | struct BadStruct<_>(_); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | struct BadStruct(T); + | ^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations + --> $DIR/typeck_type_placeholder_item.rs:159:15 + | +LL | impl BadTrait<_> for BadStruct<_> {} + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | impl BadTrait for BadStruct {} + | ^^^ ^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types + --> $DIR/typeck_type_placeholder_item.rs:162:34 + | +LL | fn impl_trait() -> impl BadTrait<_> { + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:167:25 + | +LL | struct BadStruct1<_, _>(_); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | struct BadStruct1(T); + | ^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs + --> $DIR/typeck_type_placeholder_item.rs:172:25 + | +LL | struct BadStruct2<_, T>(_, T); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | struct BadStruct2(U, T); + | ^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases + --> $DIR/typeck_type_placeholder_item.rs:176:14 + | +LL | type X = Box<_>; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types + --> $DIR/typeck_type_placeholder_item.rs:182:21 + | +LL | type Y = impl Trait<_>; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:216:31 + | +LL | fn value() -> Option<&'static _> { + | ----------------^- + | | | + | | not allowed in type signatures + | help: replace with the correct return type: `Option<&'static u8>` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:221:10 + | +LL | const _: Option<_> = map(value); + | ^^^^^^^^^ + | | + | not allowed in type signatures + | help: replace with the correct type: `Option` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:140:31 + | +LL | fn method_test1(&self, x: _); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn method_test1(&self, x: T); + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:142:31 + | +LL | fn method_test2(&self, x: _) -> _; + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | fn method_test2(&self, x: T) -> T; + | ^^^ ^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:144:31 + | +LL | fn method_test3(&self) -> _; + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn method_test3(&self) -> T; + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:146:26 + | +LL | fn assoc_fn_test1(x: _); + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn assoc_fn_test1(x: T); + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:148:26 + | +LL | fn assoc_fn_test2(x: _) -> _; + | ^ ^ not allowed in type signatures + | | + | not allowed in type signatures + | +help: use type parameters instead + | +LL | fn assoc_fn_test2(x: T) -> T; + | ^^^ ^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:150:28 + | +LL | fn assoc_fn_test3() -> _; + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn assoc_fn_test3() -> T; + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:190:14 + | +LL | type B = _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:192:14 + | +LL | const C: _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:194:14 + | +LL | const D: _ = 42; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:197:26 + | +LL | type F: std::ops::Fn(_); + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:41:24 + | +LL | fn test9(&self) -> _ { () } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `()` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:44:27 + | +LL | fn test10(&self, _x : _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn test10(&self, _x : T) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:59:24 + | +LL | fn clone(&self) -> _ { Test9 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `Test9` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:62:37 + | +LL | fn clone_from(&mut self, other: _) { *self = Test9; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn clone_from(&mut self, other: T) { *self = Test9; } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:107:31 + | +LL | fn fn_test9(&self) -> _ { () } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `()` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:110:34 + | +LL | fn fn_test10(&self, _x : _) { } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn fn_test10(&self, _x : T) { } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types + --> $DIR/typeck_type_placeholder_item.rs:115:28 + | +LL | fn clone(&self) -> _ { FnTest9 } + | ^ + | | + | not allowed in type signatures + | help: replace with the correct return type: `FnTest9` + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions + --> $DIR/typeck_type_placeholder_item.rs:118:41 + | +LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } + | ^ not allowed in type signatures + | +help: use type parameters instead + | +LL | fn clone_from(&mut self, other: T) { *self = FnTest9; } + | ^^^ ^ + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:201:14 + | +LL | type A = _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types + --> $DIR/typeck_type_placeholder_item.rs:203:14 + | +LL | type B = _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:205:14 + | +LL | const C: _; + | ^ not allowed in type signatures + +error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants + --> $DIR/typeck_type_placeholder_item.rs:208:14 + | +LL | const D: _ = 42; + | ^ + | | + | not allowed in type signatures + | help: replace with the correct type: `i32` + +error: aborting due to 69 previous errors + +Some errors have detailed explanations: E0121, E0282, E0403. +For more information about an error, try `rustc --explain E0121`. From 66dbeb5f237aa867a99a41656fad39b646f7651f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 26 Jul 2021 20:32:55 -0300 Subject: [PATCH 15/22] existential_type was removed in favor of type_alias_impl_trait --- compiler/rustc_feature/src/removed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 29f4423ec85a..1e053a56ff48 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -111,7 +111,7 @@ macro_rules! declare_features { Some("subsumed by `.await` syntax")), /// Allows defining `existential type`s. (removed, existential_type, "1.38.0", Some(63063), None, - Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")), + Some("removed in favor of `#![feature(type_alias_impl_trait)]`")), /// Allows using the macros: /// + `__diagnostic_used` /// + `__register_diagnostic` From 9629d798ca289934c0c0b622124c642aaf53e018 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 26 Jul 2021 20:38:38 -0300 Subject: [PATCH 16/22] Remove min_type_alias_impl_trait feature --- compiler/rustc_feature/src/active.rs | 3 - compiler/rustc_feature/src/removed.rs | 4 + .../feature-gate-min_type_alias_impl_trait.rs | 50 -------- ...ture-gate-min_type_alias_impl_trait.stderr | 118 ------------------ 4 files changed, 4 insertions(+), 171 deletions(-) delete mode 100644 src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 27c08586f4fc..ac4ecace042c 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -629,9 +629,6 @@ pub fn set(&self, features: &mut Features, span: Span) { /// Allows macro attributes to observe output of `#[derive]`. (active, macro_attributes_in_derive_output, "1.51.0", Some(81119), None), - /// Allows the use of type alias impl trait in function return positions - (active, min_type_alias_impl_trait, "1.52.0", Some(63063), None), - /// Allows associated types in inherent impls. (incomplete, inherent_associated_types, "1.52.0", Some(8995), None), diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index 1e053a56ff48..0aa7e82c2049 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -152,6 +152,10 @@ macro_rules! declare_features { (removed, impl_trait_in_bindings, "1.55.0", Some(63065), None, Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")), + /// Allows the use of type alias impl trait in function return positions + (removed, min_type_alias_impl_trait, "1.55.0", Some(63063), None, + Some("removed in favor of full type_alias_impl_trait")), + // ------------------------------------------------------------------------- // feature-group-end: removed features // ------------------------------------------------------------------------- diff --git a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs b/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs deleted file mode 100644 index ffe297a5a6a2..000000000000 --- a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs +++ /dev/null @@ -1,50 +0,0 @@ -// ignore-compare-mode-chalk -use std::fmt::Debug; - -type Foo = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable - -trait Bar { - type Baa: Debug; - fn define() -> Self::Baa; -} - -impl Bar for () { - type Baa = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable - fn define() -> Self::Baa { - 0 - } -} - -fn define() -> Foo { - 0 -} - -trait TraitWithDefault { - type Assoc = impl Debug; - //~^ ERROR associated type defaults are unstable - //~| ERROR `impl Trait` not allowed outside of function - //~| ERROR `impl Trait` in type aliases is unstable -} - -type NestedFree = (Vec, impl Debug, impl Iterator); -//~^ ERROR `impl Trait` in type aliases is unstable -//~| ERROR `impl Trait` in type aliases is unstable -//~| ERROR `impl Trait` in type aliases is unstable -//~| ERROR `impl Trait` in type aliases is unstable - -fn define_multiple() -> NestedFree { - (vec![true], 0u8, 0i32..1) -} - -impl Bar for u8 { - type Baa = (Vec, impl Debug, impl Iterator + Debug); - //~^ ERROR `impl Trait` in type aliases is unstable - //~| ERROR `impl Trait` in type aliases is unstable - //~| ERROR `impl Trait` in type aliases is unstable - //~| ERROR `impl Trait` in type aliases is unstable - fn define() -> Self::Baa { - (vec![true], 0u8, 0i32..1) - } -} - -fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr b/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr deleted file mode 100644 index c87f1f4f00de..000000000000 --- a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr +++ /dev/null @@ -1,118 +0,0 @@ -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:4:12 - | -LL | type Foo = impl Debug; - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:12:16 - | -LL | type Baa = impl Debug; - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: associated type defaults are unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:5 - | -LL | type Assoc = impl Debug; - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #29661 for more information - = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18 - | -LL | type Assoc = impl Debug; - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:24 - | -LL | type NestedFree = (Vec, impl Debug, impl Iterator); - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:37 - | -LL | type NestedFree = (Vec, impl Debug, impl Iterator); - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:49 - | -LL | type NestedFree = (Vec, impl Debug, impl Iterator); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:70 - | -LL | type NestedFree = (Vec, impl Debug, impl Iterator); - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:21 - | -LL | type Baa = (Vec, impl Debug, impl Iterator + Debug); - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:34 - | -LL | type Baa = (Vec, impl Debug, impl Iterator + Debug); - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:46 - | -LL | type Baa = (Vec, impl Debug, impl Iterator + Debug); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:67 - | -LL | type Baa = (Vec, impl Debug, impl Iterator + Debug); - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error[E0562]: `impl Trait` not allowed outside of function and method return types - --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18 - | -LL | type Assoc = impl Debug; - | ^^^^^^^^^^ - -error: aborting due to 13 previous errors - -Some errors have detailed explanations: E0562, E0658. -For more information about an error, try `rustc --explain E0562`. From df5e5168d862e5d5d013f53f9c569c7b5514dd8c Mon Sep 17 00:00:00 2001 From: ibraheemdev Date: Tue, 27 Jul 2021 12:12:59 -0400 Subject: [PATCH 17/22] remove allow(unconditional_recursion) --- src/test/ui/nll/issue-51191.rs | 4 ++-- src/test/ui/nll/issue-51191.stderr | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/test/ui/nll/issue-51191.rs b/src/test/ui/nll/issue-51191.rs index 638b9b0b63af..836587d93b84 100644 --- a/src/test/ui/nll/issue-51191.rs +++ b/src/test/ui/nll/issue-51191.rs @@ -1,9 +1,9 @@ -#![allow(unconditional_recursion)] - struct Struct; impl Struct { fn bar(self: &mut Self) { + //~^ WARN function cannot return without recursing + //~^^ HELP a `loop` may express intention better if this is on purpose (&mut self).bar(); //~^ ERROR cannot borrow `self` as mutable, as it is not declared as mutable [E0596] //~^^ HELP try removing `&mut` here diff --git a/src/test/ui/nll/issue-51191.stderr b/src/test/ui/nll/issue-51191.stderr index f2cc78f4b9ef..450993425e26 100644 --- a/src/test/ui/nll/issue-51191.stderr +++ b/src/test/ui/nll/issue-51191.stderr @@ -1,3 +1,15 @@ +warning: function cannot return without recursing + --> $DIR/issue-51191.rs:4:5 + | +LL | fn bar(self: &mut Self) { + | ^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing +... +LL | (&mut self).bar(); + | ----------------- recursive call site + | + = note: `#[warn(unconditional_recursion)]` on by default + = help: a `loop` may express intention better if this is on purpose + error[E0596]: cannot borrow `self` as mutable, as it is not declared as mutable --> $DIR/issue-51191.rs:7:9 | @@ -36,6 +48,6 @@ LL | (&mut self).bar(); | cannot borrow as mutable | help: try removing `&mut` here -error: aborting due to 5 previous errors +error: aborting due to 5 previous errors; 1 warning emitted For more information about this error, try `rustc --explain E0596`. From 47414aa1bd0e4dc3bd8ef06dcea6b85e510d0912 Mon Sep 17 00:00:00 2001 From: frogtd <31412003+frogtd@users.noreply.github.com> Date: Tue, 27 Jul 2021 16:14:48 -0400 Subject: [PATCH 18/22] Update range.rs Stop creating a reference then immediately dereferencing it. --- library/core/src/ops/range.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/ops/range.rs b/library/core/src/ops/range.rs index 9bf0382312e9..347a346359f8 100644 --- a/library/core/src/ops/range.rs +++ b/library/core/src/ops/range.rs @@ -812,12 +812,12 @@ fn contains(&self, item: &U) -> bool U: ?Sized + PartialOrd, { (match self.start_bound() { - Included(ref start) => *start <= item, - Excluded(ref start) => *start < item, + Included(start) => start <= item, + Excluded(start) => start < item, Unbounded => true, }) && (match self.end_bound() { - Included(ref end) => item <= *end, - Excluded(ref end) => item < *end, + Included(end) => item <= end, + Excluded(end) => item < end, Unbounded => true, }) } From 0e017496eb588ac9cfe3e892fc7083996f5f3397 Mon Sep 17 00:00:00 2001 From: Smitty Date: Tue, 27 Jul 2021 16:37:18 -0400 Subject: [PATCH 19/22] remove unneeded stringify --- library/core/src/num/int_macros.rs | 4 ++-- library/core/src/num/uint_macros.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 8bf2d9a6d14b..e54aaae86bf2 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -4,7 +4,7 @@ macro_rules! int_impl { $reversed:expr, $le_bytes:expr, $be_bytes:expr, $to_xe_bytes_doc:expr, $from_xe_bytes_doc:expr) => { /// The smallest value that can be represented by this integer type, - #[doc = concat!("-2", stringify!($BITS_MINUS_ONE), ".")] + #[doc = concat!("-2", $BITS_MINUS_ONE, ".")] /// /// # Examples /// @@ -17,7 +17,7 @@ macro_rules! int_impl { pub const MIN: Self = !0 ^ ((!0 as $UnsignedT) >> 1) as Self; /// The largest value that can be represented by this integer type, - #[doc = concat!("2", stringify!($BITS_MINUS_ONE), " - 1.")] + #[doc = concat!("2", $BITS_MINUS_ONE, " - 1.")] /// /// # Examples /// diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 0d04d1b3b422..864507122706 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -16,7 +16,7 @@ macro_rules! uint_impl { pub const MIN: Self = 0; /// The largest value that can be represented by this integer type, - #[doc = concat!("2", stringify!($BITS), " - 1.")] + #[doc = concat!("2", $BITS, " - 1.")] /// /// # Examples /// From d395fe8653b84f7981e7b4a281b6f58e2f57b711 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 27 Jul 2021 19:48:54 -0300 Subject: [PATCH 20/22] Bless nll tests --- ..._type_does_not_live_long_enough.nll.stderr | 41 +++++++++++++++++++ .../issue-57611-trait-alias.nll.stderr | 38 +++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr create mode 100644 src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.nll.stderr diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr new file mode 100644 index 000000000000..84f48cd6c0d2 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.nll.stderr @@ -0,0 +1,41 @@ +error: at least one trait must be specified + --> $DIR/generic_type_does_not_live_long_enough.rs:9:24 + | +LL | type WrongGeneric = impl 'static; + | ^^^^^^^^^^^^ + +error[E0308]: mismatched types + --> $DIR/generic_type_does_not_live_long_enough.rs:6:18 + | +LL | let z: i32 = x; + | --- ^ expected `i32`, found opaque type + | | + | expected due to this +... +LL | type WrongGeneric = impl 'static; + | ------------ the found opaque type + | + = note: expected type `i32` + found opaque type `impl Sized` + +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/generic_type_does_not_live_long_enough.rs:13:30 + | +LL | fn wrong_generic(t: T) -> WrongGeneric { + | ^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + +error[E0310]: the parameter type `T` may not live long enough + --> $DIR/generic_type_does_not_live_long_enough.rs:9:24 + | +LL | type WrongGeneric = impl 'static; + | ^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `T: 'static`... + = note: ...so that the type `T` will meet its required lifetime bounds + +error: aborting due to 4 previous errors + +Some errors have detailed explanations: E0308, E0310. +For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.nll.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.nll.stderr new file mode 100644 index 000000000000..a4ccae4eb7ed --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.nll.stderr @@ -0,0 +1,38 @@ +error: higher-ranked subtype error + --> $DIR/issue-57611-trait-alias.rs:21:9 + | +LL | |x| x + | ^^^^^ + +error: higher-ranked subtype error + --> $DIR/issue-57611-trait-alias.rs:21:9 + | +LL | |x| x + | ^^^^^ + +error[E0308]: mismatched types + --> $DIR/issue-57611-trait-alias.rs:17:16 + | +LL | type Bar = impl Baz; + | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other + | + = note: expected type `for<'r> Fn<(&'r X,)>` + found type `Fn<(&'static X,)>` +note: this closure does not fulfill the lifetime requirements + --> $DIR/issue-57611-trait-alias.rs:21:9 + | +LL | |x| x + | ^^^^^ + +error: implementation of `FnOnce` is not general enough + --> $DIR/issue-57611-trait-alias.rs:17:16 + | +LL | type Bar = impl Baz; + | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough + | + = note: closure with signature `fn(&'static X) -> &'static X` must implement `FnOnce<(&'0 X,)>`, for any lifetime `'0`... + = note: ...but it actually implements `FnOnce<(&'static X,)>` + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. From f16ae7ee2673215c0b2f4b363b074f11fdd185f9 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 27 Jul 2021 19:50:14 -0300 Subject: [PATCH 21/22] Remove min_tait and full_tait stderr dangling files --- .../duplicate.full_tait.stderr | 483 ------------- .../duplicate.min_tait.stderr | 483 ------------- .../generator/layout-error.full_tait.stderr | 9 - .../ui/generator/layout-error.min_tait.stderr | 19 - ...ata-sufficient-for-layout.full_tait.stderr | 8 - ...data-sufficient-for-layout.min_tait.stderr | 8 - .../ui/impl-trait/auto-trait.full_tait.stderr | 12 - .../ui/impl-trait/auto-trait.min_tait.stderr | 12 - .../impl-trait/issue-55872-1.full_tait.stderr | 48 -- .../impl-trait/issue-55872-1.min_tait.stderr | 48 -- .../impl-trait/issue-55872-2.full_tait.stderr | 19 - .../impl-trait/issue-55872-2.min_tait.stderr | 19 - .../impl-trait/issue-55872.full_tait.stderr | 12 - .../ui/impl-trait/issue-55872.min_tait.stderr | 12 - .../issues/issue-70877.full_tait.stderr | 15 - .../issues/issue-70877.min_tait.stderr | 15 - .../issues/issue-78722.full_tait.stderr | 23 - .../issues/issue-78722.min_tait.stderr | 23 - .../error-handling-2.full_tait.stderr | 15 - .../error-handling-2.min_tait.stderr | 15 - .../error-handling.full_tait.stderr | 15 - .../error-handling.min_tait.stderr | 15 - .../negative-reasoning.full_tait.stderr | 14 - .../negative-reasoning.min_tait.stderr | 14 - .../ui/issues/issue-60662.full_tait.stdout | 16 - .../ui/issues/issue-60662.min_tait.stdout | 15 - ...e-trait-and-foreign-items.full_tait.stderr | 72 -- ...ne-trait-and-foreign-items.min_tait.stderr | 72 -- .../lint/lint-ctypes-73249-2.full_tait.stderr | 15 - .../lint/lint-ctypes-73249-2.min_tait.stderr | 15 - .../lint/lint-ctypes-73249-3.full_tait.stderr | 15 - .../lint/lint-ctypes-73249-3.min_tait.stderr | 15 - .../lint/lint-ctypes-73249-5.full_tait.stderr | 15 - .../lint/lint-ctypes-73249-5.min_tait.stderr | 15 - .../lint/lint-ctypes-73251-1.full_tait.stderr | 15 - .../lint/lint-ctypes-73251-1.min_tait.stderr | 15 - .../lint/lint-ctypes-73251-2.full_tait.stderr | 15 - .../lint/lint-ctypes-73251-2.min_tait.stderr | 15 - .../opaque-ty-ffi-unsafe.full_tait.stderr | 15 - .../lint/opaque-ty-ffi-unsafe.min_tait.stderr | 15 - src/test/ui/mir/issue-75053.full_tait.stderr | 8 - src/test/ui/mir/issue-75053.min_tait.stderr | 8 - ...rivate-in-public-assoc-ty.full_tait.stderr | 68 -- ...private-in-public-assoc-ty.min_tait.stderr | 68 -- .../issue-68621.full_tait.stderr | 8 - .../save-analysis/issue-68621.min_tait.stderr | 8 - .../assoc-type-const.full_tait.stderr | 11 - .../assoc-type-const.min_tait.stderr | 11 - ...pe-lifetime-unconstrained.full_tait.stderr | 9 - ...ype-lifetime-unconstrained.min_tait.stderr | 9 - .../bound_reduction2.full_tait.stderr | 14 - .../bound_reduction2.min_tait.stderr | 14 - .../bounds-are-checked-2.full_tait.stderr | 14 - .../bounds-are-checked-2.min_tait.stderr | 14 - .../bounds-are-checked.full_tait.stderr | 26 - .../bounds-are-checked.min_tait.stderr | 26 - .../coherence.full_tait.stderr | 9 - .../coherence.min_tait.stderr | 9 - ...eclared_but_never_defined.full_tait.stderr | 8 - ...declared_but_never_defined.min_tait.stderr | 8 - ..._but_not_defined_in_scope.full_tait.stderr | 23 - ...d_but_not_defined_in_scope.min_tait.stderr | 23 - .../different_defining_uses.full_tait.stderr | 14 - .../different_defining_uses.min_tait.stderr | 14 - ..._defining_uses_never_type.full_tait.stderr | 26 - ...t_defining_uses_never_type.min_tait.stderr | 26 - ...c_different_defining_uses.full_tait.stderr | 14 - ...ic_different_defining_uses.min_tait.stderr | 14 - ..._duplicate_lifetime_param.full_tait.stderr | 14 - ...c_duplicate_lifetime_param.min_tait.stderr | 14 - ...neric_duplicate_param_use.full_tait.stderr | 38 -- ...eneric_duplicate_param_use.min_tait.stderr | 38 -- ...eric_duplicate_param_use2.full_tait.stderr | 14 - ...neric_duplicate_param_use2.min_tait.stderr | 14 - ...eric_duplicate_param_use3.full_tait.stderr | 14 - ...neric_duplicate_param_use3.min_tait.stderr | 14 - ...eric_duplicate_param_use4.full_tait.stderr | 14 - ...neric_duplicate_param_use4.min_tait.stderr | 14 - ...eric_duplicate_param_use5.full_tait.stderr | 39 -- ...neric_duplicate_param_use5.min_tait.stderr | 39 -- ...eric_duplicate_param_use6.full_tait.stderr | 27 - ...neric_duplicate_param_use6.min_tait.stderr | 27 - ...eric_duplicate_param_use8.full_tait.stderr | 27 - ...neric_duplicate_param_use8.min_tait.stderr | 27 - ...eric_duplicate_param_use9.full_tait.stderr | 51 -- ...neric_duplicate_param_use9.min_tait.stderr | 51 -- .../generic_nondefining_use.full_tait.stderr | 35 - .../generic_nondefining_use.min_tait.stderr | 35 - .../generic_not_used.full_tait.stderr | 18 - .../generic_not_used.min_tait.stderr | 18 - ..._not_live_long_enough.full_tait.nll.stderr | 50 -- ...does_not_live_long_enough.full_tait.stderr | 33 - ...s_not_live_long_enough.min_tait.nll.stderr | 41 -- ..._does_not_live_long_enough.min_tait.stderr | 33 - .../generic_underconstrained.full_tait.stderr | 23 - .../generic_underconstrained.min_tait.stderr | 23 - ...generic_underconstrained2.full_tait.stderr | 43 -- .../generic_underconstrained2.min_tait.stderr | 43 -- ...-with-unconstrained-param.full_tait.stderr | 9 - ...l-with-unconstrained-param.min_tait.stderr | 9 - ...ncoherent-assoc-imp-trait.full_tait.stderr | 23 - ...incoherent-assoc-imp-trait.min_tait.stderr | 23 - ...e-52843-closure-constrain.full_tait.stderr | 14 - .../issue-52843.full_tait.stderr | 14 - .../issue-52843.min_tait.stderr | 14 - .../issue-53096.full_tait.stderr | 9 - .../issue-53096.min_tait.stderr | 8 - .../issue-53598.full_tait.stderr | 12 - .../issue-53598.min_tait.stderr | 12 - ...78-generator-and-const-fn.full_tait.stderr | 8 - ...678-generator-and-const-fn.min_tait.stderr | 8 - ...sue-57611-trait-alias.full_tait.nll.stderr | 47 -- .../issue-57611-trait-alias.full_tait.stderr | 11 - ...ssue-57611-trait-alias.min_tait.nll.stderr | 38 -- .../issue-57611-trait-alias.min_tait.stderr | 11 - .../issue-57700.full_tait.stderr | 12 - .../issue-57700.min_tait.stderr | 12 - .../issue-60407.full_tait.stderr | 9 - .../issue-60407.min_tait.stderr | 8 - .../issue-60564.full_tait.stderr | 14 - .../issue-60564.min_tait.stderr | 14 - ...ssue-63263-closure-return.full_tait.stderr | 11 - .../issue-63279.full_tait.stderr | 12 - ...-opaque-ty-from-val-twice.full_tait.stderr | 9 - ...ue-68368-non-defining-use.full_tait.stderr | 14 - ...sue-68368-non-defining-use.min_tait.stderr | 14 - ...er-lifetime-resolve-error.full_tait.stderr | 11 - ...ner-lifetime-resolve-error.min_tait.stderr | 11 - .../issue-74244.full_tait.stderr | 9 - .../issue-74244.min_tait.stderr | 9 - .../issue-74761.full_tait.stderr | 15 - .../issue-74761.min_tait.stderr | 15 - ...76202-trait-impl-for-tait.full_tait.stderr | 14 - ...-76202-trait-impl-for-tait.min_tait.stderr | 14 - ...ever_reveal_concrete_type.full_tait.stderr | 24 - ...never_reveal_concrete_type.min_tait.stderr | 24 - ..._inferrable_concrete_type.full_tait.stderr | 8 - ...o_inferrable_concrete_type.min_tait.stderr | 8 - ...g_outside_defining_module.full_tait.stderr | 31 - ...ng_outside_defining_module.min_tait.stderr | 31 - .../not_a_defining_use.full_tait.stderr | 14 - .../not_a_defining_use.min_tait.stderr | 14 - .../not_well_formed.full_tait.stderr | 9 - .../not_well_formed.min_tait.stderr | 9 - .../structural-match-no-leak.full_tait.stderr | 8 - .../structural-match-no-leak.min_tait.stderr | 8 - .../structural-match.full_tait.stderr | 8 - .../structural-match.min_tait.stderr | 8 - ...pe-alias-impl-trait-const.full_tait.stderr | 21 - ...ype-alias-impl-trait-const.min_tait.stderr | 21 - ...it-unconstrained-lifetime.full_tait.stderr | 9 - ...ait-unconstrained-lifetime.min_tait.stderr | 9 - ...pl-trait-with-cycle-error.full_tait.stderr | 8 - ...mpl-trait-with-cycle-error.min_tait.stderr | 8 - ...l-trait-with-cycle-error2.full_tait.stderr | 8 - ...pl-trait-with-cycle-error2.min_tait.stderr | 8 - ...impl-trait-with-no-traits.full_tait.stderr | 14 - ...-impl-trait-with-no-traits.min_tait.stderr | 14 - .../unused_generic_param.full_tait.stderr | 14 - .../unused_generic_param.min_tait.stderr | 14 - ...eck_type_placeholder_item.full_tait.stderr | 638 ------------------ ...peck_type_placeholder_item.min_tait.stderr | 638 ------------------ 162 files changed, 5211 deletions(-) delete mode 100644 src/test/ui/associated-type-bounds/duplicate.full_tait.stderr delete mode 100644 src/test/ui/associated-type-bounds/duplicate.min_tait.stderr delete mode 100644 src/test/ui/generator/layout-error.full_tait.stderr delete mode 100644 src/test/ui/generator/layout-error.min_tait.stderr delete mode 100644 src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr delete mode 100644 src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/auto-trait.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/auto-trait.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/issue-55872-1.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/issue-55872-1.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/issue-55872-2.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/issue-55872-2.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/issue-55872.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/issue-55872.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/issues/issue-70877.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/issues/issue-70877.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr delete mode 100644 src/test/ui/impl-trait/negative-reasoning.full_tait.stderr delete mode 100644 src/test/ui/impl-trait/negative-reasoning.min_tait.stderr delete mode 100644 src/test/ui/issues/issue-60662.full_tait.stdout delete mode 100644 src/test/ui/issues/issue-60662.min_tait.stdout delete mode 100644 src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr delete mode 100644 src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr delete mode 100644 src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr delete mode 100644 src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr delete mode 100644 src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr delete mode 100644 src/test/ui/mir/issue-75053.full_tait.stderr delete mode 100644 src/test/ui/mir/issue-75053.min_tait.stderr delete mode 100644 src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr delete mode 100644 src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr delete mode 100644 src/test/ui/save-analysis/issue-68621.full_tait.stderr delete mode 100644 src/test/ui/save-analysis/issue-68621.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_nondefining_use.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_nondefining_use.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.nll.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.nll.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.nll.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.nll.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-63263-closure-return.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr delete mode 100644 src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr delete mode 100644 src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr delete mode 100644 src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr diff --git a/src/test/ui/associated-type-bounds/duplicate.full_tait.stderr b/src/test/ui/associated-type-bounds/duplicate.full_tait.stderr deleted file mode 100644 index 81cd882e5d80..000000000000 --- a/src/test/ui/associated-type-bounds/duplicate.full_tait.stderr +++ /dev/null @@ -1,483 +0,0 @@ -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:9:36 - | -LL | struct SI1> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:13:36 - | -LL | struct SI2> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:17:39 - | -LL | struct SI3> { - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:23:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:30:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:37:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:43:34 - | -LL | enum EI1> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:47:34 - | -LL | enum EI2> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:51:37 - | -LL | enum EI3> { - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:57:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:64:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:71:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:77:35 - | -LL | union UI1> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:81:35 - | -LL | union UI2> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:85:38 - | -LL | union UI3> { - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:91:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:98:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:105:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:111:32 - | -LL | fn FI1>() {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:113:32 - | -LL | fn FI2>() {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:115:35 - | -LL | fn FI3>() {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:119:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:125:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:131:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:145:40 - | -LL | fn FAPIT1(_: impl Iterator) {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:147:40 - | -LL | fn FAPIT2(_: impl Iterator) {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:149:43 - | -LL | fn FAPIT3(_: impl Iterator) {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:152:35 - | -LL | type TAI1> = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:154:35 - | -LL | type TAI2> = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:156:38 - | -LL | type TAI3> = T; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:160:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:165:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:170:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:174:36 - | -LL | type ETAI1> = impl Copy; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:176:36 - | -LL | type ETAI2> = impl Copy; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:178:39 - | -LL | type ETAI3> = impl Copy; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:180:40 - | -LL | type ETAI4 = impl Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:182:40 - | -LL | type ETAI5 = impl Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:184:43 - | -LL | type ETAI6 = impl Iterator; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:187:36 - | -LL | trait TRI1> {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:189:36 - | -LL | trait TRI2> {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:191:39 - | -LL | trait TRI3> {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:193:34 - | -LL | trait TRS1: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:195:34 - | -LL | trait TRS2: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:197:37 - | -LL | trait TRS3: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:201:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:207:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:213:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:219:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:219:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:226:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:226:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:233:35 - | -LL | Self: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:233:35 - | -LL | Self: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:251:40 - | -LL | type TADyn1 = dyn Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:253:44 - | -LL | type TADyn2 = Box>; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:255:43 - | -LL | type TADyn3 = dyn Iterator; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:239:34 - | -LL | type A: Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:243:34 - | -LL | type A: Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:247:37 - | -LL | type A: Iterator; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error: aborting due to 60 previous errors - -For more information about this error, try `rustc --explain E0719`. diff --git a/src/test/ui/associated-type-bounds/duplicate.min_tait.stderr b/src/test/ui/associated-type-bounds/duplicate.min_tait.stderr deleted file mode 100644 index 81cd882e5d80..000000000000 --- a/src/test/ui/associated-type-bounds/duplicate.min_tait.stderr +++ /dev/null @@ -1,483 +0,0 @@ -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:9:36 - | -LL | struct SI1> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:13:36 - | -LL | struct SI2> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:17:39 - | -LL | struct SI3> { - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:23:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:30:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:37:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:43:34 - | -LL | enum EI1> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:47:34 - | -LL | enum EI2> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:51:37 - | -LL | enum EI3> { - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:57:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:64:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:71:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:77:35 - | -LL | union UI1> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:81:35 - | -LL | union UI2> { - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:85:38 - | -LL | union UI3> { - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:91:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:98:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:105:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:111:32 - | -LL | fn FI1>() {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:113:32 - | -LL | fn FI2>() {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:115:35 - | -LL | fn FI3>() {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:119:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:125:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:131:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:145:40 - | -LL | fn FAPIT1(_: impl Iterator) {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:147:40 - | -LL | fn FAPIT2(_: impl Iterator) {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:149:43 - | -LL | fn FAPIT3(_: impl Iterator) {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:152:35 - | -LL | type TAI1> = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:154:35 - | -LL | type TAI2> = T; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:156:38 - | -LL | type TAI3> = T; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:160:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:165:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:170:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:174:36 - | -LL | type ETAI1> = impl Copy; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:176:36 - | -LL | type ETAI2> = impl Copy; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:178:39 - | -LL | type ETAI3> = impl Copy; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:180:40 - | -LL | type ETAI4 = impl Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:182:40 - | -LL | type ETAI5 = impl Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:184:43 - | -LL | type ETAI6 = impl Iterator; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:187:36 - | -LL | trait TRI1> {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:189:36 - | -LL | trait TRI2> {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:191:39 - | -LL | trait TRI3> {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:193:34 - | -LL | trait TRS1: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:195:34 - | -LL | trait TRS2: Iterator {} - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:197:37 - | -LL | trait TRS3: Iterator {} - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:201:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:207:29 - | -LL | T: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:213:32 - | -LL | T: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:219:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:219:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:226:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:226:32 - | -LL | Self: Iterator, - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:233:35 - | -LL | Self: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:233:35 - | -LL | Self: Iterator, - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:251:40 - | -LL | type TADyn1 = dyn Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:253:44 - | -LL | type TADyn2 = Box>; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:255:43 - | -LL | type TADyn3 = dyn Iterator; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:239:34 - | -LL | type A: Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:243:34 - | -LL | type A: Iterator; - | ---------- ^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified - --> $DIR/duplicate.rs:247:37 - | -LL | type A: Iterator; - | ------------- ^^^^^^^^^^^^^ re-bound here - | | - | `Item` bound here first - -error: aborting due to 60 previous errors - -For more information about this error, try `rustc --explain E0719`. diff --git a/src/test/ui/generator/layout-error.full_tait.stderr b/src/test/ui/generator/layout-error.full_tait.stderr deleted file mode 100644 index 76314611fa21..000000000000 --- a/src/test/ui/generator/layout-error.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0425]: cannot find value `Foo` in this scope - --> $DIR/layout-error.rs:23:17 - | -LL | let a = Foo; - | ^^^ not found in this scope - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0425`. diff --git a/src/test/ui/generator/layout-error.min_tait.stderr b/src/test/ui/generator/layout-error.min_tait.stderr deleted file mode 100644 index 09ff1abb8325..000000000000 --- a/src/test/ui/generator/layout-error.min_tait.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0425]: cannot find value `Foo` in this scope - --> $DIR/layout-error.rs:23:17 - | -LL | let a = Foo; - | ^^^ not found in this scope - -error[E0658]: type alias impl trait is not permitted here - --> $DIR/layout-error.rs:29:27 - | -LL | Task::spawn(&POOL, || cb()); - | ^ - | - = note: see issue #63063 for more information - = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0425, E0658. -For more information about an error, try `rustc --explain E0425`. diff --git a/src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr b/src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr deleted file mode 100644 index 4c70dc5e9581..000000000000 --- a/src/test/ui/generator/metadata-sufficient-for-layout.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/metadata-sufficient-for-layout.rs:27:1 - | -LL | fn main() {} - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr b/src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr deleted file mode 100644 index 4c70dc5e9581..000000000000 --- a/src/test/ui/generator/metadata-sufficient-for-layout.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/metadata-sufficient-for-layout.rs:27:1 - | -LL | fn main() {} - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/impl-trait/auto-trait.full_tait.stderr b/src/test/ui/impl-trait/auto-trait.full_tait.stderr deleted file mode 100644 index 3f25ca4b327f..000000000000 --- a/src/test/ui/impl-trait/auto-trait.full_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/auto-trait.rs:23:1 - | -LL | impl AnotherTrait for T {} - | -------------------------------- first implementation here -... -LL | impl AnotherTrait for D { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/impl-trait/auto-trait.min_tait.stderr b/src/test/ui/impl-trait/auto-trait.min_tait.stderr deleted file mode 100644 index 3f25ca4b327f..000000000000 --- a/src/test/ui/impl-trait/auto-trait.min_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/auto-trait.rs:23:1 - | -LL | impl AnotherTrait for T {} - | -------------------------------- first implementation here -... -LL | impl AnotherTrait for D { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr b/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr deleted file mode 100644 index 94d73be195cf..000000000000 --- a/src/test/ui/impl-trait/issue-55872-1.full_tait.stderr +++ /dev/null @@ -1,48 +0,0 @@ -error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-55872-1.rs:16:5 - | -LL | fn foo() -> Self::E; - | ----------------------- definition of `foo` from trait -... -LL | fn foo() -> Self::E { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default` - -error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:12:14 - | -LL | type E = impl Copy; - | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` - | - = note: required because it appears within the type `(S, T)` -help: consider further restricting this bound - | -LL | impl Bar for S { - | ^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:12:14 - | -LL | type E = impl Copy; - | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` - | - = note: required because it appears within the type `(S, T)` -help: consider further restricting this bound - | -LL | fn foo() -> Self::E { - | ^^^^^^^^^^^^^^^^^^^ - -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-1.rs:16:37 - | -LL | fn foo() -> Self::E { - | _____________________________________^ -LL | | -LL | | -LL | | (S::default(), T::default()) -LL | | } - | |_____^ - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0276, E0277. -For more information about an error, try `rustc --explain E0276`. diff --git a/src/test/ui/impl-trait/issue-55872-1.min_tait.stderr b/src/test/ui/impl-trait/issue-55872-1.min_tait.stderr deleted file mode 100644 index 94d73be195cf..000000000000 --- a/src/test/ui/impl-trait/issue-55872-1.min_tait.stderr +++ /dev/null @@ -1,48 +0,0 @@ -error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-55872-1.rs:16:5 - | -LL | fn foo() -> Self::E; - | ----------------------- definition of `foo` from trait -... -LL | fn foo() -> Self::E { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default` - -error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:12:14 - | -LL | type E = impl Copy; - | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S` - | - = note: required because it appears within the type `(S, T)` -help: consider further restricting this bound - | -LL | impl Bar for S { - | ^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:12:14 - | -LL | type E = impl Copy; - | ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T` - | - = note: required because it appears within the type `(S, T)` -help: consider further restricting this bound - | -LL | fn foo() -> Self::E { - | ^^^^^^^^^^^^^^^^^^^ - -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-1.rs:16:37 - | -LL | fn foo() -> Self::E { - | _____________________________________^ -LL | | -LL | | -LL | | (S::default(), T::default()) -LL | | } - | |_____^ - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0276, E0277. -For more information about an error, try `rustc --explain E0276`. diff --git a/src/test/ui/impl-trait/issue-55872-2.full_tait.stderr b/src/test/ui/impl-trait/issue-55872-2.full_tait.stderr deleted file mode 100644 index 305e916c9a98..000000000000 --- a/src/test/ui/impl-trait/issue-55872-2.full_tait.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: the trait bound `impl Future: Copy` is not satisfied - --> $DIR/issue-55872-2.rs:15:14 - | -LL | type E = impl std::marker::Copy; - | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future` - -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-2.rs:17:28 - | -LL | fn foo() -> Self::E { - | ____________________________^ -LL | | -LL | | async {} -LL | | } - | |_____^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/issue-55872-2.min_tait.stderr b/src/test/ui/impl-trait/issue-55872-2.min_tait.stderr deleted file mode 100644 index 305e916c9a98..000000000000 --- a/src/test/ui/impl-trait/issue-55872-2.min_tait.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: the trait bound `impl Future: Copy` is not satisfied - --> $DIR/issue-55872-2.rs:15:14 - | -LL | type E = impl std::marker::Copy; - | ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future` - -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-2.rs:17:28 - | -LL | fn foo() -> Self::E { - | ____________________________^ -LL | | -LL | | async {} -LL | | } - | |_____^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/impl-trait/issue-55872.full_tait.stderr b/src/test/ui/impl-trait/issue-55872.full_tait.stderr deleted file mode 100644 index 3fffd09836b2..000000000000 --- a/src/test/ui/impl-trait/issue-55872.full_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872.rs:15:28 - | -LL | fn foo() -> Self::E { - | ____________________________^ -LL | | -LL | | || () -LL | | } - | |_____^ - -error: aborting due to previous error - diff --git a/src/test/ui/impl-trait/issue-55872.min_tait.stderr b/src/test/ui/impl-trait/issue-55872.min_tait.stderr deleted file mode 100644 index 3fffd09836b2..000000000000 --- a/src/test/ui/impl-trait/issue-55872.min_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872.rs:15:28 - | -LL | fn foo() -> Self::E { - | ____________________________^ -LL | | -LL | | || () -LL | | } - | |_____^ - -error: aborting due to previous error - diff --git a/src/test/ui/impl-trait/issues/issue-70877.full_tait.stderr b/src/test/ui/impl-trait/issues/issue-70877.full_tait.stderr deleted file mode 100644 index 1f4e3f78afa4..000000000000 --- a/src/test/ui/impl-trait/issues/issue-70877.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0271]: type mismatch resolving `::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option + 'static)>` - --> $DIR/issue-70877.rs:10:12 - | -LL | type FooRet = impl std::fmt::Debug; - | -------------------- the found opaque type -... -LL | type Foo = impl Iterator; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found opaque type - | - = note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option + 'static)>` - found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/impl-trait/issues/issue-70877.min_tait.stderr b/src/test/ui/impl-trait/issues/issue-70877.min_tait.stderr deleted file mode 100644 index 1f4e3f78afa4..000000000000 --- a/src/test/ui/impl-trait/issues/issue-70877.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0271]: type mismatch resolving `::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option + 'static)>` - --> $DIR/issue-70877.rs:10:12 - | -LL | type FooRet = impl std::fmt::Debug; - | -------------------- the found opaque type -... -LL | type Foo = impl Iterator; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found opaque type - | - = note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option + 'static)>` - found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr b/src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr deleted file mode 100644 index b446eae9c3f1..000000000000 --- a/src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/issue-78722.rs:14:20 - | -LL | type F = impl core::future::Future; - | -------------------------------------- the expected opaque type -... -LL | let f: F = async { 1 }; - | - ^^^^^^^^^^^ expected opaque type, found a different opaque type - | | - | expected due to this - | - ::: $SRC_DIR/core/src/future/mod.rs:LL:COL - | -LL | pub const fn from_generator(gen: T) -> impl Future - | ------------------------------- the found opaque type - | - = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:7:10>) - found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>) - = note: distinct uses of `impl Trait` result in different opaque types - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr b/src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr deleted file mode 100644 index b446eae9c3f1..000000000000 --- a/src/test/ui/impl-trait/issues/issue-78722.min_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/issue-78722.rs:14:20 - | -LL | type F = impl core::future::Future; - | -------------------------------------- the expected opaque type -... -LL | let f: F = async { 1 }; - | - ^^^^^^^^^^^ expected opaque type, found a different opaque type - | | - | expected due to this - | - ::: $SRC_DIR/core/src/future/mod.rs:LL:COL - | -LL | pub const fn from_generator(gen: T) -> impl Future - | ------------------------------- the found opaque type - | - = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:7:10>) - found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>) - = note: distinct uses of `impl Trait` result in different opaque types - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr deleted file mode 100644 index 52ab9baff8b8..000000000000 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/error-handling-2.rs:15:60 - | -LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { - | ^^^^^^^^^ - | -note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 15:8 - --> $DIR/error-handling-2.rs:15:8 - | -LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { - | ^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0700`. diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr deleted file mode 100644 index 52ab9baff8b8..000000000000 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling-2.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/error-handling-2.rs:15:60 - | -LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { - | ^^^^^^^^^ - | -note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 15:8 - --> $DIR/error-handling-2.rs:15:8 - | -LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { - | ^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0700`. diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr deleted file mode 100644 index cdcb7d7c38ee..000000000000 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: lifetime may not live long enough - --> $DIR/error-handling.rs:24:16 - | -LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { - | -- -- lifetime `'b` defined here - | | - | lifetime `'a` defined here -... -LL | let _: &'b i32 = *u.0; - | ^^^^^^^ type annotation requires that `'a` must outlive `'b` - | - = help: consider adding the following bound: `'a: 'b` - -error: aborting due to previous error - diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr deleted file mode 100644 index cdcb7d7c38ee..000000000000 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: lifetime may not live long enough - --> $DIR/error-handling.rs:24:16 - | -LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { - | -- -- lifetime `'b` defined here - | | - | lifetime `'a` defined here -... -LL | let _: &'b i32 = *u.0; - | ^^^^^^^ type annotation requires that `'a` must outlive `'b` - | - = help: consider adding the following bound: `'a: 'b` - -error: aborting due to previous error - diff --git a/src/test/ui/impl-trait/negative-reasoning.full_tait.stderr b/src/test/ui/impl-trait/negative-reasoning.full_tait.stderr deleted file mode 100644 index edecdd061e1a..000000000000 --- a/src/test/ui/impl-trait/negative-reasoning.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/negative-reasoning.rs:21:1 - | -LL | impl AnotherTrait for T {} - | ------------------------------------------- first implementation here -... -LL | impl AnotherTrait for D { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D` - | - = note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `impl OpaqueTrait` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/impl-trait/negative-reasoning.min_tait.stderr b/src/test/ui/impl-trait/negative-reasoning.min_tait.stderr deleted file mode 100644 index edecdd061e1a..000000000000 --- a/src/test/ui/impl-trait/negative-reasoning.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D` - --> $DIR/negative-reasoning.rs:21:1 - | -LL | impl AnotherTrait for T {} - | ------------------------------------------- first implementation here -... -LL | impl AnotherTrait for D { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D` - | - = note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `impl OpaqueTrait` in future versions - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0119`. diff --git a/src/test/ui/issues/issue-60662.full_tait.stdout b/src/test/ui/issues/issue-60662.full_tait.stdout deleted file mode 100644 index 88bbbd143fb8..000000000000 --- a/src/test/ui/issues/issue-60662.full_tait.stdout +++ /dev/null @@ -1,16 +0,0 @@ -// check-pass -// compile-flags: -Z unpretty=hir - -// revisions: min_tait full_tait -#![feature(type_alias_impl_trait)] -#![feature(type_alias_impl_trait)] -#[prelude_import] -use ::std::prelude::rust_2015::*; -#[macro_use] -extern crate std; - -trait Animal { } - -fn main() { - pub type ServeFut = /*impl Trait*/; - } diff --git a/src/test/ui/issues/issue-60662.min_tait.stdout b/src/test/ui/issues/issue-60662.min_tait.stdout deleted file mode 100644 index c2495556f602..000000000000 --- a/src/test/ui/issues/issue-60662.min_tait.stdout +++ /dev/null @@ -1,15 +0,0 @@ -// check-pass -// compile-flags: -Z unpretty=hir - -// revisions: min_tait full_tait -#![feature(type_alias_impl_trait)] -#[prelude_import] -use ::std::prelude::rust_2015::*; -#[macro_use] -extern crate std; - -trait Animal { } - -fn main() { - pub type ServeFut = /*impl Trait*/; - } diff --git a/src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr b/src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr deleted file mode 100644 index d17c05ef2983..000000000000 --- a/src/test/ui/lint/inline-trait-and-foreign-items.full_tait.stderr +++ /dev/null @@ -1,72 +0,0 @@ -warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:9:5 - | -LL | #[inline] - | ^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/inline-trait-and-foreign-items.rs:6:9 - | -LL | #![warn(unused_attributes)] - | ^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: see issue #65833 for more information - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:13:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type T; - | ------- not a function or closure - -warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:20:5 - | -LL | #[inline] - | ^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: see issue #65833 for more information - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:24:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type T = Self; - | -------------- not a function or closure - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:27:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type U = impl Trait; - | -------------------- not a function or closure - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:32:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | static X: u32; - | -------------- not a function or closure - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:35:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type T; - | ------- not a function or closure - -error: could not find defining uses - --> $DIR/inline-trait-and-foreign-items.rs:28:14 - | -LL | type U = impl Trait; - | ^^^^^^^^^^ - -error: aborting due to 6 previous errors; 2 warnings emitted - -For more information about this error, try `rustc --explain E0518`. diff --git a/src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr b/src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr deleted file mode 100644 index d17c05ef2983..000000000000 --- a/src/test/ui/lint/inline-trait-and-foreign-items.min_tait.stderr +++ /dev/null @@ -1,72 +0,0 @@ -warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:9:5 - | -LL | #[inline] - | ^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/inline-trait-and-foreign-items.rs:6:9 - | -LL | #![warn(unused_attributes)] - | ^^^^^^^^^^^^^^^^^ - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: see issue #65833 for more information - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:13:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type T; - | ------- not a function or closure - -warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:20:5 - | -LL | #[inline] - | ^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: see issue #65833 for more information - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:24:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type T = Self; - | -------------- not a function or closure - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:27:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type U = impl Trait; - | -------------------- not a function or closure - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:32:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | static X: u32; - | -------------- not a function or closure - -error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:35:5 - | -LL | #[inline] - | ^^^^^^^^^ -LL | type T; - | ------- not a function or closure - -error: could not find defining uses - --> $DIR/inline-trait-and-foreign-items.rs:28:14 - | -LL | type U = impl Trait; - | ^^^^^^^^^^ - -error: aborting due to 6 previous errors; 2 warnings emitted - -For more information about this error, try `rustc --explain E0518`. diff --git a/src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr deleted file mode 100644 index 0e02b7bf4d9a..000000000000 --- a/src/test/ui/lint/lint-ctypes-73249-2.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-2.rs:28:25 - | -LL | pub fn lint_me() -> A<()>; - | ^^^^^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73249-2.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr deleted file mode 100644 index 0e02b7bf4d9a..000000000000 --- a/src/test/ui/lint/lint-ctypes-73249-2.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-2.rs:28:25 - | -LL | pub fn lint_me() -> A<()>; - | ^^^^^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73249-2.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr deleted file mode 100644 index 60661e96ddf3..000000000000 --- a/src/test/ui/lint/lint-ctypes-73249-3.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-3.rs:22:25 - | -LL | pub fn lint_me() -> A; - | ^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73249-3.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr deleted file mode 100644 index 60661e96ddf3..000000000000 --- a/src/test/ui/lint/lint-ctypes-73249-3.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-3.rs:22:25 - | -LL | pub fn lint_me() -> A; - | ^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73249-3.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr deleted file mode 100644 index aa1238a75121..000000000000 --- a/src/test/ui/lint/lint-ctypes-73249-5.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-5.rs:22:25 - | -LL | pub fn lint_me() -> A; - | ^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73249-5.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr deleted file mode 100644 index aa1238a75121..000000000000 --- a/src/test/ui/lint/lint-ctypes-73249-5.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73249-5.rs:22:25 - | -LL | pub fn lint_me() -> A; - | ^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73249-5.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr deleted file mode 100644 index 33f2ee59577d..000000000000 --- a/src/test/ui/lint/lint-ctypes-73251-1.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-1.rs:25:25 - | -LL | pub fn lint_me() -> ::Assoc; - | ^^^^^^^^^^^^^^^^^^^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73251-1.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr deleted file mode 100644 index 33f2ee59577d..000000000000 --- a/src/test/ui/lint/lint-ctypes-73251-1.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Baz`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-1.rs:25:25 - | -LL | pub fn lint_me() -> ::Assoc; - | ^^^^^^^^^^^^^^^^^^^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73251-1.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr deleted file mode 100644 index 152aaa183e35..000000000000 --- a/src/test/ui/lint/lint-ctypes-73251-2.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl TraitA`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-2.rs:38:25 - | -LL | pub fn lint_me() -> ::Assoc; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73251-2.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr b/src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr deleted file mode 100644 index 152aaa183e35..000000000000 --- a/src/test/ui/lint/lint-ctypes-73251-2.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl TraitA`, which is not FFI-safe - --> $DIR/lint-ctypes-73251-2.rs:38:25 - | -LL | pub fn lint_me() -> ::Assoc; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/lint-ctypes-73251-2.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr b/src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr deleted file mode 100644 index d7b916f8ad58..000000000000 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Fn<()>`, which is not FFI-safe - --> $DIR/opaque-ty-ffi-unsafe.rs:13:17 - | -LL | pub fn a(_: A); - | ^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/opaque-ty-ffi-unsafe.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr b/src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr deleted file mode 100644 index d7b916f8ad58..000000000000 --- a/src/test/ui/lint/opaque-ty-ffi-unsafe.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: `extern` block uses type `impl Fn<()>`, which is not FFI-safe - --> $DIR/opaque-ty-ffi-unsafe.rs:13:17 - | -LL | pub fn a(_: A); - | ^ not FFI-safe - | -note: the lint level is defined here - --> $DIR/opaque-ty-ffi-unsafe.rs:4:9 - | -LL | #![deny(improper_ctypes)] - | ^^^^^^^^^^^^^^^ - = note: opaque types have no C equivalent - -error: aborting due to previous error - diff --git a/src/test/ui/mir/issue-75053.full_tait.stderr b/src/test/ui/mir/issue-75053.full_tait.stderr deleted file mode 100644 index e2a5b8876e3e..000000000000 --- a/src/test/ui/mir/issue-75053.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-75053.rs:48:1 - | -LL | fn main() { - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/mir/issue-75053.min_tait.stderr b/src/test/ui/mir/issue-75053.min_tait.stderr deleted file mode 100644 index e2a5b8876e3e..000000000000 --- a/src/test/ui/mir/issue-75053.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-75053.rs:48:1 - | -LL | fn main() { - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr deleted file mode 100644 index f1f95c72150f..000000000000 --- a/src/test/ui/privacy/private-in-public-assoc-ty.full_tait.stderr +++ /dev/null @@ -1,68 +0,0 @@ -error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:19:9 - | -LL | struct Priv; - | ------------ `Priv` declared as private -... -LL | type A = Priv; - | ^^^^^^^^^^^^^^ can't leak private type - -warning: private trait `PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-assoc-ty.rs:26:9 - | -LL | type Alias1: PrivTr; - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(private_in_public)]` on by default - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #34537 - -warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:29:9 - | -LL | type Alias2: PubTrAux1 = u8; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #34537 - -warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:32:9 - | -LL | type Alias3: PubTrAux2 = u8; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #34537 - -error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:36:9 - | -LL | struct Priv; - | ------------ `Priv` declared as private -... -LL | type Alias4 = Priv; - | ^^^^^^^^^^^^^^^^^^^ can't leak private type - -error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:43:9 - | -LL | struct Priv; - | ------------ `Priv` declared as private -... -LL | type Alias1 = Priv; - | ^^^^^^^^^^^^^^^^^^^ can't leak private type - -error[E0445]: private trait `PrivTr` in public interface - --> $DIR/private-in-public-assoc-ty.rs:46:9 - | -LL | trait PrivTr {} - | ------------ `PrivTr` declared as private -... -LL | type Exist = impl PrivTr; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait - -error: aborting due to 4 previous errors; 3 warnings emitted - -Some errors have detailed explanations: E0445, E0446. -For more information about an error, try `rustc --explain E0445`. diff --git a/src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr b/src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr deleted file mode 100644 index f1f95c72150f..000000000000 --- a/src/test/ui/privacy/private-in-public-assoc-ty.min_tait.stderr +++ /dev/null @@ -1,68 +0,0 @@ -error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:19:9 - | -LL | struct Priv; - | ------------ `Priv` declared as private -... -LL | type A = Priv; - | ^^^^^^^^^^^^^^ can't leak private type - -warning: private trait `PrivTr` in public interface (error E0445) - --> $DIR/private-in-public-assoc-ty.rs:26:9 - | -LL | type Alias1: PrivTr; - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(private_in_public)]` on by default - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #34537 - -warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:29:9 - | -LL | type Alias2: PubTrAux1 = u8; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #34537 - -warning: private type `Priv` in public interface (error E0446) - --> $DIR/private-in-public-assoc-ty.rs:32:9 - | -LL | type Alias3: PubTrAux2 = u8; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #34537 - -error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:36:9 - | -LL | struct Priv; - | ------------ `Priv` declared as private -... -LL | type Alias4 = Priv; - | ^^^^^^^^^^^^^^^^^^^ can't leak private type - -error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:43:9 - | -LL | struct Priv; - | ------------ `Priv` declared as private -... -LL | type Alias1 = Priv; - | ^^^^^^^^^^^^^^^^^^^ can't leak private type - -error[E0445]: private trait `PrivTr` in public interface - --> $DIR/private-in-public-assoc-ty.rs:46:9 - | -LL | trait PrivTr {} - | ------------ `PrivTr` declared as private -... -LL | type Exist = impl PrivTr; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait - -error: aborting due to 4 previous errors; 3 warnings emitted - -Some errors have detailed explanations: E0445, E0446. -For more information about an error, try `rustc --explain E0445`. diff --git a/src/test/ui/save-analysis/issue-68621.full_tait.stderr b/src/test/ui/save-analysis/issue-68621.full_tait.stderr deleted file mode 100644 index 9206f6834501..000000000000 --- a/src/test/ui/save-analysis/issue-68621.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/issue-68621.rs:16:19 - | -LL | type Future = impl Trait; - | ^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/save-analysis/issue-68621.min_tait.stderr b/src/test/ui/save-analysis/issue-68621.min_tait.stderr deleted file mode 100644 index 9206f6834501..000000000000 --- a/src/test/ui/save-analysis/issue-68621.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/issue-68621.rs:16:19 - | -LL | type Future = impl Trait; - | ^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr deleted file mode 100644 index ea214e70fc8b..000000000000 --- a/src/test/ui/type-alias-impl-trait/assoc-type-const.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type-const.rs:8:12 - | -LL | #![feature(const_generics)] - | ^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #44580 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr deleted file mode 100644 index ea214e70fc8b..000000000000 --- a/src/test/ui/type-alias-impl-trait/assoc-type-const.min_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/assoc-type-const.rs:8:12 - | -LL | #![feature(const_generics)] - | ^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #44580 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr deleted file mode 100644 index aaaeb9bd695e..000000000000 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/assoc-type-lifetime-unconstrained.rs:19:6 - | -LL | impl<'a, I> UnwrapItemsExt for I { - | ^^ unconstrained lifetime parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr b/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr deleted file mode 100644 index aaaeb9bd695e..000000000000 --- a/src/test/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.min_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/assoc-type-lifetime-unconstrained.rs:19:6 - | -LL | impl<'a, I> UnwrapItemsExt for I { - | ^^ unconstrained lifetime parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr deleted file mode 100644 index b16d98ab72b7..000000000000 --- a/src/test/ui/type-alias-impl-trait/bound_reduction2.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/bound_reduction2.rs:17:46 - | -LL | fn foo_desugared(_: T) -> Foo { - | ^^^^^^^^^^^^^ - | -note: used non-generic type `::Assoc` for generic parameter - --> $DIR/bound_reduction2.rs:11:10 - | -LL | type Foo = impl Trait; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr deleted file mode 100644 index b16d98ab72b7..000000000000 --- a/src/test/ui/type-alias-impl-trait/bound_reduction2.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/bound_reduction2.rs:17:46 - | -LL | fn foo_desugared(_: T) -> Foo { - | ^^^^^^^^^^^^^ - | -note: used non-generic type `::Assoc` for generic parameter - --> $DIR/bound_reduction2.rs:11:10 - | -LL | type Foo = impl Trait; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr deleted file mode 100644 index a0099e343b85..000000000000 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0277]: the trait bound `T: Clone` is not satisfied - --> $DIR/bounds-are-checked-2.rs:8:13 - | -LL | type X = impl Clone; - | ^^^^^^^^^^ the trait `Clone` is not implemented for `T` - | -help: consider restricting type parameter `T` - | -LL | type X = impl Clone; - | ^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr deleted file mode 100644 index a0099e343b85..000000000000 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked-2.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0277]: the trait bound `T: Clone` is not satisfied - --> $DIR/bounds-are-checked-2.rs:8:13 - | -LL | type X = impl Clone; - | ^^^^^^^^^^ the trait `Clone` is not implemented for `T` - | -help: consider restricting type parameter `T` - | -LL | type X = impl Clone; - | ^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr deleted file mode 100644 index ec15474bf849..000000000000 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked.full_tait.stderr +++ /dev/null @@ -1,26 +0,0 @@ -warning: unnecessary lifetime parameter `'a` - --> $DIR/bounds-are-checked.rs:11:6 - | -LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { - | ^^^^^^^^^^^ - | - = help: you can use the `'static` lifetime directly, in place of `'a` - -error[E0308]: mismatched types - --> $DIR/bounds-are-checked.rs:8:14 - | -LL | type X<'a> = impl Into<&'static str> + From<&'a str>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch - | - = note: expected trait `From<&'a str>` - found trait `From<&'static str>` -note: the lifetime `'a` as defined on the item at 8:8... - --> $DIR/bounds-are-checked.rs:8:8 - | -LL | type X<'a> = impl Into<&'static str> + From<&'a str>; - | ^^ - = note: ...does not necessarily outlive the static lifetime - -error: aborting due to previous error; 1 warning emitted - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr b/src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr deleted file mode 100644 index ec15474bf849..000000000000 --- a/src/test/ui/type-alias-impl-trait/bounds-are-checked.min_tait.stderr +++ /dev/null @@ -1,26 +0,0 @@ -warning: unnecessary lifetime parameter `'a` - --> $DIR/bounds-are-checked.rs:11:6 - | -LL | fn f<'a: 'static>(t: &'a str) -> X<'a> { - | ^^^^^^^^^^^ - | - = help: you can use the `'static` lifetime directly, in place of `'a` - -error[E0308]: mismatched types - --> $DIR/bounds-are-checked.rs:8:14 - | -LL | type X<'a> = impl Into<&'static str> + From<&'a str>; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch - | - = note: expected trait `From<&'a str>` - found trait `From<&'static str>` -note: the lifetime `'a` as defined on the item at 8:8... - --> $DIR/bounds-are-checked.rs:8:8 - | -LL | type X<'a> = impl Into<&'static str> + From<&'a str>; - | ^^ - = note: ...does not necessarily outlive the static lifetime - -error: aborting due to previous error; 1 warning emitted - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr b/src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr deleted file mode 100644 index 4d7335cd8652..000000000000 --- a/src/test/ui/type-alias-impl-trait/coherence.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/coherence.rs:16:6 - | -LL | impl foreign_crate::ForeignTrait for AliasOfForeignType {} - | ^ unconstrained type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr b/src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr deleted file mode 100644 index 4d7335cd8652..000000000000 --- a/src/test/ui/type-alias-impl-trait/coherence.min_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/coherence.rs:16:6 - | -LL | impl foreign_crate::ForeignTrait for AliasOfForeignType {} - | ^ unconstrained type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr deleted file mode 100644 index 83019772afcb..000000000000 --- a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/declared_but_never_defined.rs:8:12 - | -LL | type Bar = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr deleted file mode 100644 index 83019772afcb..000000000000 --- a/src/test/ui/type-alias-impl-trait/declared_but_never_defined.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/declared_but_never_defined.rs:8:12 - | -LL | type Bar = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr deleted file mode 100644 index b3301a0ee4c4..000000000000 --- a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.full_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error: could not find defining uses - --> $DIR/declared_but_not_defined_in_scope.rs:9:20 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/declared_but_not_defined_in_scope.rs:13:5 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ---------------------- the expected opaque type -... -LL | fn bomp() -> boo::Boo { - | -------- expected `impl Debug` because of return type -LL | "" - | ^^ expected opaque type, found `&str` - | - = note: expected opaque type `impl Debug` - found reference `&'static str` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr b/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr deleted file mode 100644 index b3301a0ee4c4..000000000000 --- a/src/test/ui/type-alias-impl-trait/declared_but_not_defined_in_scope.min_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error: could not find defining uses - --> $DIR/declared_but_not_defined_in_scope.rs:9:20 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/declared_but_not_defined_in_scope.rs:13:5 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ---------------------- the expected opaque type -... -LL | fn bomp() -> boo::Boo { - | -------- expected `impl Debug` because of return type -LL | "" - | ^^ expected opaque type, found `&str` - | - = note: expected opaque type `impl Debug` - found reference `&'static str` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr deleted file mode 100644 index 23c5f9587cc0..000000000000 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses.rs:14:1 - | -LL | fn bar() -> Foo { - | ^^^^^^^^^^^^^^^ expected `&'static str`, got `i32` - | -note: previous use here - --> $DIR/different_defining_uses.rs:10:1 - | -LL | fn foo() -> Foo { - | ^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr deleted file mode 100644 index 23c5f9587cc0..000000000000 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses.rs:14:1 - | -LL | fn bar() -> Foo { - | ^^^^^^^^^^^^^^^ expected `&'static str`, got `i32` - | -note: previous use here - --> $DIR/different_defining_uses.rs:10:1 - | -LL | fn foo() -> Foo { - | ^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr deleted file mode 100644 index 7b7906f58aca..000000000000 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.full_tait.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses_never_type.rs:14:1 - | -LL | fn bar() -> Foo { - | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` - | -note: previous use here - --> $DIR/different_defining_uses_never_type.rs:10:1 - | -LL | fn foo() -> Foo { - | ^^^^^^^^^^^^^^^ - -error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses_never_type.rs:19:1 - | -LL | fn boo() -> Foo { - | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` - | -note: previous use here - --> $DIR/different_defining_uses_never_type.rs:10:1 - | -LL | fn foo() -> Foo { - | ^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr b/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr deleted file mode 100644 index 7b7906f58aca..000000000000 --- a/src/test/ui/type-alias-impl-trait/different_defining_uses_never_type.min_tait.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses_never_type.rs:14:1 - | -LL | fn bar() -> Foo { - | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` - | -note: previous use here - --> $DIR/different_defining_uses_never_type.rs:10:1 - | -LL | fn foo() -> Foo { - | ^^^^^^^^^^^^^^^ - -error: concrete type differs from previous defining opaque type use - --> $DIR/different_defining_uses_never_type.rs:19:1 - | -LL | fn boo() -> Foo { - | ^^^^^^^^^^^^^^^ expected `&'static str`, got `()` - | -note: previous use here - --> $DIR/different_defining_uses_never_type.rs:10:1 - | -LL | fn foo() -> Foo { - | ^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr deleted file mode 100644 index 749530d8f327..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_different_defining_uses.rs:13:1 - | -LL | fn my_iter2(t: T) -> MyIter { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `std::iter::Once`, got `std::option::IntoIter` - | -note: previous use here - --> $DIR/generic_different_defining_uses.rs:9:1 - | -LL | fn my_iter(t: T) -> MyIter { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr deleted file mode 100644 index 749530d8f327..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_different_defining_uses.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_different_defining_uses.rs:13:1 - | -LL | fn my_iter2(t: T) -> MyIter { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `std::iter::Once`, got `std::option::IntoIter` - | -note: previous use here - --> $DIR/generic_different_defining_uses.rs:9:1 - | -LL | fn my_iter(t: T) -> MyIter { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr deleted file mode 100644 index 3dedb2233094..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_lifetime_param.rs:9:26 - | -LL | fn one<'a>(t: &'a ()) -> Two<'a, 'a> { - | ^^^^^^^^^^^ - | -note: lifetime used multiple times - --> $DIR/generic_duplicate_lifetime_param.rs:7:10 - | -LL | type Two<'a, 'b> = impl std::fmt::Debug; - | ^^ ^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr deleted file mode 100644 index 3dedb2233094..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_lifetime_param.rs:9:26 - | -LL | fn one<'a>(t: &'a ()) -> Two<'a, 'a> { - | ^^^^^^^^^^^ - | -note: lifetime used multiple times - --> $DIR/generic_duplicate_lifetime_param.rs:7:10 - | -LL | type Two<'a, 'b> = impl std::fmt::Debug; - | ^^ ^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.full_tait.stderr deleted file mode 100644 index 805cea7127dd..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.full_tait.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:16:30 - | -LL | fn one_ty(t: T) -> TwoTys { - | ^^^^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use.rs:12:13 - | -LL | type TwoTys = impl Debug; - | ^ ^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:21:36 - | -LL | fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> { - | ^^^^^^^^^^^^^^^^^^^^ - | -note: lifetime used multiple times - --> $DIR/generic_duplicate_param_use.rs:13:19 - | -LL | type TwoLifetimes<'a, 'b> = impl Debug; - | ^^ ^^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:26:50 - | -LL | fn one_const(t: *mut [u8; N]) -> TwoConsts { - | ^^^^^^^^^^^^^^^ - | -note: constant used multiple times - --> $DIR/generic_duplicate_param_use.rs:14:22 - | -LL | type TwoConsts = impl Debug; - | ^ ^ - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.min_tait.stderr deleted file mode 100644 index 805cea7127dd..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use.min_tait.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:16:30 - | -LL | fn one_ty(t: T) -> TwoTys { - | ^^^^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use.rs:12:13 - | -LL | type TwoTys = impl Debug; - | ^ ^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:21:36 - | -LL | fn one_lifetime<'a>(t: &'a u32) -> TwoLifetimes<'a, 'a> { - | ^^^^^^^^^^^^^^^^^^^^ - | -note: lifetime used multiple times - --> $DIR/generic_duplicate_param_use.rs:13:19 - | -LL | type TwoLifetimes<'a, 'b> = impl Debug; - | ^^ ^^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use.rs:26:50 - | -LL | fn one_const(t: *mut [u8; N]) -> TwoConsts { - | ^^^^^^^^^^^^^^^ - | -note: constant used multiple times - --> $DIR/generic_duplicate_param_use.rs:14:22 - | -LL | type TwoConsts = impl Debug; - | ^ ^ - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr deleted file mode 100644 index 44bcdb7bf830..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use2.rs:12:27 - | -LL | fn one(t: T) -> Two { - | ^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use2.rs:10:10 - | -LL | type Two = impl Debug; - | ^ ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr deleted file mode 100644 index 44bcdb7bf830..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use2.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use2.rs:12:27 - | -LL | fn one(t: T) -> Two { - | ^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use2.rs:10:10 - | -LL | type Two = impl Debug; - | ^ ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr deleted file mode 100644 index 0185afc76bcc..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use3.rs:12:27 - | -LL | fn one(t: T) -> Two { - | ^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use3.rs:10:10 - | -LL | type Two = impl Debug; - | ^ ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr deleted file mode 100644 index 0185afc76bcc..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use3.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use3.rs:12:27 - | -LL | fn one(t: T) -> Two { - | ^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use3.rs:10:10 - | -LL | type Two = impl Debug; - | ^ ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr deleted file mode 100644 index 504116e87d29..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use4.rs:12:27 - | -LL | fn one(t: T) -> Two { - | ^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use4.rs:10:10 - | -LL | type Two = impl Debug; - | ^ ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr deleted file mode 100644 index 504116e87d29..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use4.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_duplicate_param_use4.rs:12:27 - | -LL | fn one(t: T) -> Two { - | ^^^^^^^^^ - | -note: type used multiple times - --> $DIR/generic_duplicate_param_use4.rs:10:10 - | -LL | type Two = impl Debug; - | ^ ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr deleted file mode 100644 index 7417112ca8aa..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.full_tait.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use5.rs:18:1 - | -LL | fn three(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, U)`, got `(U, T)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use5.rs:14:1 - | -LL | fn two(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:10:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, U)` -help: consider restricting type parameter `T` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:10:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, U)` -help: consider restricting type parameter `U` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr deleted file mode 100644 index 7417112ca8aa..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use5.min_tait.stderr +++ /dev/null @@ -1,39 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use5.rs:18:1 - | -LL | fn three(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, U)`, got `(U, T)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use5.rs:14:1 - | -LL | fn two(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:10:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, U)` -help: consider restricting type parameter `T` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use5.rs:10:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, U)` -help: consider restricting type parameter `U` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr deleted file mode 100644 index abadba0522c4..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.full_tait.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use6.rs:17:1 - | -LL | fn three(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use6.rs:13:1 - | -LL | fn two(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use6.rs:10:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, T)` -help: consider restricting type parameter `T` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr deleted file mode 100644 index abadba0522c4..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use6.min_tait.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use6.rs:17:1 - | -LL | fn three(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, T)`, got `(U, T)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use6.rs:13:1 - | -LL | fn two(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use6.rs:10:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, T)` -help: consider restricting type parameter `T` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr deleted file mode 100644 index 509ee95db30c..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.full_tait.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use8.rs:16:1 - | -LL | fn three(_: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, u32)`, got `(U, u32)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use8.rs:12:1 - | -LL | fn two(t: T, _: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use8.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, u32)` -help: consider restricting type parameter `T` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr deleted file mode 100644 index 509ee95db30c..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use8.min_tait.stderr +++ /dev/null @@ -1,27 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use8.rs:16:1 - | -LL | fn three(_: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(T, u32)`, got `(U, u32)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use8.rs:12:1 - | -LL | fn two(t: T, _: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: `T` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use8.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `T` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(T, u32)` -help: consider restricting type parameter `T` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr deleted file mode 100644 index 3454dc44e018..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.full_tait.stderr +++ /dev/null @@ -1,51 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use9.rs:23:1 - | -LL | fn three(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, ::Bar)`, got `(A, B, i32)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use9.rs:19:1 - | -LL | fn two(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, ::Bar)` - --> $DIR/generic_duplicate_param_use9.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ within `(A, B, ::Bar)`, the trait `Foo` is not implemented for `A` - | - = note: required because it appears within the type `(A, B, ::Bar)` -help: consider restricting type parameter `A` - | -LL | type Two = impl Debug; - | ^^^^^ - -error[E0277]: `A` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` -help: consider restricting type parameter `A` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error[E0277]: `B` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` -help: consider restricting type parameter `B` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr deleted file mode 100644 index 3454dc44e018..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_duplicate_param_use9.min_tait.stderr +++ /dev/null @@ -1,51 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/generic_duplicate_param_use9.rs:23:1 - | -LL | fn three(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(A, B, ::Bar)`, got `(A, B, i32)` - | -note: previous use here - --> $DIR/generic_duplicate_param_use9.rs:19:1 - | -LL | fn two(t: T, u: U) -> Two { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0277]: the trait bound `A: Foo` is not satisfied in `(A, B, ::Bar)` - --> $DIR/generic_duplicate_param_use9.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ within `(A, B, ::Bar)`, the trait `Foo` is not implemented for `A` - | - = note: required because it appears within the type `(A, B, ::Bar)` -help: consider restricting type parameter `A` - | -LL | type Two = impl Debug; - | ^^^^^ - -error[E0277]: `A` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `A` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` -help: consider restricting type parameter `A` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error[E0277]: `B` doesn't implement `Debug` - --> $DIR/generic_duplicate_param_use9.rs:9:18 - | -LL | type Two = impl Debug; - | ^^^^^^^^^^ `B` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | - = note: required because of the requirements on the impl of `Debug` for `(A, B, ::Bar)` -help: consider restricting type parameter `B` - | -LL | type Two = impl Debug; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.full_tait.stderr deleted file mode 100644 index 4d7eddfb2fb4..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.full_tait.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_nondefining_use.rs:17:21 - | -LL | fn concrete_ty() -> OneTy { - | ^^^^^^^^^^ - | -note: used non-generic type `u32` for generic parameter - --> $DIR/generic_nondefining_use.rs:11:12 - | -LL | type OneTy = impl Debug; - | ^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_nondefining_use.rs:22:27 - | -LL | type OneLifetime<'a> = impl Debug; - | -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type -... -LL | fn concrete_lifetime() -> OneLifetime<'static> { - | ^^^^^^^^^^^^^^^^^^^^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_nondefining_use.rs:27:24 - | -LL | fn concrete_const() -> OneConst<{123}> { - | ^^^^^^^^^^^^^^^ - | -note: used non-generic constant `{123}` for generic parameter - --> $DIR/generic_nondefining_use.rs:13:21 - | -LL | type OneConst = impl Debug; - | ^ - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_nondefining_use.min_tait.stderr deleted file mode 100644 index 4d7eddfb2fb4..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_nondefining_use.min_tait.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/generic_nondefining_use.rs:17:21 - | -LL | fn concrete_ty() -> OneTy { - | ^^^^^^^^^^ - | -note: used non-generic type `u32` for generic parameter - --> $DIR/generic_nondefining_use.rs:11:12 - | -LL | type OneTy = impl Debug; - | ^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_nondefining_use.rs:22:27 - | -LL | type OneLifetime<'a> = impl Debug; - | -- cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type -... -LL | fn concrete_lifetime() -> OneLifetime<'static> { - | ^^^^^^^^^^^^^^^^^^^^ - -error: non-defining opaque type use in defining scope - --> $DIR/generic_nondefining_use.rs:27:24 - | -LL | fn concrete_const() -> OneConst<{123}> { - | ^^^^^^^^^^^^^^^ - | -note: used non-generic constant `{123}` for generic parameter - --> $DIR/generic_nondefining_use.rs:13:21 - | -LL | type OneConst = impl Debug; - | ^ - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr deleted file mode 100644 index aa8457cf158e..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_not_used.full_tait.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_not_used.rs:7:33 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - -error: type parameter `V` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/generic_not_used.rs:10:73 - | -LL | fn wrong_generic(_: U, v: V) -> WrongGeneric { - | _________________________________________________________________________^ -LL | | -LL | | v -LL | | } - | |_^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr deleted file mode 100644 index aa8457cf158e..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_not_used.min_tait.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_not_used.rs:7:33 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - -error: type parameter `V` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/generic_not_used.rs:10:73 - | -LL | fn wrong_generic(_: U, v: V) -> WrongGeneric { - | _________________________________________________________________________^ -LL | | -LL | | v -LL | | } - | |_^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.nll.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.nll.stderr deleted file mode 100644 index 28ac61a6b984..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.nll.stderr +++ /dev/null @@ -1,50 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/generic_type_does_not_live_long_enough.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -error[E0308]: mismatched types - --> $DIR/generic_type_does_not_live_long_enough.rs:9:18 - | -LL | let z: i32 = x; - | --- ^ expected `i32`, found opaque type - | | - | expected due to this -... -LL | type WrongGeneric = impl 'static; - | ------------ the found opaque type - | - = note: expected type `i32` - found opaque type `impl Sized` - -error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:16:30 - | -LL | fn wrong_generic(t: T) -> WrongGeneric { - | ^^^^^^^^^^^^^^^ - | - = help: consider adding an explicit lifetime bound `T: 'static`... - -error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - | - = help: consider adding an explicit lifetime bound `T: 'static`... - = note: ...so that the type `T` will meet its required lifetime bounds - -error: aborting due to 4 previous errors; 1 warning emitted - -Some errors have detailed explanations: E0308, E0310. -For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr deleted file mode 100644 index f191797c09e1..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.full_tait.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/generic_type_does_not_live_long_enough.rs:8:18 - | -LL | let z: i32 = x; - | --- ^ expected `i32`, found opaque type - | | - | expected due to this -... -LL | type WrongGeneric = impl 'static; - | ------------ the found opaque type - | - = note: expected type `i32` - found opaque type `impl Sized` - -error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds -... -LL | fn wrong_generic(t: T) -> WrongGeneric { - | - help: consider adding an explicit lifetime bound...: `T: 'static` - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0308, E0310. -For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.nll.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.nll.stderr deleted file mode 100644 index b8ca8e46079a..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.nll.stderr +++ /dev/null @@ -1,41 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/generic_type_does_not_live_long_enough.rs:9:18 - | -LL | let z: i32 = x; - | --- ^ expected `i32`, found opaque type - | | - | expected due to this -... -LL | type WrongGeneric = impl 'static; - | ------------ the found opaque type - | - = note: expected type `i32` - found opaque type `impl Sized` - -error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:16:30 - | -LL | fn wrong_generic(t: T) -> WrongGeneric { - | ^^^^^^^^^^^^^^^ - | - = help: consider adding an explicit lifetime bound `T: 'static`... - -error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:12:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - | - = help: consider adding an explicit lifetime bound `T: 'static`... - = note: ...so that the type `T` will meet its required lifetime bounds - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0308, E0310. -For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr deleted file mode 100644 index f191797c09e1..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_type_does_not_live_long_enough.min_tait.stderr +++ /dev/null @@ -1,33 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/generic_type_does_not_live_long_enough.rs:8:18 - | -LL | let z: i32 = x; - | --- ^ expected `i32`, found opaque type - | | - | expected due to this -... -LL | type WrongGeneric = impl 'static; - | ------------ the found opaque type - | - = note: expected type `i32` - found opaque type `impl Sized` - -error[E0310]: the parameter type `T` may not live long enough - --> $DIR/generic_type_does_not_live_long_enough.rs:11:24 - | -LL | type WrongGeneric = impl 'static; - | ^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds -... -LL | fn wrong_generic(t: T) -> WrongGeneric { - | - help: consider adding an explicit lifetime bound...: `T: 'static` - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0308, E0310. -For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr deleted file mode 100644 index be701b0ca908..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained.full_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_underconstrained.rs:8:35 - | -LL | type Underconstrained = impl 'static; - | ^^^^^^^^^^^^ - -error[E0277]: the trait bound `T: Trait` is not satisfied - --> $DIR/generic_underconstrained.rs:12:31 - | -LL | type Underconstrained = impl 'static; - | ----- required by this bound in `Underconstrained` -... -LL | fn underconstrain(_: T) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T` - | -help: consider restricting type parameter `T` - | -LL | fn underconstrain(_: T) -> Underconstrained { - | ^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr deleted file mode 100644 index be701b0ca908..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained.min_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_underconstrained.rs:8:35 - | -LL | type Underconstrained = impl 'static; - | ^^^^^^^^^^^^ - -error[E0277]: the trait bound `T: Trait` is not satisfied - --> $DIR/generic_underconstrained.rs:12:31 - | -LL | type Underconstrained = impl 'static; - | ----- required by this bound in `Underconstrained` -... -LL | fn underconstrain(_: T) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `T` - | -help: consider restricting type parameter `T` - | -LL | fn underconstrain(_: T) -> Underconstrained { - | ^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr deleted file mode 100644 index ab2d9482364d..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.full_tait.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:7:45 - | -LL | type Underconstrained = impl 'static; - | ^^^^^^^^^^^^ - -error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:16:46 - | -LL | type Underconstrained2 = impl 'static; - | ^^^^^^^^^^^^ - -error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:11:33 - | -LL | type Underconstrained = impl 'static; - | --------------- required by this bound in `Underconstrained` -... -LL | fn underconstrained(_: U) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | -help: consider restricting type parameter `U` - | -LL | fn underconstrained(_: U) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^ - -error[E0277]: `V` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:20:43 - | -LL | type Underconstrained2 = impl 'static; - | --------------- required by this bound in `Underconstrained2` -... -LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { - | ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | -help: consider restricting type parameter `V` - | -LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr deleted file mode 100644 index ab2d9482364d..000000000000 --- a/src/test/ui/type-alias-impl-trait/generic_underconstrained2.min_tait.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:7:45 - | -LL | type Underconstrained = impl 'static; - | ^^^^^^^^^^^^ - -error: at least one trait must be specified - --> $DIR/generic_underconstrained2.rs:16:46 - | -LL | type Underconstrained2 = impl 'static; - | ^^^^^^^^^^^^ - -error[E0277]: `U` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:11:33 - | -LL | type Underconstrained = impl 'static; - | --------------- required by this bound in `Underconstrained` -... -LL | fn underconstrained(_: U) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | -help: consider restricting type parameter `U` - | -LL | fn underconstrained(_: U) -> Underconstrained { - | ^^^^^^^^^^^^^^^^^ - -error[E0277]: `V` doesn't implement `Debug` - --> $DIR/generic_underconstrained2.rs:20:43 - | -LL | type Underconstrained2 = impl 'static; - | --------------- required by this bound in `Underconstrained2` -... -LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { - | ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug` - | -help: consider restricting type parameter `V` - | -LL | fn underconstrained2(_: U, _: V) -> Underconstrained2 { - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr deleted file mode 100644 index 679f2f73919c..000000000000 --- a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/impl-with-unconstrained-param.rs:13:6 - | -LL | impl X for () { - | ^ unconstrained type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr b/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr deleted file mode 100644 index 679f2f73919c..000000000000 --- a/src/test/ui/type-alias-impl-trait/impl-with-unconstrained-param.min_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/impl-with-unconstrained-param.rs:13:6 - | -LL | impl X for () { - | ^ unconstrained type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr deleted file mode 100644 index 9435eaace371..000000000000 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.full_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0119]: conflicting implementations of trait `std::ops::FnOnce<()>` for type `&_` - --> $DIR/incoherent-assoc-imp-trait.rs:12:1 - | -LL | impl FnOnce<()> for &F { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: conflicting implementation in crate `core`: - - impl FnOnce for &F - where F: Fn, F: ?Sized; - -error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct`) - --> $DIR/incoherent-assoc-imp-trait.rs:12:6 - | -LL | impl FnOnce<()> for &F { - | ^ type parameter `F` must be used as the type parameter for some local type - | - = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0119, E0210. -For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr b/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr deleted file mode 100644 index 9435eaace371..000000000000 --- a/src/test/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.min_tait.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0119]: conflicting implementations of trait `std::ops::FnOnce<()>` for type `&_` - --> $DIR/incoherent-assoc-imp-trait.rs:12:1 - | -LL | impl FnOnce<()> for &F { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: conflicting implementation in crate `core`: - - impl FnOnce for &F - where F: Fn, F: ?Sized; - -error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct`) - --> $DIR/incoherent-assoc-imp-trait.rs:12:6 - | -LL | impl FnOnce<()> for &F { - | ^ type parameter `F` must be used as the type parameter for some local type - | - = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local - = note: only traits defined in the current crate can be implemented for a type parameter - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0119, E0210. -For more information about an error, try `rustc --explain E0119`. diff --git a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr deleted file mode 100644 index 696f887a4d89..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-52843-closure-constrain.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: concrete type differs from previous defining opaque type use - --> $DIR/issue-52843-closure-constrain.rs:12:16 - | -LL | let null = || -> Opaque { 0 }; - | ^^^^^^^^^^^^^^^^^^ expected `String`, got `i32` - | -note: previous use here - --> $DIR/issue-52843-closure-constrain.rs:11:5 - | -LL | fn _unused() -> Opaque { String::new() } - | ^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr deleted file mode 100644 index abd18392636c..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-52843.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0277]: the trait bound `T: Default` is not satisfied - --> $DIR/issue-52843.rs:5:15 - | -LL | type Foo = impl Default; - | ^^^^^^^^^^^^ the trait `Default` is not implemented for `T` - | -help: consider restricting type parameter `T` - | -LL | type Foo = impl Default; - | ^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr deleted file mode 100644 index abd18392636c..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-52843.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0277]: the trait bound `T: Default` is not satisfied - --> $DIR/issue-52843.rs:5:15 - | -LL | type Foo = impl Default; - | ^^^^^^^^^^^^ the trait `Default` is not implemented for `T` - | -help: consider restricting type parameter `T` - | -LL | type Foo = impl Default; - | ^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr deleted file mode 100644 index 554215fe8945..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-53096.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0636]: the feature `type_alias_impl_trait` has already been declared - --> $DIR/issue-53096.rs:4:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0636`. diff --git a/src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr deleted file mode 100644 index fb70582c31a2..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-53096.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53096.rs:13:1 - | -LL | fn main() {} - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr deleted file mode 100644 index 7087aef67681..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-53598.full_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-53598.rs:22:42 - | -LL | fn foo(_: T) -> Self::Item { - | __________________________________________^ -LL | | -LL | | S::(Default::default()) -LL | | } - | |_____^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr deleted file mode 100644 index 7087aef67681..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-53598.min_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-53598.rs:22:42 - | -LL | fn foo(_: T) -> Self::Item { - | __________________________________________^ -LL | | -LL | | S::(Default::default()) -LL | | } - | |_____^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr deleted file mode 100644 index 05b7173b80b5..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53678-generator-and-const-fn.rs:21:1 - | -LL | fn main() {} - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr deleted file mode 100644 index 05b7173b80b5..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-53678-generator-and-const-fn.rs:21:1 - | -LL | fn main() {} - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.nll.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.nll.stderr deleted file mode 100644 index e2b8b19aeba1..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.nll.stderr +++ /dev/null @@ -1,47 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-57611-trait-alias.rs:8:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -error: higher-ranked subtype error - --> $DIR/issue-57611-trait-alias.rs:24:9 - | -LL | |x| x - | ^^^^^ - -error: higher-ranked subtype error - --> $DIR/issue-57611-trait-alias.rs:24:9 - | -LL | |x| x - | ^^^^^ - -error[E0308]: mismatched types - --> $DIR/issue-57611-trait-alias.rs:20:16 - | -LL | type Bar = impl Baz; - | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other - | - = note: expected type `for<'r> Fn<(&'r X,)>` - found type `Fn<(&'static X,)>` -note: this closure does not fulfill the lifetime requirements - --> $DIR/issue-57611-trait-alias.rs:24:9 - | -LL | |x| x - | ^^^^^ - -error: implementation of `FnOnce` is not general enough - --> $DIR/issue-57611-trait-alias.rs:20:16 - | -LL | type Bar = impl Baz; - | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough - | - = note: closure with signature `fn(&'static X) -> &'static X` must implement `FnOnce<(&'0 X,)>`, for any lifetime `'0`... - = note: ...but it actually implements `FnOnce<(&'static X,)>` - -error: aborting due to 4 previous errors; 1 warning emitted - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr deleted file mode 100644 index 70b6f264860e..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: implementation of `FnOnce` is not general enough - --> $DIR/issue-57611-trait-alias.rs:19:16 - | -LL | type Bar = impl Baz; - | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough - | - = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`... - = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.nll.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.nll.stderr deleted file mode 100644 index 3a4d1d90c039..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.nll.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error: higher-ranked subtype error - --> $DIR/issue-57611-trait-alias.rs:24:9 - | -LL | |x| x - | ^^^^^ - -error: higher-ranked subtype error - --> $DIR/issue-57611-trait-alias.rs:24:9 - | -LL | |x| x - | ^^^^^ - -error[E0308]: mismatched types - --> $DIR/issue-57611-trait-alias.rs:20:16 - | -LL | type Bar = impl Baz; - | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other - | - = note: expected type `for<'r> Fn<(&'r X,)>` - found type `Fn<(&'static X,)>` -note: this closure does not fulfill the lifetime requirements - --> $DIR/issue-57611-trait-alias.rs:24:9 - | -LL | |x| x - | ^^^^^ - -error: implementation of `FnOnce` is not general enough - --> $DIR/issue-57611-trait-alias.rs:20:16 - | -LL | type Bar = impl Baz; - | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough - | - = note: closure with signature `fn(&'static X) -> &'static X` must implement `FnOnce<(&'0 X,)>`, for any lifetime `'0`... - = note: ...but it actually implements `FnOnce<(&'static X,)>` - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr deleted file mode 100644 index 70b6f264860e..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.min_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: implementation of `FnOnce` is not general enough - --> $DIR/issue-57611-trait-alias.rs:19:16 - | -LL | type Bar = impl Baz; - | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough - | - = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`... - = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr deleted file mode 100644 index 2d8586267193..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57700.full_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-57700.rs:18:58 - | -LL | fn foo(self: impl Deref) -> Self::Bar { - | __________________________________________________________^ -LL | | -LL | | self -LL | | } - | |_____^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr deleted file mode 100644 index 2d8586267193..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-57700.min_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-57700.rs:18:58 - | -LL | fn foo(self: impl Deref) -> Self::Bar { - | __________________________________________________________^ -LL | | -LL | | self -LL | | } - | |_____^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr deleted file mode 100644 index 9b2d21192cd8..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-60407.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0636]: the feature `type_alias_impl_trait` has already been declared - --> $DIR/issue-60407.rs:3:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0636`. diff --git a/src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr deleted file mode 100644 index adb07f5227b4..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-60407.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: fatal error triggered by #[rustc_error] - --> $DIR/issue-60407.rs:10:1 - | -LL | fn main() { - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr deleted file mode 100644 index 738718e770ac..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-60564.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/issue-60564.rs:21:34 - | -LL | fn iter_bits(self, n: u8) -> Self::BitsIter { - | ^^^^^^^^^^^^^^ - | -note: used non-generic type `u8` for generic parameter - --> $DIR/issue-60564.rs:10:25 - | -LL | type IterBitsIter = impl std::iter::Iterator; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr deleted file mode 100644 index 738718e770ac..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-60564.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/issue-60564.rs:21:34 - | -LL | fn iter_bits(self, n: u8) -> Self::BitsIter { - | ^^^^^^^^^^^^^^ - | -note: used non-generic type `u8` for generic parameter - --> $DIR/issue-60564.rs:10:25 - | -LL | type IterBitsIter = impl std::iter::Iterator; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.full_tait.stderr deleted file mode 100644 index 1c6759e3454b..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-63263-closure-return.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes - --> $DIR/issue-63263-closure-return.rs:9:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - | - = note: `#[warn(incomplete_features)]` on by default - = note: see issue #63063 for more information - -warning: 1 warning emitted - diff --git a/src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr deleted file mode 100644 index 409cca865d1e..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-63279.full_tait.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0271]: type mismatch resolving `<[closure@$DIR/issue-63279.rs:10:5: 10:28] as FnOnce<()>>::Output == ()` - --> $DIR/issue-63279.rs:7:16 - | -LL | type Closure = impl FnOnce(); - | ^^^^^^^^^^^^^ expected `()`, found opaque type - | - = note: expected unit type `()` - found opaque type `impl FnOnce<()>` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr deleted file mode 100644 index 98d20d6ca0d5..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0636]: the feature `type_alias_impl_trait` has already been declared - --> $DIR/issue-65679-inst-opaque-ty-from-val-twice.rs:5:32 - | -LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))] - | ^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0636`. diff --git a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr deleted file mode 100644 index db3b89bc699c..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/issue-68368-non-defining-use.rs:10:15 - | -LL | fn f<'a>() -> Alias<'a, ()> {} - | ^^^^^^^^^^^^^ - | -note: used non-generic type `()` for generic parameter - --> $DIR/issue-68368-non-defining-use.rs:9:16 - | -LL | type Alias<'a, U> = impl Trait; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr deleted file mode 100644 index db3b89bc699c..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-68368-non-defining-use.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/issue-68368-non-defining-use.rs:10:15 - | -LL | fn f<'a>() -> Alias<'a, ()> {} - | ^^^^^^^^^^^^^ - | -note: used non-generic type `()` for generic parameter - --> $DIR/issue-68368-non-defining-use.rs:9:16 - | -LL | type Alias<'a, U> = impl Trait; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr deleted file mode 100644 index 150bfbaef591..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.full_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:19:65 - | -LL | type Return = impl WithAssoc; - | - ^^ undeclared lifetime - | | - | help: consider introducing lifetime `'a` here: `'a,` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0261`. diff --git a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr deleted file mode 100644 index 150bfbaef591..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-69136-inner-lifetime-resolve-error.min_tait.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/issue-69136-inner-lifetime-resolve-error.rs:19:65 - | -LL | type Return = impl WithAssoc; - | - ^^ undeclared lifetime - | | - | help: consider introducing lifetime `'a` here: `'a,` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0261`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr deleted file mode 100644 index 83c37001a45c..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-74244.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74244.rs:11:6 - | -LL | impl Allocator for DefaultAllocator { - | ^ unconstrained type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr deleted file mode 100644 index 83c37001a45c..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-74244.min_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74244.rs:11:6 - | -LL | impl Allocator for DefaultAllocator { - | ^ unconstrained type parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr deleted file mode 100644 index 112fc2ec7196..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-74761.full_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:9:6 - | -LL | impl<'a, 'b> A for () { - | ^^ unconstrained lifetime parameter - -error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:9:10 - | -LL | impl<'a, 'b> A for () { - | ^^ unconstrained lifetime parameter - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr deleted file mode 100644 index 112fc2ec7196..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-74761.min_tait.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:9:6 - | -LL | impl<'a, 'b> A for () { - | ^^ unconstrained lifetime parameter - -error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:9:10 - | -LL | impl<'a, 'b> A for () { - | ^^ unconstrained lifetime parameter - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr deleted file mode 100644 index fb063800bdbc..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: cannot implement trait on type alias impl trait - --> $DIR/issue-76202-trait-impl-for-tait.rs:18:1 - | -LL | impl Test for F { - | ^^^^^^^^^^^^^^^ - | -note: type alias impl trait defined here - --> $DIR/issue-76202-trait-impl-for-tait.rs:11:10 - | -LL | type F = impl Dummy; - | ^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr b/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr deleted file mode 100644 index fb063800bdbc..000000000000 --- a/src/test/ui/type-alias-impl-trait/issue-76202-trait-impl-for-tait.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: cannot implement trait on type alias impl trait - --> $DIR/issue-76202-trait-impl-for-tait.rs:18:1 - | -LL | impl Test for F { - | ^^^^^^^^^^^^^^^ - | -note: type alias impl trait defined here - --> $DIR/issue-76202-trait-impl-for-tait.rs:11:10 - | -LL | type F = impl Dummy; - | ^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr deleted file mode 100644 index 725958358a11..000000000000 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.full_tait.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/never_reveal_concrete_type.rs:15:27 - | -LL | type NoReveal = impl std::fmt::Debug; - | -------------------- the found opaque type -... -LL | let _: &'static str = x; - | ------------ ^ expected `&str`, found opaque type - | | - | expected due to this - | - = note: expected reference `&'static str` - found opaque type `impl Debug` - -error[E0605]: non-primitive cast: `impl Debug` as `&'static str` - --> $DIR/never_reveal_concrete_type.rs:16:13 - | -LL | let _ = x as &'static str; - | ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0308, E0605. -For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr b/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr deleted file mode 100644 index 725958358a11..000000000000 --- a/src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.min_tait.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/never_reveal_concrete_type.rs:15:27 - | -LL | type NoReveal = impl std::fmt::Debug; - | -------------------- the found opaque type -... -LL | let _: &'static str = x; - | ------------ ^ expected `&str`, found opaque type - | | - | expected due to this - | - = note: expected reference `&'static str` - found opaque type `impl Debug` - -error[E0605]: non-primitive cast: `impl Debug` as `&'static str` - --> $DIR/never_reveal_concrete_type.rs:16:13 - | -LL | let _ = x as &'static str; - | ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0308, E0605. -For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr deleted file mode 100644 index 917830c6a098..000000000000 --- a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/no_inferrable_concrete_type.rs:8:12 - | -LL | type Foo = impl Copy; - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr b/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr deleted file mode 100644 index 917830c6a098..000000000000 --- a/src/test/ui/type-alias-impl-trait/no_inferrable_concrete_type.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/no_inferrable_concrete_type.rs:8:12 - | -LL | type Foo = impl Copy; - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr deleted file mode 100644 index 0f0141dcb99f..000000000000 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.full_tait.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:17:19 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ---------------------- the found opaque type -... -LL | let _: &str = bomp(); - | ---- ^^^^^^ expected `&str`, found opaque type - | | - | expected due to this - | - = note: expected reference `&str` - found opaque type `impl Debug` - -error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:21:5 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ---------------------- the expected opaque type -... -LL | fn bomp() -> boo::Boo { - | -------- expected `impl Debug` because of return type -LL | "" - | ^^ expected opaque type, found `&str` - | - = note: expected opaque type `impl Debug` - found reference `&'static str` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr b/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr deleted file mode 100644 index 0f0141dcb99f..000000000000 --- a/src/test/ui/type-alias-impl-trait/no_revealing_outside_defining_module.min_tait.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:17:19 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ---------------------- the found opaque type -... -LL | let _: &str = bomp(); - | ---- ^^^^^^ expected `&str`, found opaque type - | | - | expected due to this - | - = note: expected reference `&str` - found opaque type `impl Debug` - -error[E0308]: mismatched types - --> $DIR/no_revealing_outside_defining_module.rs:21:5 - | -LL | pub type Boo = impl ::std::fmt::Debug; - | ---------------------- the expected opaque type -... -LL | fn bomp() -> boo::Boo { - | -------- expected `impl Debug` because of return type -LL | "" - | ^^ expected opaque type, found `&str` - | - = note: expected opaque type `impl Debug` - found reference `&'static str` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr b/src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr deleted file mode 100644 index d7f8d04ff808..000000000000 --- a/src/test/ui/type-alias-impl-trait/not_a_defining_use.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/not_a_defining_use.rs:11:27 - | -LL | fn two(t: T) -> Two { - | ^^^^^^^^^^^ - | -note: used non-generic type `u32` for generic parameter - --> $DIR/not_a_defining_use.rs:9:13 - | -LL | type Two = impl Debug; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr b/src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr deleted file mode 100644 index d7f8d04ff808..000000000000 --- a/src/test/ui/type-alias-impl-trait/not_a_defining_use.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: non-defining opaque type use in defining scope - --> $DIR/not_a_defining_use.rs:11:27 - | -LL | fn two(t: T) -> Two { - | ^^^^^^^^^^^ - | -note: used non-generic type `u32` for generic parameter - --> $DIR/not_a_defining_use.rs:9:13 - | -LL | type Two = impl Debug; - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr b/src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr deleted file mode 100644 index 59f07482ddbc..000000000000 --- a/src/test/ui/type-alias-impl-trait/not_well_formed.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0220]: associated type `Assoc` not found for `V` - --> $DIR/not_well_formed.rs:11:29 - | -LL | type Foo = impl Trait; - | ^^^^^ associated type `Assoc` not found - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0220`. diff --git a/src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr b/src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr deleted file mode 100644 index 59f07482ddbc..000000000000 --- a/src/test/ui/type-alias-impl-trait/not_well_formed.min_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0220]: associated type `Assoc` not found for `V` - --> $DIR/not_well_formed.rs:11:29 - | -LL | type Foo = impl Trait; - | ^^^^^ associated type `Assoc` not found - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0220`. diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr deleted file mode 100644 index ce0827d94f94..000000000000 --- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: `impl Send` cannot be used in patterns - --> $DIR/structural-match-no-leak.rs:17:9 - | -LL | LEAK_FREE => (), - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr deleted file mode 100644 index ce0827d94f94..000000000000 --- a/src/test/ui/type-alias-impl-trait/structural-match-no-leak.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: `impl Send` cannot be used in patterns - --> $DIR/structural-match-no-leak.rs:17:9 - | -LL | LEAK_FREE => (), - | ^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr deleted file mode 100644 index cb2cf59774ba..000000000000 --- a/src/test/ui/type-alias-impl-trait/structural-match.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: `impl Send` cannot be used in patterns - --> $DIR/structural-match.rs:18:9 - | -LL | VALUE => (), - | ^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr b/src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr deleted file mode 100644 index cb2cf59774ba..000000000000 --- a/src/test/ui/type-alias-impl-trait/structural-match.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: `impl Send` cannot be used in patterns - --> $DIR/structural-match.rs:18:9 - | -LL | VALUE => (), - | ^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr deleted file mode 100644 index 2a40ccc074b9..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.full_tait.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/type-alias-impl-trait-const.rs:12:19 - | -LL | pub type Foo = impl Debug; - | ---------- the expected opaque type -... -LL | const _FOO: Foo = 5; - | ^ expected opaque type, found integer - | - = note: expected opaque type `impl Debug` - found type `{integer}` - -error: could not find defining uses - --> $DIR/type-alias-impl-trait-const.rs:9:16 - | -LL | pub type Foo = impl Debug; - | ^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr deleted file mode 100644 index 2a40ccc074b9..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-const.min_tait.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0308]: mismatched types - --> $DIR/type-alias-impl-trait-const.rs:12:19 - | -LL | pub type Foo = impl Debug; - | ---------- the expected opaque type -... -LL | const _FOO: Foo = 5; - | ^ expected opaque type, found integer - | - = note: expected opaque type `impl Debug` - found type `{integer}` - -error: could not find defining uses - --> $DIR/type-alias-impl-trait-const.rs:9:16 - | -LL | pub type Foo = impl Debug; - | ^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr deleted file mode 100644 index c4bd4deaa061..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.full_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:12:6 - | -LL | impl<'a, I: Iterator> Trait for (i32, I) { - | ^^ unconstrained lifetime parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr deleted file mode 100644 index c4bd4deaa061..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.min_tait.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:12:6 - | -LL | impl<'a, I: Iterator> Trait for (i32, I) { - | ^^ unconstrained lifetime parameter - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr deleted file mode 100644 index f1b9f23f0664..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error.rs:5:12 - | -LL | type Foo = impl Fn() -> Foo; - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr deleted file mode 100644 index f1b9f23f0664..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error.rs:5:12 - | -LL | type Foo = impl Fn() -> Foo; - | ^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr deleted file mode 100644 index 2df29d72c1e3..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.full_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:9:12 - | -LL | type Foo = impl Bar; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr deleted file mode 100644 index 2df29d72c1e3..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-cycle-error2.min_tait.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: could not find defining uses - --> $DIR/type-alias-impl-trait-with-cycle-error2.rs:9:12 - | -LL | type Foo = impl Bar; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr deleted file mode 100644 index 4c32549ce30b..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:5:12 - | -LL | type Foo = impl 'static; - | ^^^^^^^^^^^^ - -error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:12:13 - | -LL | fn bar() -> impl 'static { - | ^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr deleted file mode 100644 index 4c32549ce30b..000000000000 --- a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-with-no-traits.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:5:12 - | -LL | type Foo = impl 'static; - | ^^^^^^^^^^^^ - -error: at least one trait must be specified - --> $DIR/type-alias-impl-trait-with-no-traits.rs:12:13 - | -LL | fn bar() -> impl 'static { - | ^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr b/src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr deleted file mode 100644 index 995a6dfbf877..000000000000 --- a/src/test/ui/type-alias-impl-trait/unused_generic_param.full_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:7:28 - | -LL | type PartiallyDefined = impl 'static; - | ^^^^^^^^^^^^ - -error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:14:29 - | -LL | type PartiallyDefined2 = impl 'static; - | ^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr b/src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr deleted file mode 100644 index 995a6dfbf877..000000000000 --- a/src/test/ui/type-alias-impl-trait/unused_generic_param.min_tait.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:7:28 - | -LL | type PartiallyDefined = impl 'static; - | ^^^^^^^^^^^^ - -error: at least one trait must be specified - --> $DIR/unused_generic_param.rs:14:29 - | -LL | type PartiallyDefined2 = impl 'static; - | ^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr deleted file mode 100644 index 3427dc0e6221..000000000000 --- a/src/test/ui/typeck/typeck_type_placeholder_item.full_tait.stderr +++ /dev/null @@ -1,638 +0,0 @@ -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:156:18 - | -LL | struct BadStruct<_>(_); - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:159:16 - | -LL | trait BadTrait<_> {} - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:169:19 - | -LL | struct BadStruct1<_, _>(_); - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:169:22 - | -LL | struct BadStruct1<_, _>(_); - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:174:19 - | -LL | struct BadStruct2<_, T>(_, T); - | ^ expected identifier, found reserved identifier - -error: associated constant in `impl` without body - --> $DIR/typeck_type_placeholder_item.rs:207:5 - | -LL | const C: _; - | ^^^^^^^^^^- - | | - | help: provide a definition for the constant: `= ;` - -error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters - --> $DIR/typeck_type_placeholder_item.rs:169:22 - | -LL | struct BadStruct1<_, _>(_); - | - ^ already used - | | - | first use of `_` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:9:14 - | -LL | fn test() -> _ { 5 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:12:16 - | -LL | fn test2() -> (_, _) { (5, 5) } - | -^--^- - | || | - | || not allowed in type signatures - | |not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:15:15 - | -LL | static TEST3: _ = "test"; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `&str` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:18:15 - | -LL | static TEST4: _ = 145; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:21:15 - | -LL | static TEST5: (_, _) = (1, 2); - | ^^^^^^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:24:13 - | -LL | fn test6(_: _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test6(_: T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:27:18 - | -LL | fn test6_b(_: _, _: T) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test6_b(_: U, _: T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:30:30 - | -LL | fn test6_c(_: _, _: (T, K, L, A, B)) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test6_c(_: U, _: (T, K, L, A, B)) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:33:13 - | -LL | fn test7(x: _) { let _x: usize = x; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test7(x: T) { let _x: usize = x; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:36:22 - | -LL | fn test8(_f: fn() -> _) { } - | ^ - | | - | not allowed in type signatures - | help: use type parameters instead: `T` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:36:22 - | -LL | fn test8(_f: fn() -> _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test8(_f: fn() -> T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:50:26 - | -LL | fn test11(x: &usize) -> &_ { - | -^ - | || - | |not allowed in type signatures - | help: replace with the correct return type: `&'static &'static usize` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:55:52 - | -LL | unsafe fn test12(x: *const usize) -> *const *const _ { - | --------------^ - | | | - | | not allowed in type signatures - | help: replace with the correct return type: `*const *const usize` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:69:8 - | -LL | a: _, - | ^ not allowed in type signatures -LL | -LL | b: (_, _), - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | struct Test10 { -LL | a: T, -LL | -LL | b: (T, T), - | - -error: missing type for `static` item - --> $DIR/typeck_type_placeholder_item.rs:75:12 - | -LL | static A = 42; - | ^ help: provide a type for the static variable: `A: i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:77:15 - | -LL | static B: _ = 42; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:79:15 - | -LL | static C: Option<_> = Some(42); - | ^^^^^^^^^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:81:21 - | -LL | fn fn_test() -> _ { 5 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:84:23 - | -LL | fn fn_test2() -> (_, _) { (5, 5) } - | -^--^- - | || | - | || not allowed in type signatures - | |not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:87:22 - | -LL | static FN_TEST3: _ = "test"; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `&str` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:90:22 - | -LL | static FN_TEST4: _ = 145; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:93:22 - | -LL | static FN_TEST5: (_, _) = (1, 2); - | ^^^^^^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:96:20 - | -LL | fn fn_test6(_: _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test6(_: T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:99:20 - | -LL | fn fn_test7(x: _) { let _x: usize = x; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test7(x: T) { let _x: usize = x; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:102:29 - | -LL | fn fn_test8(_f: fn() -> _) { } - | ^ - | | - | not allowed in type signatures - | help: use type parameters instead: `T` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:102:29 - | -LL | fn fn_test8(_f: fn() -> _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test8(_f: fn() -> T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:125:12 - | -LL | a: _, - | ^ not allowed in type signatures -LL | -LL | b: (_, _), - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | struct FnTest10 { -LL | a: T, -LL | -LL | b: (T, T), - | - -error[E0282]: type annotations needed - --> $DIR/typeck_type_placeholder_item.rs:130:18 - | -LL | fn fn_test11(_: _) -> (_, _) { panic!() } - | ^ cannot infer type - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:130:28 - | -LL | fn fn_test11(_: _) -> (_, _) { panic!() } - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:134:30 - | -LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } - | -^--^- - | || | - | || not allowed in type signatures - | |not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:137:33 - | -LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } - | ------^- - | | | - | | not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:156:21 - | -LL | struct BadStruct<_>(_); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | struct BadStruct(T); - | ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations - --> $DIR/typeck_type_placeholder_item.rs:161:15 - | -LL | impl BadTrait<_> for BadStruct<_> {} - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | impl BadTrait for BadStruct {} - | ^^^ ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:164:34 - | -LL | fn impl_trait() -> impl BadTrait<_> { - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:169:25 - | -LL | struct BadStruct1<_, _>(_); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | struct BadStruct1(T); - | ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:174:25 - | -LL | struct BadStruct2<_, T>(_, T); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | struct BadStruct2(U, T); - | ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases - --> $DIR/typeck_type_placeholder_item.rs:178:14 - | -LL | type X = Box<_>; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:184:21 - | -LL | type Y = impl Trait<_>; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:218:31 - | -LL | fn value() -> Option<&'static _> { - | ----------------^- - | | | - | | not allowed in type signatures - | help: replace with the correct return type: `Option<&'static u8>` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:223:10 - | -LL | const _: Option<_> = map(value); - | ^^^^^^^^^ - | | - | not allowed in type signatures - | help: replace with the correct type: `Option` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:142:31 - | -LL | fn method_test1(&self, x: _); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn method_test1(&self, x: T); - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:144:31 - | -LL | fn method_test2(&self, x: _) -> _; - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | fn method_test2(&self, x: T) -> T; - | ^^^ ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:146:31 - | -LL | fn method_test3(&self) -> _; - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn method_test3(&self) -> T; - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:148:26 - | -LL | fn assoc_fn_test1(x: _); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn assoc_fn_test1(x: T); - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:150:26 - | -LL | fn assoc_fn_test2(x: _) -> _; - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | fn assoc_fn_test2(x: T) -> T; - | ^^^ ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:152:28 - | -LL | fn assoc_fn_test3() -> _; - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn assoc_fn_test3() -> T; - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:192:14 - | -LL | type B = _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:194:14 - | -LL | const C: _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:196:14 - | -LL | const D: _ = 42; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:199:26 - | -LL | type F: std::ops::Fn(_); - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:43:24 - | -LL | fn test9(&self) -> _ { () } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `()` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:46:27 - | -LL | fn test10(&self, _x : _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test10(&self, _x : T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:61:24 - | -LL | fn clone(&self) -> _ { Test9 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `Test9` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:64:37 - | -LL | fn clone_from(&mut self, other: _) { *self = Test9; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn clone_from(&mut self, other: T) { *self = Test9; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:109:31 - | -LL | fn fn_test9(&self) -> _ { () } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `()` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:112:34 - | -LL | fn fn_test10(&self, _x : _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test10(&self, _x : T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:117:28 - | -LL | fn clone(&self) -> _ { FnTest9 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `FnTest9` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:120:41 - | -LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn clone_from(&mut self, other: T) { *self = FnTest9; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:203:14 - | -LL | type A = _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:205:14 - | -LL | type B = _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:207:14 - | -LL | const C: _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:210:14 - | -LL | const D: _ = 42; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error: aborting due to 69 previous errors - -Some errors have detailed explanations: E0121, E0282, E0403. -For more information about an error, try `rustc --explain E0121`. diff --git a/src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr b/src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr deleted file mode 100644 index 3427dc0e6221..000000000000 --- a/src/test/ui/typeck/typeck_type_placeholder_item.min_tait.stderr +++ /dev/null @@ -1,638 +0,0 @@ -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:156:18 - | -LL | struct BadStruct<_>(_); - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:159:16 - | -LL | trait BadTrait<_> {} - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:169:19 - | -LL | struct BadStruct1<_, _>(_); - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:169:22 - | -LL | struct BadStruct1<_, _>(_); - | ^ expected identifier, found reserved identifier - -error: expected identifier, found reserved identifier `_` - --> $DIR/typeck_type_placeholder_item.rs:174:19 - | -LL | struct BadStruct2<_, T>(_, T); - | ^ expected identifier, found reserved identifier - -error: associated constant in `impl` without body - --> $DIR/typeck_type_placeholder_item.rs:207:5 - | -LL | const C: _; - | ^^^^^^^^^^- - | | - | help: provide a definition for the constant: `= ;` - -error[E0403]: the name `_` is already used for a generic parameter in this item's generic parameters - --> $DIR/typeck_type_placeholder_item.rs:169:22 - | -LL | struct BadStruct1<_, _>(_); - | - ^ already used - | | - | first use of `_` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:9:14 - | -LL | fn test() -> _ { 5 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:12:16 - | -LL | fn test2() -> (_, _) { (5, 5) } - | -^--^- - | || | - | || not allowed in type signatures - | |not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:15:15 - | -LL | static TEST3: _ = "test"; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `&str` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:18:15 - | -LL | static TEST4: _ = 145; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:21:15 - | -LL | static TEST5: (_, _) = (1, 2); - | ^^^^^^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:24:13 - | -LL | fn test6(_: _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test6(_: T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:27:18 - | -LL | fn test6_b(_: _, _: T) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test6_b(_: U, _: T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:30:30 - | -LL | fn test6_c(_: _, _: (T, K, L, A, B)) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test6_c(_: U, _: (T, K, L, A, B)) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:33:13 - | -LL | fn test7(x: _) { let _x: usize = x; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test7(x: T) { let _x: usize = x; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:36:22 - | -LL | fn test8(_f: fn() -> _) { } - | ^ - | | - | not allowed in type signatures - | help: use type parameters instead: `T` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:36:22 - | -LL | fn test8(_f: fn() -> _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test8(_f: fn() -> T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:50:26 - | -LL | fn test11(x: &usize) -> &_ { - | -^ - | || - | |not allowed in type signatures - | help: replace with the correct return type: `&'static &'static usize` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:55:52 - | -LL | unsafe fn test12(x: *const usize) -> *const *const _ { - | --------------^ - | | | - | | not allowed in type signatures - | help: replace with the correct return type: `*const *const usize` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:69:8 - | -LL | a: _, - | ^ not allowed in type signatures -LL | -LL | b: (_, _), - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | struct Test10 { -LL | a: T, -LL | -LL | b: (T, T), - | - -error: missing type for `static` item - --> $DIR/typeck_type_placeholder_item.rs:75:12 - | -LL | static A = 42; - | ^ help: provide a type for the static variable: `A: i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:77:15 - | -LL | static B: _ = 42; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:79:15 - | -LL | static C: Option<_> = Some(42); - | ^^^^^^^^^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:81:21 - | -LL | fn fn_test() -> _ { 5 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:84:23 - | -LL | fn fn_test2() -> (_, _) { (5, 5) } - | -^--^- - | || | - | || not allowed in type signatures - | |not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:87:22 - | -LL | static FN_TEST3: _ = "test"; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `&str` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:90:22 - | -LL | static FN_TEST4: _ = 145; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables - --> $DIR/typeck_type_placeholder_item.rs:93:22 - | -LL | static FN_TEST5: (_, _) = (1, 2); - | ^^^^^^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:96:20 - | -LL | fn fn_test6(_: _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test6(_: T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:99:20 - | -LL | fn fn_test7(x: _) { let _x: usize = x; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test7(x: T) { let _x: usize = x; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:102:29 - | -LL | fn fn_test8(_f: fn() -> _) { } - | ^ - | | - | not allowed in type signatures - | help: use type parameters instead: `T` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:102:29 - | -LL | fn fn_test8(_f: fn() -> _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test8(_f: fn() -> T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:125:12 - | -LL | a: _, - | ^ not allowed in type signatures -LL | -LL | b: (_, _), - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | struct FnTest10 { -LL | a: T, -LL | -LL | b: (T, T), - | - -error[E0282]: type annotations needed - --> $DIR/typeck_type_placeholder_item.rs:130:18 - | -LL | fn fn_test11(_: _) -> (_, _) { panic!() } - | ^ cannot infer type - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:130:28 - | -LL | fn fn_test11(_: _) -> (_, _) { panic!() } - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:134:30 - | -LL | fn fn_test12(x: i32) -> (_, _) { (x, x) } - | -^--^- - | || | - | || not allowed in type signatures - | |not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:137:33 - | -LL | fn fn_test13(x: _) -> (i32, _) { (x, x) } - | ------^- - | | | - | | not allowed in type signatures - | help: replace with the correct return type: `(i32, i32)` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:156:21 - | -LL | struct BadStruct<_>(_); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | struct BadStruct(T); - | ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for implementations - --> $DIR/typeck_type_placeholder_item.rs:161:15 - | -LL | impl BadTrait<_> for BadStruct<_> {} - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | impl BadTrait for BadStruct {} - | ^^^ ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:164:34 - | -LL | fn impl_trait() -> impl BadTrait<_> { - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:169:25 - | -LL | struct BadStruct1<_, _>(_); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | struct BadStruct1(T); - | ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for structs - --> $DIR/typeck_type_placeholder_item.rs:174:25 - | -LL | struct BadStruct2<_, T>(_, T); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | struct BadStruct2(U, T); - | ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for type aliases - --> $DIR/typeck_type_placeholder_item.rs:178:14 - | -LL | type X = Box<_>; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for opaque types - --> $DIR/typeck_type_placeholder_item.rs:184:21 - | -LL | type Y = impl Trait<_>; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:218:31 - | -LL | fn value() -> Option<&'static _> { - | ----------------^- - | | | - | | not allowed in type signatures - | help: replace with the correct return type: `Option<&'static u8>` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:223:10 - | -LL | const _: Option<_> = map(value); - | ^^^^^^^^^ - | | - | not allowed in type signatures - | help: replace with the correct type: `Option` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:142:31 - | -LL | fn method_test1(&self, x: _); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn method_test1(&self, x: T); - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:144:31 - | -LL | fn method_test2(&self, x: _) -> _; - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | fn method_test2(&self, x: T) -> T; - | ^^^ ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:146:31 - | -LL | fn method_test3(&self) -> _; - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn method_test3(&self) -> T; - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:148:26 - | -LL | fn assoc_fn_test1(x: _); - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn assoc_fn_test1(x: T); - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:150:26 - | -LL | fn assoc_fn_test2(x: _) -> _; - | ^ ^ not allowed in type signatures - | | - | not allowed in type signatures - | -help: use type parameters instead - | -LL | fn assoc_fn_test2(x: T) -> T; - | ^^^ ^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:152:28 - | -LL | fn assoc_fn_test3() -> _; - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn assoc_fn_test3() -> T; - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:192:14 - | -LL | type B = _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:194:14 - | -LL | const C: _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:196:14 - | -LL | const D: _ = 42; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:199:26 - | -LL | type F: std::ops::Fn(_); - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:43:24 - | -LL | fn test9(&self) -> _ { () } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `()` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:46:27 - | -LL | fn test10(&self, _x : _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn test10(&self, _x : T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:61:24 - | -LL | fn clone(&self) -> _ { Test9 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `Test9` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:64:37 - | -LL | fn clone_from(&mut self, other: _) { *self = Test9; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn clone_from(&mut self, other: T) { *self = Test9; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:109:31 - | -LL | fn fn_test9(&self) -> _ { () } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `()` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:112:34 - | -LL | fn fn_test10(&self, _x : _) { } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn fn_test10(&self, _x : T) { } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for return types - --> $DIR/typeck_type_placeholder_item.rs:117:28 - | -LL | fn clone(&self) -> _ { FnTest9 } - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `FnTest9` - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for functions - --> $DIR/typeck_type_placeholder_item.rs:120:41 - | -LL | fn clone_from(&mut self, other: _) { *self = FnTest9; } - | ^ not allowed in type signatures - | -help: use type parameters instead - | -LL | fn clone_from(&mut self, other: T) { *self = FnTest9; } - | ^^^ ^ - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:203:14 - | -LL | type A = _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for associated types - --> $DIR/typeck_type_placeholder_item.rs:205:14 - | -LL | type B = _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:207:14 - | -LL | const C: _; - | ^ not allowed in type signatures - -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants - --> $DIR/typeck_type_placeholder_item.rs:210:14 - | -LL | const D: _ = 42; - | ^ - | | - | not allowed in type signatures - | help: replace with the correct type: `i32` - -error: aborting due to 69 previous errors - -Some errors have detailed explanations: E0121, E0282, E0403. -For more information about an error, try `rustc --explain E0121`. From dbd0fd2c2a6c0c5ea649dfb4d2a1b3d09e725ca0 Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Tue, 27 Jul 2021 22:24:43 +0200 Subject: [PATCH 22/22] Fix ICE in `diagnostic_hir_wf_check` --- .../src/traits/error_reporting/mod.rs | 4 ++-- compiler/rustc_typeck/src/hir_wf_check.rs | 12 +++++++----- src/test/ui/wf/issue-87495.rs | 8 ++++++++ src/test/ui/wf/issue-87495.stderr | 18 ++++++++++++++++++ 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 src/test/ui/wf/issue-87495.rs create mode 100644 src/test/ui/wf/issue-87495.stderr diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index 13a6733fb478..c134af44992d 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -240,8 +240,8 @@ fn report_selection_error( let mut err = match *error { SelectionError::Unimplemented => { - // If this obligation was generated as a result of well-formed checking, see if we - // can get a better error message by performing HIR-based well formed checking. + // If this obligation was generated as a result of well-formedness checking, see if we + // can get a better error message by performing HIR-based well-formedness checking. if let ObligationCauseCode::WellFormed(Some(wf_loc)) = root_obligation.cause.code.peel_derives() { diff --git a/compiler/rustc_typeck/src/hir_wf_check.rs b/compiler/rustc_typeck/src/hir_wf_check.rs index e7503d3d71ce..b7ede0e4bf25 100644 --- a/compiler/rustc_typeck/src/hir_wf_check.rs +++ b/compiler/rustc_typeck/src/hir_wf_check.rs @@ -38,20 +38,20 @@ fn diagnostic_hir_wf_check<'tcx>( // given the type `Option>`, we will check // `Option>`, `MyStruct`, and `u8`. // For each type, we perform a well-formed check, and see if we get - // an erorr that matches our expected predicate. We keep save + // an error that matches our expected predicate. We save // the `ObligationCause` corresponding to the *innermost* type, // which is the most specific type that we can point to. // In general, the different components of an `hir::Ty` may have - // completely differentr spans due to macro invocations. Pointing + // completely different spans due to macro invocations. Pointing // to the most accurate part of the type can be the difference // between a useless span (e.g. the macro invocation site) - // and a useful span (e.g. a user-provided type passed in to the macro). + // and a useful span (e.g. a user-provided type passed into the macro). // // This approach is quite inefficient - we redo a lot of work done // by the normal WF checker. However, this code is run at most once // per reported error - it will have no impact when compilation succeeds, - // and should only have an impact if a very large number of errors are - // displaydd to the user. + // and should only have an impact if a very large number of errors is + // displayed to the user. struct HirWfCheck<'tcx> { tcx: TyCtxt<'tcx>, predicate: ty::Predicate<'tcx>, @@ -126,10 +126,12 @@ fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) { WellFormedLoc::Ty(_) => match hir.get(hir_id) { hir::Node::ImplItem(item) => match item.kind { hir::ImplItemKind::TyAlias(ty) => Some(ty), + hir::ImplItemKind::Const(ty, _) => Some(ty), ref item => bug!("Unexpected ImplItem {:?}", item), }, hir::Node::TraitItem(item) => match item.kind { hir::TraitItemKind::Type(_, ty) => ty, + hir::TraitItemKind::Const(ty, _) => Some(ty), ref item => bug!("Unexpected TraitItem {:?}", item), }, hir::Node::Item(item) => match item.kind { diff --git a/src/test/ui/wf/issue-87495.rs b/src/test/ui/wf/issue-87495.rs new file mode 100644 index 000000000000..5aab7431134b --- /dev/null +++ b/src/test/ui/wf/issue-87495.rs @@ -0,0 +1,8 @@ +// Regression test for the ICE described in #87495. + +trait T { + const CONST: (bool, dyn T); + //~^ ERROR: the trait `T` cannot be made into an object [E0038] +} + +fn main() {} diff --git a/src/test/ui/wf/issue-87495.stderr b/src/test/ui/wf/issue-87495.stderr new file mode 100644 index 000000000000..010200b5ded1 --- /dev/null +++ b/src/test/ui/wf/issue-87495.stderr @@ -0,0 +1,18 @@ +error[E0038]: the trait `T` cannot be made into an object + --> $DIR/issue-87495.rs:4:25 + | +LL | const CONST: (bool, dyn T); + | ^^^^^ `T` cannot be made into an object + | + = help: consider moving `CONST` to another trait +note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit + --> $DIR/issue-87495.rs:4:11 + | +LL | trait T { + | - this trait cannot be made into an object... +LL | const CONST: (bool, dyn T); + | ^^^^^ ...because it contains this associated `const` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0038`.