summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
commitcec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch)
tree47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /tests/ui/issues
parentAdding debian version 1.74.1+dfsg1-1. (diff)
downloadrustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz
rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/issues')
-rw-r--r--tests/ui/issues/issue-12187-1.stderr4
-rw-r--r--tests/ui/issues/issue-12187-2.stderr4
-rw-r--r--tests/ui/issues/issue-12567.stderr12
-rw-r--r--tests/ui/issues/issue-16966.stderr13
-rw-r--r--tests/ui/issues/issue-17551.stderr2
-rw-r--r--tests/ui/issues/issue-19380.rs1
-rw-r--r--tests/ui/issues/issue-19380.stderr27
-rw-r--r--tests/ui/issues/issue-19482.rs2
-rw-r--r--tests/ui/issues/issue-19482.stderr2
-rw-r--r--tests/ui/issues/issue-20225.stderr6
-rw-r--r--tests/ui/issues/issue-21950.stderr2
-rw-r--r--tests/ui/issues/issue-22034.rs2
-rw-r--r--tests/ui/issues/issue-22034.stderr4
-rw-r--r--tests/ui/issues/issue-22434.rs2
-rw-r--r--tests/ui/issues/issue-22434.stderr2
-rw-r--r--tests/ui/issues/issue-23024.rs2
-rw-r--r--tests/ui/issues/issue-23024.stderr2
-rw-r--r--tests/ui/issues/issue-23966.stderr4
-rw-r--r--tests/ui/issues/issue-24036.stderr9
-rw-r--r--tests/ui/issues/issue-24446.rs2
-rw-r--r--tests/ui/issues/issue-24446.stderr49
-rw-r--r--tests/ui/issues/issue-28344.stderr4
-rw-r--r--tests/ui/issues/issue-33571.stderr1
-rw-r--r--tests/ui/issues/issue-34334.stderr3
-rw-r--r--tests/ui/issues/issue-37534.rs6
-rw-r--r--tests/ui/issues/issue-37534.stderr12
-rw-r--r--tests/ui/issues/issue-40000.stderr1
-rw-r--r--tests/ui/issues/issue-43355.stderr2
-rw-r--r--tests/ui/issues/issue-45801.stderr1
-rw-r--r--tests/ui/issues/issue-46101.stderr2
-rw-r--r--tests/ui/issues/issue-47715.rs8
-rw-r--r--tests/ui/issues/issue-47715.stderr8
-rw-r--r--tests/ui/issues/issue-51154.stderr2
-rw-r--r--tests/ui/issues/issue-53251.stderr1
-rw-r--r--tests/ui/issues/issue-59494.rs2
-rw-r--r--tests/ui/issues/issue-59494.stderr4
-rw-r--r--tests/ui/issues/issue-66667-function-cmp-cycle.stderr6
-rw-r--r--tests/ui/issues/issue-66923-show-error-for-correct-call.stderr6
-rw-r--r--tests/ui/issues/issue-69306.stderr12
-rw-r--r--tests/ui/issues/issue-77919.rs2
-rw-r--r--tests/ui/issues/issue-77919.stderr2
-rw-r--r--tests/ui/issues/issue-87199.rs6
-rw-r--r--tests/ui/issues/issue-87199.stderr18
43 files changed, 170 insertions, 92 deletions
diff --git a/tests/ui/issues/issue-12187-1.stderr b/tests/ui/issues/issue-12187-1.stderr
index 806b7f0ac..d2a6a9608 100644
--- a/tests/ui/issues/issue-12187-1.stderr
+++ b/tests/ui/issues/issue-12187-1.stderr
@@ -2,9 +2,9 @@ error[E0282]: type annotations needed for `&T`
--> $DIR/issue-12187-1.rs:6:9
|
LL | let &v = new();
- | ^^
+ | ^^ ----- type must be known at this point
|
-help: consider giving this pattern a type, where the placeholders `_` are specified
+help: consider giving this pattern a type, where the type for type parameter `T` is specified
|
LL | let &v: &T = new();
| ++++
diff --git a/tests/ui/issues/issue-12187-2.stderr b/tests/ui/issues/issue-12187-2.stderr
index a1fa0a2b0..ac75ebb42 100644
--- a/tests/ui/issues/issue-12187-2.stderr
+++ b/tests/ui/issues/issue-12187-2.stderr
@@ -2,9 +2,9 @@ error[E0282]: type annotations needed for `&T`
--> $DIR/issue-12187-2.rs:6:9
|
LL | let &v = new();
- | ^^
+ | ^^ ----- type must be known at this point
|
-help: consider giving this pattern a type, where the placeholders `_` are specified
+help: consider giving this pattern a type, where the type for type parameter `T` is specified
|
LL | let &v: &T = new();
| ++++
diff --git a/tests/ui/issues/issue-12567.stderr b/tests/ui/issues/issue-12567.stderr
index 7fa06825f..3f95f18a9 100644
--- a/tests/ui/issues/issue-12567.stderr
+++ b/tests/ui/issues/issue-12567.stderr
@@ -8,7 +8,7 @@ LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
| -- data moved here
LL | => println!("one empty"),
LL | (&[hd1, ..], &[hd2, ..])
- | --- ...and here
+ | --- ...and here
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
help: consider borrowing the pattern binding
@@ -17,8 +17,8 @@ LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
| +++
help: consider borrowing the pattern binding
|
-LL | (&[ref hd1, ..], &[hd2, ..])
- | +++
+LL | (&[hd1, ..], &[ref hd2, ..])
+ | +++
error[E0508]: cannot move out of type `[T]`, a non-copy slice
--> $DIR/issue-12567.rs:2:11
@@ -30,7 +30,7 @@ LL | (&[], &[hd, ..]) | (&[hd, ..], &[])
| -- data moved here
LL | => println!("one empty"),
LL | (&[hd1, ..], &[hd2, ..])
- | --- ...and here
+ | --- ...and here
|
= note: move occurs because these variables have types that don't implement the `Copy` trait
help: consider borrowing the pattern binding
@@ -39,8 +39,8 @@ LL | (&[], &[ref hd, ..]) | (&[hd, ..], &[])
| +++
help: consider borrowing the pattern binding
|
-LL | (&[hd1, ..], &[ref hd2, ..])
- | +++
+LL | (&[ref hd1, ..], &[hd2, ..])
+ | +++
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-16966.stderr b/tests/ui/issues/issue-16966.stderr
index 8c92505b5..c53707c5d 100644
--- a/tests/ui/issues/issue-16966.stderr
+++ b/tests/ui/issues/issue-16966.stderr
@@ -1,9 +1,16 @@
-error[E0282]: type annotations needed
+error[E0283]: type annotations needed
--> $DIR/issue-16966.rs:2:12
|
LL | panic!(std::default::Default::default());
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
+ | -------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
+ | | |
+ | | cannot infer type
+ | required by a bound introduced by this call
+ |
+ = note: cannot satisfy `_: Any`
+note: required by a bound in `begin_panic`
+ --> $SRC_DIR/std/src/panicking.rs:LL:COL
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0282`.
+For more information about this error, try `rustc --explain E0283`.
diff --git a/tests/ui/issues/issue-17551.stderr b/tests/ui/issues/issue-17551.stderr
index 5f45a2f84..3a8f569a3 100644
--- a/tests/ui/issues/issue-17551.stderr
+++ b/tests/ui/issues/issue-17551.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed for `B<T>`
--> $DIR/issue-17551.rs:6:9
|
LL | let foo = B(marker::PhantomData);
- | ^^^
+ | ^^^ ------------------- type must be known at this point
|
help: consider giving `foo` an explicit type, where the type for type parameter `T` is specified
|
diff --git a/tests/ui/issues/issue-19380.rs b/tests/ui/issues/issue-19380.rs
index 5c10e2067..fce737cba 100644
--- a/tests/ui/issues/issue-19380.rs
+++ b/tests/ui/issues/issue-19380.rs
@@ -14,5 +14,6 @@ struct Bar {
const FOO : Foo = Foo;
const BAR : Bar = Bar { foos: &[&FOO]};
+//~^ ERROR E0038
fn main() { }
diff --git a/tests/ui/issues/issue-19380.stderr b/tests/ui/issues/issue-19380.stderr
index b2aeb5edf..f6244d9d4 100644
--- a/tests/ui/issues/issue-19380.stderr
+++ b/tests/ui/issues/issue-19380.stderr
@@ -11,6 +11,7 @@ LL | trait Qiz {
| --- this trait cannot be made into an object...
LL | fn qiz();
| ^^^ ...because associated function `qiz` has no `self` parameter
+ = help: only type `Foo` implements the trait, consider using it directly instead
help: consider turning `qiz` into a method by giving it a `&self` argument
|
LL | fn qiz(&self);
@@ -20,6 +21,30 @@ help: alternatively, consider constraining `qiz` so it does not apply to trait o
LL | fn qiz() where Self: Sized;
| +++++++++++++++++
-error: aborting due to previous error
+error[E0038]: the trait `Qiz` cannot be made into an object
+ --> $DIR/issue-19380.rs:16:33
+ |
+LL | const BAR : Bar = Bar { foos: &[&FOO]};
+ | ^^^^ `Qiz` cannot be made into an object
+ |
+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 <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+ --> $DIR/issue-19380.rs:2:6
+ |
+LL | trait Qiz {
+ | --- this trait cannot be made into an object...
+LL | fn qiz();
+ | ^^^ ...because associated function `qiz` has no `self` parameter
+ = help: only type `Foo` implements the trait, consider using it directly instead
+ = note: required for the cast from `&Foo` to `&'static (dyn Qiz + 'static)`
+help: consider turning `qiz` into a method by giving it a `&self` argument
+ |
+LL | fn qiz(&self);
+ | +++++
+help: alternatively, consider constraining `qiz` so it does not apply to trait objects
+ |
+LL | fn qiz() where Self: Sized;
+ | +++++++++++++++++
+
+error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-19482.rs b/tests/ui/issues/issue-19482.rs
index 3f3c5de9b..9d0c8d96d 100644
--- a/tests/ui/issues/issue-19482.rs
+++ b/tests/ui/issues/issue-19482.rs
@@ -8,6 +8,6 @@ trait Foo {
}
fn bar(x: &dyn Foo) {}
-//~^ ERROR the associated type `A` (from trait `Foo`) must be specified
+//~^ ERROR the associated type `A` in `Foo` must be specified
pub fn main() {}
diff --git a/tests/ui/issues/issue-19482.stderr b/tests/ui/issues/issue-19482.stderr
index d51cc1f08..90e6f7995 100644
--- a/tests/ui/issues/issue-19482.stderr
+++ b/tests/ui/issues/issue-19482.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `A` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `A` in `Foo` must be specified
--> $DIR/issue-19482.rs:10:16
|
LL | type A;
diff --git a/tests/ui/issues/issue-20225.stderr b/tests/ui/issues/issue-20225.stderr
index b1c156720..b34aa8e1f 100644
--- a/tests/ui/issues/issue-20225.stderr
+++ b/tests/ui/issues/issue-20225.stderr
@@ -2,7 +2,7 @@ error[E0053]: method `call` has an incompatible type for trait
--> $DIR/issue-20225.rs:6:43
|
LL | impl<'a, T> Fn<(&'a T,)> for Foo {
- | - this type parameter
+ | - found this type parameter
LL | extern "rust-call" fn call(&self, (_,): (T,)) {}
| ^^^^
| |
@@ -16,7 +16,7 @@ error[E0053]: method `call_mut` has an incompatible type for trait
--> $DIR/issue-20225.rs:11:51
|
LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
- | - this type parameter
+ | - found this type parameter
LL | extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
| ^^^^
| |
@@ -30,7 +30,7 @@ error[E0053]: method `call_once` has an incompatible type for trait
--> $DIR/issue-20225.rs:18:47
|
LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
- | - this type parameter
+ | - found this type parameter
...
LL | extern "rust-call" fn call_once(self, (_,): (T,)) {}
| ^^^^
diff --git a/tests/ui/issues/issue-21950.stderr b/tests/ui/issues/issue-21950.stderr
index 731615a6b..e498565d4 100644
--- a/tests/ui/issues/issue-21950.stderr
+++ b/tests/ui/issues/issue-21950.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Output` (from trait `Add`) must be specified
+error[E0191]: the value of the associated type `Output` in `Add` must be specified
--> $DIR/issue-21950.rs:10:25
|
LL | type Output;
diff --git a/tests/ui/issues/issue-22034.rs b/tests/ui/issues/issue-22034.rs
index 405ffd089..ed741779f 100644
--- a/tests/ui/issues/issue-22034.rs
+++ b/tests/ui/issues/issue-22034.rs
@@ -6,6 +6,6 @@ fn main() {
let ptr: *mut () = core::ptr::null_mut();
let _: &mut dyn Fn() = unsafe {
&mut *(ptr as *mut dyn Fn())
- //~^ ERROR expected a `Fn<()>` closure, found `()`
+ //~^ ERROR expected a `Fn()` closure, found `()`
};
}
diff --git a/tests/ui/issues/issue-22034.stderr b/tests/ui/issues/issue-22034.stderr
index 9833e559c..d64b02409 100644
--- a/tests/ui/issues/issue-22034.stderr
+++ b/tests/ui/issues/issue-22034.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `()`
+error[E0277]: expected a `Fn()` closure, found `()`
--> $DIR/issue-22034.rs:8:16
|
LL | &mut *(ptr as *mut dyn Fn())
- | ^^^ expected an `Fn<()>` closure, found `()`
+ | ^^^ expected an `Fn()` closure, found `()`
|
= help: the trait `Fn<()>` is not implemented for `()`
= note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
diff --git a/tests/ui/issues/issue-22434.rs b/tests/ui/issues/issue-22434.rs
index 34057b46e..d9f7b987c 100644
--- a/tests/ui/issues/issue-22434.rs
+++ b/tests/ui/issues/issue-22434.rs
@@ -3,6 +3,6 @@ pub trait Foo {
}
type I<'a> = &'a (dyn Foo + 'a);
-//~^ ERROR the value of the associated type `A` (from trait `Foo`) must be specified
+//~^ ERROR the value of the associated type `A` in `Foo` must be specified
fn main() {}
diff --git a/tests/ui/issues/issue-22434.stderr b/tests/ui/issues/issue-22434.stderr
index b97fa2503..dab62bcbb 100644
--- a/tests/ui/issues/issue-22434.stderr
+++ b/tests/ui/issues/issue-22434.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `A` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `A` in `Foo` must be specified
--> $DIR/issue-22434.rs:5:23
|
LL | type A;
diff --git a/tests/ui/issues/issue-23024.rs b/tests/ui/issues/issue-23024.rs
index 010281ee3..25220dc3e 100644
--- a/tests/ui/issues/issue-23024.rs
+++ b/tests/ui/issues/issue-23024.rs
@@ -8,5 +8,5 @@ fn main()
println!("{:?}",(vfnfer[0] as dyn Fn)(3));
//~^ ERROR the precise format of `Fn`-family traits'
//~| ERROR missing generics for trait `Fn`
- //~| ERROR the value of the associated type `Output` (from trait `FnOnce`)
+ //~| ERROR the value of the associated type `Output` in `FnOnce`
}
diff --git a/tests/ui/issues/issue-23024.stderr b/tests/ui/issues/issue-23024.stderr
index 2c325ffcc..7d187de1b 100644
--- a/tests/ui/issues/issue-23024.stderr
+++ b/tests/ui/issues/issue-23024.stderr
@@ -18,7 +18,7 @@ help: add missing generic argument
LL | println!("{:?}",(vfnfer[0] as dyn Fn<Args>)(3));
| ++++++
-error[E0191]: the value of the associated type `Output` (from trait `FnOnce`) must be specified
+error[E0191]: the value of the associated type `Output` in `FnOnce` must be specified
--> $DIR/issue-23024.rs:8:39
|
LL | println!("{:?}",(vfnfer[0] as dyn Fn)(3));
diff --git a/tests/ui/issues/issue-23966.stderr b/tests/ui/issues/issue-23966.stderr
index 8f934481d..542aed0eb 100644
--- a/tests/ui/issues/issue-23966.stderr
+++ b/tests/ui/issues/issue-23966.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `FnMut<(_, char)>` closure, found `()`
+error[E0277]: expected a `FnMut(_, char)` closure, found `()`
--> $DIR/issue-23966.rs:2:32
|
LL | "".chars().fold(|_, _| (), ());
- | ---- ^^ expected an `FnMut<(_, char)>` closure, found `()`
+ | ---- ^^ expected an `FnMut(_, char)` closure, found `()`
| |
| required by a bound introduced by this call
|
diff --git a/tests/ui/issues/issue-24036.stderr b/tests/ui/issues/issue-24036.stderr
index a425816cd..184383b73 100644
--- a/tests/ui/issues/issue-24036.stderr
+++ b/tests/ui/issues/issue-24036.stderr
@@ -11,12 +11,13 @@ LL | x = |c| c + 1;
= note: no two closures, even if identical, have the same type
= help: consider boxing your closure and/or using it as a trait object
-error[E0282]: type annotations needed
+error[E0284]: type annotations needed
--> $DIR/issue-24036.rs:9:15
|
LL | 1 => |c| c + 1,
- | ^
+ | ^ - type must be known at this point
|
+ = note: cannot satisfy `<_ as Add<i32>>::Output == _`
help: consider giving this closure parameter an explicit type
|
LL | 1 => |c: /* Type */| c + 1,
@@ -24,5 +25,5 @@ LL | 1 => |c: /* Type */| c + 1,
error: aborting due to 2 previous errors
-Some errors have detailed explanations: E0282, E0308.
-For more information about an error, try `rustc --explain E0282`.
+Some errors have detailed explanations: E0284, E0308.
+For more information about an error, try `rustc --explain E0284`.
diff --git a/tests/ui/issues/issue-24446.rs b/tests/ui/issues/issue-24446.rs
index 9ab952ade..6cf884650 100644
--- a/tests/ui/issues/issue-24446.rs
+++ b/tests/ui/issues/issue-24446.rs
@@ -2,6 +2,8 @@ fn main() {
static foo: dyn Fn() -> u32 = || -> u32 {
//~^ ERROR the size for values of type
//~| ERROR cannot be shared between threads safely
+ //~| ERROR the size for values of type
+ //~| ERROR mismatched types
0
};
}
diff --git a/tests/ui/issues/issue-24446.stderr b/tests/ui/issues/issue-24446.stderr
index 4afb87c48..9c206e5ef 100644
--- a/tests/ui/issues/issue-24446.stderr
+++ b/tests/ui/issues/issue-24446.stderr
@@ -1,3 +1,12 @@
+error[E0277]: `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely
+ --> $DIR/issue-24446.rs:2:17
+ |
+LL | static foo: dyn Fn() -> u32 = || -> u32 {
+ | ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely
+ |
+ = help: the trait `Sync` is not implemented for `(dyn Fn() -> u32 + 'static)`
+ = note: shared static variables must have a type that implements `Sync`
+
error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time
--> $DIR/issue-24446.rs:2:17
|
@@ -6,15 +15,39 @@ LL | static foo: dyn Fn() -> u32 = || -> u32 {
|
= help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)`
-error[E0277]: `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely
- --> $DIR/issue-24446.rs:2:17
+error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time
+ --> $DIR/issue-24446.rs:2:35
|
-LL | static foo: dyn Fn() -> u32 = || -> u32 {
- | ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely
+LL | static foo: dyn Fn() -> u32 = || -> u32 {
+ | ___________________________________^
+LL | |
+LL | |
+LL | |
+LL | |
+LL | | 0
+LL | | };
+ | |_____^ doesn't have a size known at compile-time
|
- = help: the trait `Sync` is not implemented for `(dyn Fn() -> u32 + 'static)`
- = note: shared static variables must have a type that implements `Sync`
+ = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)`
+ = note: constant expressions must have a statically known size
+
+error[E0308]: mismatched types
+ --> $DIR/issue-24446.rs:2:35
+ |
+LL | static foo: dyn Fn() -> u32 = || -> u32 {
+ | ___________________________________^
+LL | |
+LL | |
+LL | |
+LL | |
+LL | | 0
+LL | | };
+ | |_____^ expected `dyn Fn`, found closure
+ |
+ = note: expected trait object `(dyn Fn() -> u32 + 'static)`
+ found closure `{closure@$DIR/issue-24446.rs:2:35: 2:44}`
-error: aborting due to 2 previous errors
+error: aborting due to 4 previous errors
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-28344.stderr b/tests/ui/issues/issue-28344.stderr
index f398a5da3..71d642109 100644
--- a/tests/ui/issues/issue-28344.stderr
+++ b/tests/ui/issues/issue-28344.stderr
@@ -12,7 +12,7 @@ help: use `dyn`
LL | let x: u8 = <dyn BitXor>::bitor(0 as u8, 0 as u8);
| ++++ +
-error[E0191]: the value of the associated type `Output` (from trait `BitXor`) must be specified
+error[E0191]: the value of the associated type `Output` in `BitXor` must be specified
--> $DIR/issue-28344.rs:4:17
|
LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
@@ -40,7 +40,7 @@ help: use `dyn`
LL | let g = <dyn BitXor>::bitor;
| ++++ +
-error[E0191]: the value of the associated type `Output` (from trait `BitXor`) must be specified
+error[E0191]: the value of the associated type `Output` in `BitXor` must be specified
--> $DIR/issue-28344.rs:10:13
|
LL | let g = BitXor::bitor;
diff --git a/tests/ui/issues/issue-33571.stderr b/tests/ui/issues/issue-33571.stderr
index 2a9ba5ba7..819a533dd 100644
--- a/tests/ui/issues/issue-33571.stderr
+++ b/tests/ui/issues/issue-33571.stderr
@@ -21,6 +21,7 @@ note: unsafe traits like `Sync` should be implemented explicitly
|
LL | Sync,
| ^^^^
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-34334.stderr b/tests/ui/issues/issue-34334.stderr
index 9d2c315e4..753942dd1 100644
--- a/tests/ui/issues/issue-34334.stderr
+++ b/tests/ui/issues/issue-34334.stderr
@@ -19,7 +19,8 @@ LL | let sr2: Vec<(u32, _, _)> = sr.iter().map(|(faction, th_sender, th_rece
| ^^^^^^^ value of type `Vec<(u32, _, _)>` cannot be built from `std::iter::Iterator<Item=()>`
|
= help: the trait `FromIterator<()>` is not implemented for `Vec<(u32, _, _)>`
- = help: the trait `FromIterator<T>` is implemented for `Vec<T>`
+ = help: the trait `FromIterator<(u32, _, _)>` is implemented for `Vec<(u32, _, _)>`
+ = help: for that trait implementation, expected `(u32, _, _)`, found `()`
note: the method call chain might not have had the expected associated types
--> $DIR/issue-34334.rs:5:43
|
diff --git a/tests/ui/issues/issue-37534.rs b/tests/ui/issues/issue-37534.rs
index 1e67e9a81..40f7186db 100644
--- a/tests/ui/issues/issue-37534.rs
+++ b/tests/ui/issues/issue-37534.rs
@@ -1,6 +1,6 @@
-struct Foo<T: ?Hash> { }
+struct Foo<T: ?Hash> {}
//~^ ERROR expected trait, found derive macro `Hash`
//~^^ ERROR parameter `T` is never used
-//~^^^ WARN default bound relaxed for a type parameter, but this does nothing
+//~^^^ WARN relaxing a default bound only does something for `?Sized`
-fn main() { }
+fn main() {}
diff --git a/tests/ui/issues/issue-37534.stderr b/tests/ui/issues/issue-37534.stderr
index 7d3dd8800..03fea2c16 100644
--- a/tests/ui/issues/issue-37534.stderr
+++ b/tests/ui/issues/issue-37534.stderr
@@ -1,7 +1,7 @@
error[E0404]: expected trait, found derive macro `Hash`
--> $DIR/issue-37534.rs:1:16
|
-LL | struct Foo<T: ?Hash> { }
+LL | struct Foo<T: ?Hash> {}
| ^^^^ not a trait
|
help: consider importing this trait instead
@@ -9,16 +9,16 @@ help: consider importing this trait instead
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
- --> $DIR/issue-37534.rs:1:12
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+ --> $DIR/issue-37534.rs:1:15
|
-LL | struct Foo<T: ?Hash> { }
- | ^
+LL | struct Foo<T: ?Hash> {}
+ | ^^^^^
error[E0392]: parameter `T` is never used
--> $DIR/issue-37534.rs:1:12
|
-LL | struct Foo<T: ?Hash> { }
+LL | struct Foo<T: ?Hash> {}
| ^ unused parameter
|
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
diff --git a/tests/ui/issues/issue-40000.stderr b/tests/ui/issues/issue-40000.stderr
index c41fbb9d2..0737a9610 100644
--- a/tests/ui/issues/issue-40000.stderr
+++ b/tests/ui/issues/issue-40000.stderr
@@ -15,6 +15,7 @@ LL | foo(bar);
|
= note: expected trait object `dyn for<'a> Fn(&'a i32)`
found trait object `dyn Fn(&i32)`
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-43355.stderr b/tests/ui/issues/issue-43355.stderr
index 57adc8ad5..9aeca8efe 100644
--- a/tests/ui/issues/issue-43355.stderr
+++ b/tests/ui/issues/issue-43355.stderr
@@ -2,7 +2,7 @@ error[E0119]: conflicting implementations of trait `Trait1<Box<_>>` for type `A`
--> $DIR/issue-43355.rs:13:1
|
LL | impl<X, T> Trait1<X> for T where T: Trait2<X> {
- | -------------------------- first implementation here
+ | --------------------------------------------- first implementation here
...
LL | impl<X> Trait1<Box<X>> for A {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `A`
diff --git a/tests/ui/issues/issue-45801.stderr b/tests/ui/issues/issue-45801.stderr
index 8967f49df..e651e2a68 100644
--- a/tests/ui/issues/issue-45801.stderr
+++ b/tests/ui/issues/issue-45801.stderr
@@ -5,6 +5,7 @@ LL | req.get_ref::<Params>();
| ^^^^^^^ the trait `Plugin<i32>` is not implemented for `Params`
|
= help: the trait `Plugin<Foo>` is implemented for `Params`
+ = help: for that trait implementation, expected `Foo`, found `i32`
error: aborting due to previous error
diff --git a/tests/ui/issues/issue-46101.stderr b/tests/ui/issues/issue-46101.stderr
index 40295b8a1..a0cdd5d5f 100644
--- a/tests/ui/issues/issue-46101.stderr
+++ b/tests/ui/issues/issue-46101.stderr
@@ -9,6 +9,8 @@ error[E0433]: failed to resolve: partially resolved path in a derive macro
|
LL | #[derive(Foo::Anything)]
| ^^^^^^^^^^^^^ partially resolved path in a derive macro
+ |
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-47715.rs b/tests/ui/issues/issue-47715.rs
index b8088c18d..0a770593b 100644
--- a/tests/ui/issues/issue-47715.rs
+++ b/tests/ui/issues/issue-47715.rs
@@ -7,22 +7,22 @@ trait Iterable {
}
struct Container<T: Iterable<Item = impl Foo>> {
- //~^ ERROR `impl Trait` only allowed in function and inherent method return types
+ //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
field: T
}
enum Enum<T: Iterable<Item = impl Foo>> {
- //~^ ERROR `impl Trait` only allowed in function and inherent method return types
+ //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
A(T),
}
union Union<T: Iterable<Item = impl Foo> + Copy> {
- //~^ ERROR `impl Trait` only allowed in function and inherent method return types
+ //~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
x: T,
}
type Type<T: Iterable<Item = impl Foo>> = T;
-//~^ ERROR `impl Trait` only allowed in function and inherent method return types
+//~^ ERROR `impl Trait` only allowed in function and inherent method argument and return types
fn main() {
}
diff --git a/tests/ui/issues/issue-47715.stderr b/tests/ui/issues/issue-47715.stderr
index dadea34b6..2ded98781 100644
--- a/tests/ui/issues/issue-47715.stderr
+++ b/tests/ui/issues/issue-47715.stderr
@@ -1,22 +1,22 @@
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generics
+error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
--> $DIR/issue-47715.rs:9:37
|
LL | struct Container<T: Iterable<Item = impl Foo>> {
| ^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generics
+error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
--> $DIR/issue-47715.rs:14:30
|
LL | enum Enum<T: Iterable<Item = impl Foo>> {
| ^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generics
+error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
--> $DIR/issue-47715.rs:19:32
|
LL | union Union<T: Iterable<Item = impl Foo> + Copy> {
| ^^^^^^^^
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in generics
+error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in generics
--> $DIR/issue-47715.rs:24:30
|
LL | type Type<T: Iterable<Item = impl Foo>> = T;
diff --git a/tests/ui/issues/issue-51154.stderr b/tests/ui/issues/issue-51154.stderr
index 002d5ccdc..5ae8e0678 100644
--- a/tests/ui/issues/issue-51154.stderr
+++ b/tests/ui/issues/issue-51154.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/issue-51154.rs:2:30
|
LL | fn foo<F: FnMut()>() {
- | - this type parameter
+ | - expected this type parameter
LL | let _: Box<F> = Box::new(|| ());
| -------- ^^^^^ expected type parameter `F`, found closure
| |
diff --git a/tests/ui/issues/issue-53251.stderr b/tests/ui/issues/issue-53251.stderr
index d5f14e8de..05ea63115 100644
--- a/tests/ui/issues/issue-53251.stderr
+++ b/tests/ui/issues/issue-53251.stderr
@@ -32,6 +32,7 @@ note: associated function defined here, with 0 generic parameters
|
LL | fn f() {}
| ^
+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
= note: this error originates in the macro `impl_add` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
diff --git a/tests/ui/issues/issue-59494.rs b/tests/ui/issues/issue-59494.rs
index a53e28f72..8dcdd88c6 100644
--- a/tests/ui/issues/issue-59494.rs
+++ b/tests/ui/issues/issue-59494.rs
@@ -19,5 +19,5 @@ fn main() {
let g = |(a, _)| a;
let t7 = |env| |a| |b| t7p(f, g)(((env, a), b));
let t8 = t8n(t7, t7p(f, g));
- //~^ ERROR: expected a `Fn<(_,)>` closure, found `impl Fn(((_, _), _))` [E0277]
+ //~^ ERROR: expected a `Fn(_)` closure, found `impl Fn(((_, _), _))` [E0277]
}
diff --git a/tests/ui/issues/issue-59494.stderr b/tests/ui/issues/issue-59494.stderr
index a9284535e..e9a4bf967 100644
--- a/tests/ui/issues/issue-59494.stderr
+++ b/tests/ui/issues/issue-59494.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<(_,)>` closure, found `impl Fn(((_, _), _))`
+error[E0277]: expected a `Fn(_)` closure, found `impl Fn(((_, _), _))`
--> $DIR/issue-59494.rs:21:22
|
LL | let t8 = t8n(t7, t7p(f, g));
- | --- ^^^^^^^^^ expected an `Fn<(_,)>` closure, found `impl Fn(((_, _), _))`
+ | --- ^^^^^^^^^ expected an `Fn(_)` closure, found `impl Fn(((_, _), _))`
| |
| required by a bound introduced by this call
|
diff --git a/tests/ui/issues/issue-66667-function-cmp-cycle.stderr b/tests/ui/issues/issue-66667-function-cmp-cycle.stderr
index d9a960ce1..cec811770 100644
--- a/tests/ui/issues/issue-66667-function-cmp-cycle.stderr
+++ b/tests/ui/issues/issue-66667-function-cmp-cycle.stderr
@@ -19,7 +19,7 @@ error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:2:5
|
LL | fn first() {
- | - help: try adding a return type: `-> bool`
+ | - help: try adding a return type: `-> bool`
LL | second == 1
| ^^^^^^^^^^^ expected `()`, found `bool`
@@ -44,7 +44,7 @@ error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:8:5
|
LL | fn second() {
- | - help: try adding a return type: `-> bool`
+ | - help: try adding a return type: `-> bool`
LL | first == 1
| ^^^^^^^^^^ expected `()`, found `bool`
@@ -69,7 +69,7 @@ error[E0308]: mismatched types
--> $DIR/issue-66667-function-cmp-cycle.rs:14:5
|
LL | fn bar() {
- | - help: try adding a return type: `-> bool`
+ | - help: try adding a return type: `-> bool`
LL | bar == 1
| ^^^^^^^^ expected `()`, found `bool`
diff --git a/tests/ui/issues/issue-66923-show-error-for-correct-call.stderr b/tests/ui/issues/issue-66923-show-error-for-correct-call.stderr
index 22b1da64c..128288e28 100644
--- a/tests/ui/issues/issue-66923-show-error-for-correct-call.stderr
+++ b/tests/ui/issues/issue-66923-show-error-for-correct-call.stderr
@@ -5,7 +5,8 @@ LL | let x2: Vec<f64> = x1.into_iter().collect();
| ^^^^^^^ value of type `Vec<f64>` cannot be built from `std::iter::Iterator<Item=&f64>`
|
= help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>`
- = help: the trait `FromIterator<T>` is implemented for `Vec<T>`
+ = help: the trait `FromIterator<f64>` is implemented for `Vec<f64>`
+ = help: for that trait implementation, expected `f64`, found `&f64`
note: the method call chain might not have had the expected associated types
--> $DIR/issue-66923-show-error-for-correct-call.rs:8:27
|
@@ -25,7 +26,8 @@ LL | let x3 = x1.into_iter().collect::<Vec<f64>>();
| required by a bound introduced by this call
|
= help: the trait `FromIterator<&f64>` is not implemented for `Vec<f64>`
- = help: the trait `FromIterator<T>` is implemented for `Vec<T>`
+ = help: the trait `FromIterator<f64>` is implemented for `Vec<f64>`
+ = help: for that trait implementation, expected `f64`, found `&f64`
note: the method call chain might not have had the expected associated types
--> $DIR/issue-66923-show-error-for-correct-call.rs:12:17
|
diff --git a/tests/ui/issues/issue-69306.stderr b/tests/ui/issues/issue-69306.stderr
index 570677298..6fc5c33af 100644
--- a/tests/ui/issues/issue-69306.stderr
+++ b/tests/ui/issues/issue-69306.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/issue-69306.rs:5:28
|
LL | impl<T> S0<T> {
- | - this type parameter
+ | - expected this type parameter
LL | const C: S0<u8> = Self(0);
| ---- ^ expected type parameter `T`, found integer
| |
@@ -20,7 +20,7 @@ error[E0308]: mismatched types
--> $DIR/issue-69306.rs:5:23
|
LL | impl<T> S0<T> {
- | - this type parameter
+ | - found this type parameter
LL | const C: S0<u8> = Self(0);
| ^^^^^^^ expected `S0<u8>`, found `S0<T>`
|
@@ -31,7 +31,7 @@ error[E0308]: mismatched types
--> $DIR/issue-69306.rs:10:14
|
LL | impl<T> S0<T> {
- | - this type parameter
+ | - expected this type parameter
...
LL | Self(0);
| ---- ^ expected type parameter `T`, found integer
@@ -50,7 +50,7 @@ error[E0308]: mismatched types
--> $DIR/issue-69306.rs:27:14
|
LL | impl<T> Foo<T> for <S0<T> as Fun>::Out {
- | - this type parameter
+ | - expected this type parameter
LL | fn foo() {
LL | Self(0);
| ---- ^ expected type parameter `T`, found integer
@@ -69,7 +69,7 @@ error[E0308]: mismatched types
--> $DIR/issue-69306.rs:33:32
|
LL | impl<T> S1<T, u8> {
- | - this type parameter
+ | - expected this type parameter
LL | const C: S1<u8, u8> = Self(0, 1);
| ---- ^ expected type parameter `T`, found integer
| |
@@ -87,7 +87,7 @@ error[E0308]: mismatched types
--> $DIR/issue-69306.rs:33:27
|
LL | impl<T> S1<T, u8> {
- | - this type parameter
+ | - found this type parameter
LL | const C: S1<u8, u8> = Self(0, 1);
| ^^^^^^^^^^ expected `S1<u8, u8>`, found `S1<T, u8>`
|
diff --git a/tests/ui/issues/issue-77919.rs b/tests/ui/issues/issue-77919.rs
index 966d76d14..bf6033149 100644
--- a/tests/ui/issues/issue-77919.rs
+++ b/tests/ui/issues/issue-77919.rs
@@ -10,4 +10,4 @@ struct Multiply<N, M> {
}
impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
//~^ ERROR cannot find type `VAL` in this scope
-//~| ERROR not all trait items implemented, missing: `VAL`
+//~| ERROR not all trait items implemented
diff --git a/tests/ui/issues/issue-77919.stderr b/tests/ui/issues/issue-77919.stderr
index d6dcc8997..dbbe70ff0 100644
--- a/tests/ui/issues/issue-77919.stderr
+++ b/tests/ui/issues/issue-77919.stderr
@@ -27,7 +27,7 @@ LL | const VAL: T;
| ------------ `VAL` from trait
...
LL | impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `VAL` in implementation
error: aborting due to 3 previous errors
diff --git a/tests/ui/issues/issue-87199.rs b/tests/ui/issues/issue-87199.rs
index a80a64a2f..d16d40676 100644
--- a/tests/ui/issues/issue-87199.rs
+++ b/tests/ui/issues/issue-87199.rs
@@ -6,11 +6,11 @@
// Check that these function definitions only emit warnings, not errors
fn arg<T: ?Send>(_: T) {}
-//~^ warning: default bound relaxed for a type parameter, but this does nothing
+//~^ warning: relaxing a default bound only does something for `?Sized`
fn ref_arg<T: ?Send>(_: &T) {}
-//~^ warning: default bound relaxed for a type parameter, but this does nothing
+//~^ warning: relaxing a default bound only does something for `?Sized`
fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
-//~^ warning: default bound relaxed for a type parameter, but this does nothing
+//~^ warning: relaxing a default bound only does something for `?Sized`
// Check that there's no `?Sized` relaxation!
fn main() {
diff --git a/tests/ui/issues/issue-87199.stderr b/tests/ui/issues/issue-87199.stderr
index 67949b37d..e02cd7fcf 100644
--- a/tests/ui/issues/issue-87199.stderr
+++ b/tests/ui/issues/issue-87199.stderr
@@ -1,20 +1,20 @@
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
- --> $DIR/issue-87199.rs:8:8
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+ --> $DIR/issue-87199.rs:8:11
|
LL | fn arg<T: ?Send>(_: T) {}
- | ^
+ | ^^^^^
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
- --> $DIR/issue-87199.rs:10:12
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+ --> $DIR/issue-87199.rs:10:15
|
LL | fn ref_arg<T: ?Send>(_: &T) {}
- | ^
+ | ^^^^^
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
- --> $DIR/issue-87199.rs:12:13
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+ --> $DIR/issue-87199.rs:12:40
|
LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^^^
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
--> $DIR/issue-87199.rs:18:15