]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-40827.stderr
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
[rust.git] / src / test / ui / issues / issue-40827.stderr
index 38c3af935c56455418e70338622ba1005f1820b9..11c23e5b659b7af06385f33dd0f0bd4ab1c9cf00 100644 (file)
@@ -1,11 +1,10 @@
 error[E0277]: `Rc<Foo>` cannot be shared between threads safely
-  --> $DIR/issue-40827.rs:14:5
+  --> $DIR/issue-40827.rs:14:7
    |
-LL | fn f<T: Send>(_: T) {}
-   |         ---- required by this bound in `f`
-...
 LL |     f(Foo(Arc::new(Bar::B(None))));
-   |     ^ `Rc<Foo>` cannot be shared between threads safely
+   |     - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be shared between threads safely
+   |     |
+   |     required by a bound introduced by this call
    |
    = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
 note: required because it appears within the type `Bar`
@@ -19,15 +18,19 @@ note: required because it appears within the type `Foo`
    |
 LL | struct Foo(Arc<Bar>);
    |        ^^^
+note: required by a bound in `f`
+  --> $DIR/issue-40827.rs:11:9
+   |
+LL | fn f<T: Send>(_: T) {}
+   |         ^^^^ required by this bound in `f`
 
 error[E0277]: `Rc<Foo>` cannot be sent between threads safely
-  --> $DIR/issue-40827.rs:14:5
+  --> $DIR/issue-40827.rs:14:7
    |
-LL | fn f<T: Send>(_: T) {}
-   |         ---- required by this bound in `f`
-...
 LL |     f(Foo(Arc::new(Bar::B(None))));
-   |     ^ `Rc<Foo>` cannot be sent between threads safely
+   |     - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be sent between threads safely
+   |     |
+   |     required by a bound introduced by this call
    |
    = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
 note: required because it appears within the type `Bar`
@@ -41,6 +44,11 @@ note: required because it appears within the type `Foo`
    |
 LL | struct Foo(Arc<Bar>);
    |        ^^^
+note: required by a bound in `f`
+  --> $DIR/issue-40827.rs:11:9
+   |
+LL | fn f<T: Send>(_: T) {}
+   |         ^^^^ required by this bound in `f`
 
 error: aborting due to 2 previous errors