summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues')
-rw-r--r--tests/ui/issues/issue-10465.stderr2
-rw-r--r--tests/ui/issues/issue-106755.rs2
-rw-r--r--tests/ui/issues/issue-106755.stderr18
-rw-r--r--tests/ui/issues/issue-11709.rs1
-rw-r--r--tests/ui/issues/issue-12511.stderr12
-rw-r--r--tests/ui/issues/issue-17546.stderr16
-rw-r--r--tests/ui/issues/issue-19086.stderr2
-rw-r--r--tests/ui/issues/issue-20162.stderr3
-rw-r--r--tests/ui/issues/issue-20413.stderr34
-rw-r--r--tests/ui/issues/issue-20772.stderr2
-rw-r--r--tests/ui/issues/issue-21160.stderr3
-rw-r--r--tests/ui/issues/issue-27340.rs2
-rw-r--r--tests/ui/issues/issue-27340.stderr2
-rw-r--r--tests/ui/issues/issue-27842.rs5
-rw-r--r--tests/ui/issues/issue-27842.stderr12
-rw-r--r--tests/ui/issues/issue-28433.rs4
-rw-r--r--tests/ui/issues/issue-28433.stderr10
-rw-r--r--tests/ui/issues/issue-28839.rs1
-rw-r--r--tests/ui/issues/issue-3029.rs2
-rw-r--r--tests/ui/issues/issue-35976.unimported.stderr2
-rw-r--r--tests/ui/issues/issue-37534.stderr2
-rw-r--r--tests/ui/issues/issue-38190.rs1
-rw-r--r--tests/ui/issues/issue-39175.stderr2
-rw-r--r--tests/ui/issues/issue-50403.rs2
-rw-r--r--tests/ui/issues/issue-50403.stderr2
-rw-r--r--tests/ui/issues/issue-56175.stderr4
-rw-r--r--tests/ui/issues/issue-59488.stderr20
-rw-r--r--tests/ui/issues/issue-61696.rs66
-rw-r--r--tests/ui/issues/issue-62375.stderr3
-rw-r--r--tests/ui/issues/issue-66667-function-cmp-cycle.rs3
-rw-r--r--tests/ui/issues/issue-66667-function-cmp-cycle.stderr34
-rw-r--r--tests/ui/issues/issue-77919.stderr2
-rw-r--r--tests/ui/issues/issue-9129.rs1
-rw-r--r--tests/ui/issues/issue-98299.stderr2
34 files changed, 122 insertions, 157 deletions
diff --git a/tests/ui/issues/issue-10465.stderr b/tests/ui/issues/issue-10465.stderr
index 0ccf69dc0..1b7b9d590 100644
--- a/tests/ui/issues/issue-10465.stderr
+++ b/tests/ui/issues/issue-10465.stderr
@@ -7,7 +7,7 @@ LL | b.foo();
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use a::A;
+LL + use a::A;
|
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-106755.rs b/tests/ui/issues/issue-106755.rs
index 46ece725f..5eabc3bfb 100644
--- a/tests/ui/issues/issue-106755.rs
+++ b/tests/ui/issues/issue-106755.rs
@@ -15,5 +15,7 @@ impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and nega
unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
impl !Send for TestType<i32> {}
+//~^ WARNING
+//~| WARNING this will change its meaning
fn main() {}
diff --git a/tests/ui/issues/issue-106755.stderr b/tests/ui/issues/issue-106755.stderr
index 543970340..6b3a8427e 100644
--- a/tests/ui/issues/issue-106755.stderr
+++ b/tests/ui/issues/issue-106755.stderr
@@ -16,7 +16,23 @@ LL | unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
LL | unsafe impl<T: 'static> Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `TestType<_>`
-error: aborting due to 2 previous errors
+warning: cross-crate traits with a default impl, like `Send`, should not be specialized
+ --> $DIR/issue-106755.rs:17:1
+ |
+LL | impl !Send for TestType<i32> {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = warning: this will change its meaning in a future release!
+ = note: for more information, see issue #93367 <https://github.com/rust-lang/rust/issues/93367>
+ = note: `i32` is not a generic parameter
+note: try using the same sequence of generic parameters as the struct definition
+ --> $DIR/issue-106755.rs:9:1
+ |
+LL | struct TestType<T>(::std::marker::PhantomData<T>);
+ | ^^^^^^^^^^^^^^^^^^
+ = note: `#[warn(suspicious_auto_trait_impls)]` on by default
+
+error: aborting due to 2 previous errors; 1 warning emitted
Some errors have detailed explanations: E0119, E0751.
For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/issues/issue-11709.rs b/tests/ui/issues/issue-11709.rs
index cb5e3dff3..58424f9e4 100644
--- a/tests/ui/issues/issue-11709.rs
+++ b/tests/ui/issues/issue-11709.rs
@@ -1,6 +1,5 @@
// run-pass
#![allow(dead_code)]
-// ignore-pretty issue #37199
// Don't panic on blocks without results
// There are several tests in this run-pass that raised
diff --git a/tests/ui/issues/issue-12511.stderr b/tests/ui/issues/issue-12511.stderr
index 789a1141c..558aad109 100644
--- a/tests/ui/issues/issue-12511.stderr
+++ b/tests/ui/issues/issue-12511.stderr
@@ -1,20 +1,10 @@
error[E0391]: cycle detected when computing the super predicates of `T1`
- --> $DIR/issue-12511.rs:1:1
- |
-LL | trait T1 : T2 {
- | ^^^^^^^^^^^^^
- |
-note: ...which requires computing the super traits of `T1`...
--> $DIR/issue-12511.rs:1:12
|
LL | trait T1 : T2 {
| ^^
-note: ...which requires computing the super predicates of `T2`...
- --> $DIR/issue-12511.rs:5:1
|
-LL | trait T2 : T1 {
- | ^^^^^^^^^^^^^
-note: ...which requires computing the super traits of `T2`...
+note: ...which requires computing the super predicates of `T2`...
--> $DIR/issue-12511.rs:5:12
|
LL | trait T2 : T1 {
diff --git a/tests/ui/issues/issue-17546.stderr b/tests/ui/issues/issue-17546.stderr
index 81592320a..cf7ed1bbd 100644
--- a/tests/ui/issues/issue-17546.stderr
+++ b/tests/ui/issues/issue-17546.stderr
@@ -24,13 +24,13 @@ LL | fn new() -> Result<foo::MyEnum, String> {
|
help: consider importing one of these items instead
|
-LL | use std::fmt::Result;
+LL + use std::fmt::Result;
|
-LL | use std::io::Result;
+LL + use std::io::Result;
|
-LL | use std::result::Result;
+LL + use std::result::Result;
|
-LL | use std::thread::Result;
+LL + use std::thread::Result;
|
error[E0573]: expected type, found variant `Result`
@@ -41,13 +41,13 @@ LL | fn new() -> Result<foo::MyEnum, String> {
|
help: consider importing one of these items instead
|
-LL | use std::fmt::Result;
+LL + use std::fmt::Result;
|
-LL | use std::io::Result;
+LL + use std::io::Result;
|
-LL | use std::result::Result;
+LL + use std::result::Result;
|
-LL | use std::thread::Result;
+LL + use std::thread::Result;
|
error[E0573]: expected type, found variant `NoResult`
diff --git a/tests/ui/issues/issue-19086.stderr b/tests/ui/issues/issue-19086.stderr
index a3c06a725..90d0bb406 100644
--- a/tests/ui/issues/issue-19086.stderr
+++ b/tests/ui/issues/issue-19086.stderr
@@ -5,7 +5,7 @@ LL | FooB { x: i32, y: i32 }
| ----------------------- `FooB` defined here
...
LL | FooB(a, b) => println!("{} {}", a, b),
- | ^^^^^^^^^^ help: use struct pattern syntax instead: `FooB { x, y }`
+ | ^^^^^^^^^^ help: use struct pattern syntax instead: `FooB { x: a, y: b }`
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-20162.stderr b/tests/ui/issues/issue-20162.stderr
index 1c5b76fbf..ebdf2528f 100644
--- a/tests/ui/issues/issue-20162.stderr
+++ b/tests/ui/issues/issue-20162.stderr
@@ -8,7 +8,8 @@ note: required by a bound in `slice::<impl [T]>::sort`
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
help: consider annotating `X` with `#[derive(Ord)]`
|
-LL | #[derive(Ord)]
+LL + #[derive(Ord)]
+LL | struct X { x: i32 }
|
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-20413.stderr b/tests/ui/issues/issue-20413.stderr
index 202e84631..8891a2678 100644
--- a/tests/ui/issues/issue-20413.stderr
+++ b/tests/ui/issues/issue-20413.stderr
@@ -20,51 +20,51 @@ note: required for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoDa
LL | impl<T> Foo for T where NoData<T>: Foo {
| ^^^ ^ --- unsatisfied trait bound introduced here
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
- = note: 127 redundant requirements hidden
+ = note: 126 redundant requirements hidden
= note: required for `NoData<T>` to implement `Foo`
-error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>: Baz`
+error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>: Bar`
--> $DIR/issue-20413.rs:28:42
|
LL | impl<T> Bar for T where EvenLessData<T>: Baz {
| ^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
-note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>` to implement `Bar`
- --> $DIR/issue-20413.rs:28:9
- |
-LL | impl<T> Bar for T where EvenLessData<T>: Baz {
- | ^^^ ^ --- unsatisfied trait bound introduced here
- = note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>` to implement `Baz`
--> $DIR/issue-20413.rs:35:9
|
LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
| ^^^ ^ --- unsatisfied trait bound introduced here
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
- = note: 126 redundant requirements hidden
+note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>` to implement `Bar`
+ --> $DIR/issue-20413.rs:28:9
+ |
+LL | impl<T> Bar for T where EvenLessData<T>: Baz {
+ | ^^^ ^ --- unsatisfied trait bound introduced here
+ = note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
+ = note: 125 redundant requirements hidden
= note: required for `EvenLessData<T>` to implement `Baz`
-error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>: Bar`
+error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>: Baz`
--> $DIR/issue-20413.rs:35:42
|
LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
| ^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
-note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>` to implement `Baz`
- --> $DIR/issue-20413.rs:35:9
- |
-LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
- | ^^^ ^ --- unsatisfied trait bound introduced here
- = note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>` to implement `Bar`
--> $DIR/issue-20413.rs:28:9
|
LL | impl<T> Bar for T where EvenLessData<T>: Baz {
| ^^^ ^ --- unsatisfied trait bound introduced here
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
- = note: 126 redundant requirements hidden
+note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>` to implement `Baz`
+ --> $DIR/issue-20413.rs:35:9
+ |
+LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
+ | ^^^ ^ --- unsatisfied trait bound introduced here
+ = note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
+ = note: 125 redundant requirements hidden
= note: required for `AlmostNoData<T>` to implement `Bar`
error: aborting due to 4 previous errors
diff --git a/tests/ui/issues/issue-20772.stderr b/tests/ui/issues/issue-20772.stderr
index 22b9f5bd4..416fd8c06 100644
--- a/tests/ui/issues/issue-20772.stderr
+++ b/tests/ui/issues/issue-20772.stderr
@@ -5,7 +5,7 @@ LL | trait T : Iterator<Item=Self::Item>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: ...which immediately requires computing the super traits of `T` with associated type name `Item` again
-note: cycle used when computing the super traits of `T`
+note: cycle used when computing the super predicates of `T`
--> $DIR/issue-20772.rs:1:1
|
LL | trait T : Iterator<Item=Self::Item>
diff --git a/tests/ui/issues/issue-21160.stderr b/tests/ui/issues/issue-21160.stderr
index 266749376..b39a3aad3 100644
--- a/tests/ui/issues/issue-21160.stderr
+++ b/tests/ui/issues/issue-21160.stderr
@@ -9,7 +9,8 @@ LL | struct Foo(Bar);
= note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Bar` with `#[derive(Hash)]`
|
-LL | #[derive(Hash)]
+LL + #[derive(Hash)]
+LL | struct Bar;
|
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-27340.rs b/tests/ui/issues/issue-27340.rs
index 61c77cc1f..aff37d95a 100644
--- a/tests/ui/issues/issue-27340.rs
+++ b/tests/ui/issues/issue-27340.rs
@@ -1,6 +1,6 @@
struct Foo;
#[derive(Copy, Clone)]
-//~^ ERROR the trait `Copy` may not be implemented for this type
+//~^ ERROR the trait `Copy` cannot be implemented for this type
struct Bar(Foo);
fn main() {}
diff --git a/tests/ui/issues/issue-27340.stderr b/tests/ui/issues/issue-27340.stderr
index 40889b866..9caaffd9c 100644
--- a/tests/ui/issues/issue-27340.stderr
+++ b/tests/ui/issues/issue-27340.stderr
@@ -1,4 +1,4 @@
-error[E0204]: the trait `Copy` may not be implemented for this type
+error[E0204]: the trait `Copy` cannot be implemented for this type
--> $DIR/issue-27340.rs:2:10
|
LL | #[derive(Copy, Clone)]
diff --git a/tests/ui/issues/issue-27842.rs b/tests/ui/issues/issue-27842.rs
index 3bcfa1330..060d3b34e 100644
--- a/tests/ui/issues/issue-27842.rs
+++ b/tests/ui/issues/issue-27842.rs
@@ -8,4 +8,9 @@ fn main() {
let i = 0_usize;
let _ = tup[i];
//~^ ERROR cannot index into a value of type
+
+ // the case where the index is out of bounds
+ let tup = (10,);
+ let _ = tup[3];
+ //~^ ERROR cannot index into a value of type
}
diff --git a/tests/ui/issues/issue-27842.stderr b/tests/ui/issues/issue-27842.stderr
index 784666a63..83333aa0c 100644
--- a/tests/ui/issues/issue-27842.stderr
+++ b/tests/ui/issues/issue-27842.stderr
@@ -8,10 +8,20 @@ error[E0608]: cannot index into a value of type `({integer}, {integer}, {integer
--> $DIR/issue-27842.rs:9:13
|
LL | let _ = tup[i];
+ | ^^^^-^
+ | |
+ | cannot access tuple elements at a variable index
+ |
+ = help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
+
+error[E0608]: cannot index into a value of type `({integer},)`
+ --> $DIR/issue-27842.rs:14:13
+ |
+LL | let _ = tup[3];
| ^^^^^^
|
= help: to access tuple elements, use tuple indexing syntax (e.g., `tuple.0`)
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0608`.
diff --git a/tests/ui/issues/issue-28433.rs b/tests/ui/issues/issue-28433.rs
index 8d05c32d5..2298ad240 100644
--- a/tests/ui/issues/issue-28433.rs
+++ b/tests/ui/issues/issue-28433.rs
@@ -1,9 +1,9 @@
enum Bird {
pub Duck,
- //~^ ERROR unnecessary visibility qualifier
+ //~^ ERROR visibility qualifiers are not permitted here
Goose,
pub(crate) Dove
- //~^ ERROR unnecessary visibility qualifier
+ //~^ ERROR visibility qualifiers are not permitted here
}
diff --git a/tests/ui/issues/issue-28433.stderr b/tests/ui/issues/issue-28433.stderr
index 9f5f63336..5fb8a8962 100644
--- a/tests/ui/issues/issue-28433.stderr
+++ b/tests/ui/issues/issue-28433.stderr
@@ -1,14 +1,18 @@
-error[E0449]: unnecessary visibility qualifier
+error[E0449]: visibility qualifiers are not permitted here
--> $DIR/issue-28433.rs:2:5
|
LL | pub Duck,
- | ^^^ `pub` not permitted here because it's implied
+ | ^^^
+ |
+ = note: enum variants and their fields always share the visibility of the enum they are in
-error[E0449]: unnecessary visibility qualifier
+error[E0449]: visibility qualifiers are not permitted here
--> $DIR/issue-28433.rs:5:5
|
LL | pub(crate) Dove
| ^^^^^^^^^^
+ |
+ = note: enum variants and their fields always share the visibility of the enum they are in
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-28839.rs b/tests/ui/issues/issue-28839.rs
index 73be87a0c..c086f412a 100644
--- a/tests/ui/issues/issue-28839.rs
+++ b/tests/ui/issues/issue-28839.rs
@@ -1,5 +1,4 @@
// run-pass
-// ignore-pretty issue #37199
pub struct Foo;
diff --git a/tests/ui/issues/issue-3029.rs b/tests/ui/issues/issue-3029.rs
index a5d30960a..43c8a0a23 100644
--- a/tests/ui/issues/issue-3029.rs
+++ b/tests/ui/issues/issue-3029.rs
@@ -2,9 +2,7 @@
// error-pattern:so long
// ignore-emscripten no processes
-#![allow(unused_allocation)]
#![allow(unreachable_code)]
-#![allow(unused_variables)]
fn main() {
let mut x = Vec::new();
diff --git a/tests/ui/issues/issue-35976.unimported.stderr b/tests/ui/issues/issue-35976.unimported.stderr
index 5d61bb8ea..b31d2a315 100644
--- a/tests/ui/issues/issue-35976.unimported.stderr
+++ b/tests/ui/issues/issue-35976.unimported.stderr
@@ -9,7 +9,7 @@ LL | arg.wait();
|
help: another candidate was found in the following trait, perhaps add a `use` for it:
|
-LL | use private::Future;
+LL + use private::Future;
|
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-37534.stderr b/tests/ui/issues/issue-37534.stderr
index 895479986..7d3dd8800 100644
--- a/tests/ui/issues/issue-37534.stderr
+++ b/tests/ui/issues/issue-37534.stderr
@@ -6,7 +6,7 @@ LL | struct Foo<T: ?Hash> { }
|
help: consider importing this trait instead
|
-LL | use std::hash::Hash;
+LL + use std::hash::Hash;
|
warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
diff --git a/tests/ui/issues/issue-38190.rs b/tests/ui/issues/issue-38190.rs
index cfa0420c8..3bb4c7b98 100644
--- a/tests/ui/issues/issue-38190.rs
+++ b/tests/ui/issues/issue-38190.rs
@@ -1,6 +1,5 @@
// run-pass
// aux-build:issue-38190.rs
-// ignore-pretty issue #37195
#[macro_use]
extern crate issue_38190;
diff --git a/tests/ui/issues/issue-39175.stderr b/tests/ui/issues/issue-39175.stderr
index afceae82e..3a1476ac0 100644
--- a/tests/ui/issues/issue-39175.stderr
+++ b/tests/ui/issues/issue-39175.stderr
@@ -7,7 +7,7 @@ LL | Command::new("echo").arg("hello").exec();
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use std::os::unix::process::CommandExt;
+LL + use std::os::unix::process::CommandExt;
|
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-50403.rs b/tests/ui/issues/issue-50403.rs
index 012057fc2..ab22aff26 100644
--- a/tests/ui/issues/issue-50403.rs
+++ b/tests/ui/issues/issue-50403.rs
@@ -1,5 +1,5 @@
#![feature(concat_idents)]
fn main() {
- let x = concat_idents!(); //~ ERROR concat_idents! takes 1 or more arguments
+ let x = concat_idents!(); //~ ERROR `concat_idents!()` takes 1 or more arguments
}
diff --git a/tests/ui/issues/issue-50403.stderr b/tests/ui/issues/issue-50403.stderr
index a3a2ed044..d50befa5e 100644
--- a/tests/ui/issues/issue-50403.stderr
+++ b/tests/ui/issues/issue-50403.stderr
@@ -1,4 +1,4 @@
-error: concat_idents! takes 1 or more arguments
+error: `concat_idents!()` takes 1 or more arguments
--> $DIR/issue-50403.rs:4:13
|
LL | let x = concat_idents!();
diff --git a/tests/ui/issues/issue-56175.stderr b/tests/ui/issues/issue-56175.stderr
index 013a440ed..1ddee1f48 100644
--- a/tests/ui/issues/issue-56175.stderr
+++ b/tests/ui/issues/issue-56175.stderr
@@ -12,7 +12,7 @@ LL | fn trait_method(&self) {
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use reexported_trait::Trait;
+LL + use reexported_trait::Trait;
|
error[E0599]: no method named `trait_method_b` found for struct `FooStruct` in the current scope
@@ -29,7 +29,7 @@ LL | fn trait_method_b(&self) {
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
-LL | use reexported_trait::TraitBRename;
+LL + use reexported_trait::TraitBRename;
|
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-59488.stderr b/tests/ui/issues/issue-59488.stderr
index d45beefa4..ac8862716 100644
--- a/tests/ui/issues/issue-59488.stderr
+++ b/tests/ui/issues/issue-59488.stderr
@@ -90,16 +90,6 @@ LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
= help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
- = help: the following other types implement trait `Debug`:
- extern "C" fn() -> Ret
- extern "C" fn(A, B) -> Ret
- extern "C" fn(A, B, ...) -> Ret
- extern "C" fn(A, B, C) -> Ret
- extern "C" fn(A, B, C, ...) -> Ret
- extern "C" fn(A, B, C, D) -> Ret
- extern "C" fn(A, B, C, D, ...) -> Ret
- extern "C" fn(A, B, C, D, E) -> Ret
- and 118 others
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
@@ -109,16 +99,6 @@ LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
= help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
- = help: the following other types implement trait `Debug`:
- extern "C" fn() -> Ret
- extern "C" fn(A, B) -> Ret
- extern "C" fn(A, B, ...) -> Ret
- extern "C" fn(A, B, C) -> Ret
- extern "C" fn(A, B, C, ...) -> Ret
- extern "C" fn(A, B, C, D) -> Ret
- extern "C" fn(A, B, C, D, ...) -> Ret
- extern "C" fn(A, B, C, D, E) -> Ret
- and 118 others
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 10 previous errors
diff --git a/tests/ui/issues/issue-61696.rs b/tests/ui/issues/issue-61696.rs
deleted file mode 100644
index dca52927f..000000000
--- a/tests/ui/issues/issue-61696.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-// run-pass
-
-pub enum Infallible {}
-
-// The check that the `bool` field of `V1` is encoding a "niche variant"
-// (i.e. not `V1`, so `V3` or `V4`) used to be mathematically incorrect,
-// causing valid `V1` values to be interpreted as other variants.
-pub enum E1 {
- V1 { f: bool },
- V2 { f: Infallible },
- V3,
- V4,
-}
-
-// Computing the discriminant used to be done using the niche type (here `u8`,
-// from the `bool` field of `V1`), overflowing for variants with large enough
-// indices (`V3` and `V4`), causing them to be interpreted as other variants.
-pub enum E2<X> {
- V1 { f: bool },
-
- /*_00*/ _01(X), _02(X), _03(X), _04(X), _05(X), _06(X), _07(X),
- _08(X), _09(X), _0A(X), _0B(X), _0C(X), _0D(X), _0E(X), _0F(X),
- _10(X), _11(X), _12(X), _13(X), _14(X), _15(X), _16(X), _17(X),
- _18(X), _19(X), _1A(X), _1B(X), _1C(X), _1D(X), _1E(X), _1F(X),
- _20(X), _21(X), _22(X), _23(X), _24(X), _25(X), _26(X), _27(X),
- _28(X), _29(X), _2A(X), _2B(X), _2C(X), _2D(X), _2E(X), _2F(X),
- _30(X), _31(X), _32(X), _33(X), _34(X), _35(X), _36(X), _37(X),
- _38(X), _39(X), _3A(X), _3B(X), _3C(X), _3D(X), _3E(X), _3F(X),
- _40(X), _41(X), _42(X), _43(X), _44(X), _45(X), _46(X), _47(X),
- _48(X), _49(X), _4A(X), _4B(X), _4C(X), _4D(X), _4E(X), _4F(X),
- _50(X), _51(X), _52(X), _53(X), _54(X), _55(X), _56(X), _57(X),
- _58(X), _59(X), _5A(X), _5B(X), _5C(X), _5D(X), _5E(X), _5F(X),
- _60(X), _61(X), _62(X), _63(X), _64(X), _65(X), _66(X), _67(X),
- _68(X), _69(X), _6A(X), _6B(X), _6C(X), _6D(X), _6E(X), _6F(X),
- _70(X), _71(X), _72(X), _73(X), _74(X), _75(X), _76(X), _77(X),
- _78(X), _79(X), _7A(X), _7B(X), _7C(X), _7D(X), _7E(X), _7F(X),
- _80(X), _81(X), _82(X), _83(X), _84(X), _85(X), _86(X), _87(X),
- _88(X), _89(X), _8A(X), _8B(X), _8C(X), _8D(X), _8E(X), _8F(X),
- _90(X), _91(X), _92(X), _93(X), _94(X), _95(X), _96(X), _97(X),
- _98(X), _99(X), _9A(X), _9B(X), _9C(X), _9D(X), _9E(X), _9F(X),
- _A0(X), _A1(X), _A2(X), _A3(X), _A4(X), _A5(X), _A6(X), _A7(X),
- _A8(X), _A9(X), _AA(X), _AB(X), _AC(X), _AD(X), _AE(X), _AF(X),
- _B0(X), _B1(X), _B2(X), _B3(X), _B4(X), _B5(X), _B6(X), _B7(X),
- _B8(X), _B9(X), _BA(X), _BB(X), _BC(X), _BD(X), _BE(X), _BF(X),
- _C0(X), _C1(X), _C2(X), _C3(X), _C4(X), _C5(X), _C6(X), _C7(X),
- _C8(X), _C9(X), _CA(X), _CB(X), _CC(X), _CD(X), _CE(X), _CF(X),
- _D0(X), _D1(X), _D2(X), _D3(X), _D4(X), _D5(X), _D6(X), _D7(X),
- _D8(X), _D9(X), _DA(X), _DB(X), _DC(X), _DD(X), _DE(X), _DF(X),
- _E0(X), _E1(X), _E2(X), _E3(X), _E4(X), _E5(X), _E6(X), _E7(X),
- _E8(X), _E9(X), _EA(X), _EB(X), _EC(X), _ED(X), _EE(X), _EF(X),
- _F0(X), _F1(X), _F2(X), _F3(X), _F4(X), _F5(X), _F6(X), _F7(X),
- _F8(X), _F9(X), _FA(X), _FB(X), _FC(X), _FD(X), _FE(X), _FF(X),
-
- V3,
- V4,
-}
-
-fn main() {
- if let E1::V2 { .. } = (E1::V1 { f: true }) {
- unreachable!()
- }
-
- if let E2::V1 { .. } = E2::V3::<Infallible> {
- unreachable!()
- }
-}
diff --git a/tests/ui/issues/issue-62375.stderr b/tests/ui/issues/issue-62375.stderr
index 478e025be..a6fd3700e 100644
--- a/tests/ui/issues/issue-62375.stderr
+++ b/tests/ui/issues/issue-62375.stderr
@@ -13,7 +13,8 @@ LL | enum A {
| ^^^^^^ must implement `PartialEq<_>`
help: consider annotating `A` with `#[derive(PartialEq)]`
|
-LL | #[derive(PartialEq)]
+LL + #[derive(PartialEq)]
+LL | enum A {
|
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-66667-function-cmp-cycle.rs b/tests/ui/issues/issue-66667-function-cmp-cycle.rs
index 7b025be11..b4f09fbbb 100644
--- a/tests/ui/issues/issue-66667-function-cmp-cycle.rs
+++ b/tests/ui/issues/issue-66667-function-cmp-cycle.rs
@@ -1,16 +1,19 @@
fn first() {
second == 1 //~ ERROR binary operation
//~^ ERROR mismatched types
+ //~| ERROR mismatched types
}
fn second() {
first == 1 //~ ERROR binary operation
//~^ ERROR mismatched types
+ //~| ERROR mismatched types
}
fn bar() {
bar == 1 //~ ERROR binary operation
//~^ ERROR mismatched types
+ //~| ERROR mismatched types
}
fn main() {}
diff --git a/tests/ui/issues/issue-66667-function-cmp-cycle.stderr b/tests/ui/issues/issue-66667-function-cmp-cycle.stderr
index 887699ef5..d9a960ce1 100644
--- a/tests/ui/issues/issue-66667-function-cmp-cycle.stderr
+++ b/tests/ui/issues/issue-66667-function-cmp-cycle.stderr
@@ -15,8 +15,16 @@ LL | second == 1
= note: expected fn item `fn() {second}`
found type `{integer}`
+error[E0308]: mismatched types
+ --> $DIR/issue-66667-function-cmp-cycle.rs:2:5
+ |
+LL | fn first() {
+ | - help: try adding a return type: `-> bool`
+LL | second == 1
+ | ^^^^^^^^^^^ expected `()`, found `bool`
+
error[E0369]: binary operation `==` cannot be applied to type `fn() {first}`
- --> $DIR/issue-66667-function-cmp-cycle.rs:7:11
+ --> $DIR/issue-66667-function-cmp-cycle.rs:8:11
|
LL | first == 1
| ----- ^^ - {integer}
@@ -24,7 +32,7 @@ LL | first == 1
| fn() {first}
error[E0308]: mismatched types
- --> $DIR/issue-66667-function-cmp-cycle.rs:7:14
+ --> $DIR/issue-66667-function-cmp-cycle.rs:8:14
|
LL | first == 1
| ^ expected fn item, found integer
@@ -32,8 +40,16 @@ LL | first == 1
= note: expected fn item `fn() {first}`
found type `{integer}`
+error[E0308]: mismatched types
+ --> $DIR/issue-66667-function-cmp-cycle.rs:8:5
+ |
+LL | fn second() {
+ | - help: try adding a return type: `-> bool`
+LL | first == 1
+ | ^^^^^^^^^^ expected `()`, found `bool`
+
error[E0369]: binary operation `==` cannot be applied to type `fn() {bar}`
- --> $DIR/issue-66667-function-cmp-cycle.rs:12:9
+ --> $DIR/issue-66667-function-cmp-cycle.rs:14:9
|
LL | bar == 1
| --- ^^ - {integer}
@@ -41,7 +57,7 @@ LL | bar == 1
| fn() {bar}
error[E0308]: mismatched types
- --> $DIR/issue-66667-function-cmp-cycle.rs:12:12
+ --> $DIR/issue-66667-function-cmp-cycle.rs:14:12
|
LL | bar == 1
| ^ expected fn item, found integer
@@ -49,7 +65,15 @@ LL | bar == 1
= note: expected fn item `fn() {bar}`
found type `{integer}`
-error: aborting due to 6 previous errors
+error[E0308]: mismatched types
+ --> $DIR/issue-66667-function-cmp-cycle.rs:14:5
+ |
+LL | fn bar() {
+ | - help: try adding a return type: `-> bool`
+LL | bar == 1
+ | ^^^^^^^^ expected `()`, found `bool`
+
+error: aborting due to 9 previous errors
Some errors have detailed explanations: E0308, E0369.
For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-77919.stderr b/tests/ui/issues/issue-77919.stderr
index d154bfe0c..d6dcc8997 100644
--- a/tests/ui/issues/issue-77919.stderr
+++ b/tests/ui/issues/issue-77919.stderr
@@ -6,7 +6,7 @@ LL | _n: PhantomData,
|
help: consider importing this struct
|
-LL | use std::marker::PhantomData;
+LL + use std::marker::PhantomData;
|
error[E0412]: cannot find type `VAL` in this scope
diff --git a/tests/ui/issues/issue-9129.rs b/tests/ui/issues/issue-9129.rs
index 04110b3ae..5d623ed54 100644
--- a/tests/ui/issues/issue-9129.rs
+++ b/tests/ui/issues/issue-9129.rs
@@ -2,7 +2,6 @@
#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
-// ignore-pretty unreported
pub trait bomb { fn boom(&self, _: Ident); }
pub struct S;
diff --git a/tests/ui/issues/issue-98299.stderr b/tests/ui/issues/issue-98299.stderr
index fd905392a..4fd9f3030 100644
--- a/tests/ui/issues/issue-98299.stderr
+++ b/tests/ui/issues/issue-98299.stderr
@@ -4,7 +4,7 @@ error[E0282]: type annotations needed for `SmallCString<N>`
LL | SmallCString::try_from(p).map(|cstr| cstr);
| ^^^^
|
-help: consider giving this closure parameter an explicit type, where the the value of const parameter `N` is specified
+help: consider giving this closure parameter an explicit type, where the value of const parameter `N` is specified
|
LL | SmallCString::try_from(p).map(|cstr: SmallCString<N>| cstr);
| +++++++++++++++++