diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/const-generics/defaults/wfness.stderr | 8 | ||||
| -rw-r--r-- | tests/ui/issues/issue-7364.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/static/issue-24446.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/statics/issue-17718-static-sync.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/statics/unsizing-wfcheck-issue-127299.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/type/type-check-defaults.stderr | 23 |
6 files changed, 39 insertions, 8 deletions
diff --git a/tests/ui/const-generics/defaults/wfness.stderr b/tests/ui/const-generics/defaults/wfness.stderr index 4f42afed81d..7098850e978 100644 --- a/tests/ui/const-generics/defaults/wfness.stderr +++ b/tests/ui/const-generics/defaults/wfness.stderr @@ -12,6 +12,14 @@ LL | (): Trait<N>; | = help: the trait `Trait<2>` is not implemented for `()` but trait `Trait<3>` is implemented for it +note: required by a bound in `WhereClause` + --> $DIR/wfness.rs:8:9 + | +LL | struct WhereClause<const N: u8 = 2> + | ----------- required by a bound in this struct +LL | where +LL | (): Trait<N>; + | ^^^^^^^^ required by this bound in `WhereClause` error[E0277]: the trait bound `(): Trait<1>` is not satisfied --> $DIR/wfness.rs:18:13 diff --git a/tests/ui/issues/issue-7364.stderr b/tests/ui/issues/issue-7364.stderr index e07f88b806c..a47a90c90ce 100644 --- a/tests/ui/issues/issue-7364.stderr +++ b/tests/ui/issues/issue-7364.stderr @@ -1,8 +1,8 @@ error[E0277]: `RefCell<isize>` cannot be shared between threads safely - --> $DIR/issue-7364.rs:4:1 + --> $DIR/issue-7364.rs:4:15 | LL | static boxed: Box<RefCell<isize>> = Box::new(RefCell::new(0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `RefCell<isize>` cannot be shared between threads safely + | ^^^^^^^^^^^^^^^^^^^ `RefCell<isize>` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `RefCell<isize>` = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead diff --git a/tests/ui/static/issue-24446.stderr b/tests/ui/static/issue-24446.stderr index 6e35db7cc4a..ed195634f12 100644 --- a/tests/ui/static/issue-24446.stderr +++ b/tests/ui/static/issue-24446.stderr @@ -1,8 +1,8 @@ error[E0277]: `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely - --> $DIR/issue-24446.rs:2:5 + --> $DIR/issue-24446.rs:2:17 | LL | static foo: dyn Fn() -> u32 = || -> u32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely + | ^^^^^^^^^^^^^^^ `(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` diff --git a/tests/ui/statics/issue-17718-static-sync.stderr b/tests/ui/statics/issue-17718-static-sync.stderr index d49dbd947c5..96f894146c5 100644 --- a/tests/ui/statics/issue-17718-static-sync.stderr +++ b/tests/ui/statics/issue-17718-static-sync.stderr @@ -1,8 +1,8 @@ error[E0277]: `Foo` cannot be shared between threads safely - --> $DIR/issue-17718-static-sync.rs:9:1 + --> $DIR/issue-17718-static-sync.rs:9:13 | LL | static BAR: Foo = Foo; - | ^^^^^^^^^^^^^^^ `Foo` cannot be shared between threads safely + | ^^^ `Foo` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `Foo` = note: shared static variables must have a type that implements `Sync` diff --git a/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr b/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr index 8a19207c5d7..e401277a020 100644 --- a/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr +++ b/tests/ui/statics/unsizing-wfcheck-issue-127299.stderr @@ -22,10 +22,10 @@ LL | fn bar() -> i32 where Self: Sized; | +++++++++++++++++ error[E0277]: `(dyn Qux + 'static)` cannot be shared between threads safely - --> $DIR/unsizing-wfcheck-issue-127299.rs:12:1 + --> $DIR/unsizing-wfcheck-issue-127299.rs:12:13 | LL | static FOO: &Lint = &Lint { desc: "desc" }; - | ^^^^^^^^^^^^^^^^^ `(dyn Qux + 'static)` cannot be shared between threads safely + | ^^^^^ `(dyn Qux + 'static)` cannot be shared between threads safely | = help: within `&'static Lint`, the trait `Sync` is not implemented for `(dyn Qux + 'static)` = note: required because it appears within the type `&'static (dyn Qux + 'static)` diff --git a/tests/ui/type/type-check-defaults.stderr b/tests/ui/type/type-check-defaults.stderr index ab3378eaa4a..bbe93a05d4d 100644 --- a/tests/ui/type/type-check-defaults.stderr +++ b/tests/ui/type/type-check-defaults.stderr @@ -29,18 +29,36 @@ error[E0277]: the trait bound `String: Copy` is not satisfied | LL | struct Bounds<T:Copy=String>(T); | ^^^^ the trait `Copy` is not implemented for `String` + | +note: required by a bound in `Bounds` + --> $DIR/type-check-defaults.rs:11:17 + | +LL | struct Bounds<T:Copy=String>(T); + | ^^^^ required by this bound in `Bounds` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/type-check-defaults.rs:14:42 | LL | struct WhereClause<T=String>(T) where T: Copy; | ^^^^ the trait `Copy` is not implemented for `String` + | +note: required by a bound in `WhereClause` + --> $DIR/type-check-defaults.rs:14:42 + | +LL | struct WhereClause<T=String>(T) where T: Copy; + | ^^^^ required by this bound in `WhereClause` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/type-check-defaults.rs:17:20 | LL | trait TraitBound<T:Copy=String> {} | ^^^^ the trait `Copy` is not implemented for `String` + | +note: required by a bound in `TraitBound` + --> $DIR/type-check-defaults.rs:17:20 + | +LL | trait TraitBound<T:Copy=String> {} + | ^^^^ required by this bound in `TraitBound` error[E0277]: the trait bound `T: Copy` is not satisfied --> $DIR/type-check-defaults.rs:21:25 @@ -70,6 +88,11 @@ LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {} `&i32` implements `Add` `i32` implements `Add<&i32>` `i32` implements `Add` +note: required by a bound in `ProjectionPred` + --> $DIR/type-check-defaults.rs:24:66 + | +LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {} + | ^^^^^^^ required by this bound in `ProjectionPred` error: aborting due to 7 previous errors |
