]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/typeck/typeck-default-trait-impl-negation-sync.stderr
Rollup merge of #95426 - b-naber:valtrees-slice, r=RalfJung,oli-obk
[rust.git] / src / test / ui / typeck / typeck-default-trait-impl-negation-sync.stderr
index a9b49ee32630bc48aa5edafb900bcef2b4c35e5c..6bb5e1f54272b6257604508bacd675a51d3bb558 100644 (file)
@@ -1,20 +1,19 @@
 error[E0277]: `MyNotSync` cannot be shared between threads safely
   --> $DIR/typeck-default-trait-impl-negation-sync.rs:33:15
    |
-LL | fn is_sync<T: Sync>() {}
-   |               ---- required by this bound in `is_sync`
-...
 LL |     is_sync::<MyNotSync>();
    |               ^^^^^^^^^ `MyNotSync` cannot be shared between threads safely
    |
    = help: the trait `Sync` is not implemented for `MyNotSync`
+note: required by a bound in `is_sync`
+  --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
+   |
+LL | fn is_sync<T: Sync>() {}
+   |               ^^^^ required by this bound in `is_sync`
 
 error[E0277]: `UnsafeCell<u8>` cannot be shared between threads safely
   --> $DIR/typeck-default-trait-impl-negation-sync.rs:36:5
    |
-LL | fn is_sync<T: Sync>() {}
-   |               ---- required by this bound in `is_sync`
-...
 LL |     is_sync::<MyTypeWUnsafe>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ `UnsafeCell<u8>` cannot be shared between threads safely
    |
@@ -24,13 +23,15 @@ note: required because it appears within the type `MyTypeWUnsafe`
    |
 LL | struct MyTypeWUnsafe {
    |        ^^^^^^^^^^^^^
+note: required by a bound in `is_sync`
+  --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
+   |
+LL | fn is_sync<T: Sync>() {}
+   |               ^^^^ required by this bound in `is_sync`
 
 error[E0277]: `Managed` cannot be shared between threads safely
   --> $DIR/typeck-default-trait-impl-negation-sync.rs:39:5
    |
-LL | fn is_sync<T: Sync>() {}
-   |               ---- required by this bound in `is_sync`
-...
 LL |     is_sync::<MyTypeManaged>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely
    |
@@ -40,6 +41,11 @@ note: required because it appears within the type `MyTypeManaged`
    |
 LL | struct MyTypeManaged {
    |        ^^^^^^^^^^^^^
+note: required by a bound in `is_sync`
+  --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15
+   |
+LL | fn is_sync<T: Sync>() {}
+   |               ^^^^ required by this bound in `is_sync`
 
 error: aborting due to 3 previous errors