]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-40827.stderr
Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc
[rust.git] / src / test / ui / issues / issue-40827.stderr
1 error[E0277]: `Rc<Foo>` cannot be shared between threads safely
2   --> $DIR/issue-40827.rs:14:5
3    |
4 LL |     f(Foo(Arc::new(Bar::B(None))));
5    |     ^ `Rc<Foo>` cannot be shared between threads safely
6    |
7    = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
8 note: required because it appears within the type `Bar`
9   --> $DIR/issue-40827.rs:6:6
10    |
11 LL | enum Bar {
12    |      ^^^
13    = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
14 note: required because it appears within the type `Foo`
15   --> $DIR/issue-40827.rs:4:8
16    |
17 LL | struct Foo(Arc<Bar>);
18    |        ^^^
19 note: required by a bound in `f`
20   --> $DIR/issue-40827.rs:11:9
21    |
22 LL | fn f<T: Send>(_: T) {}
23    |         ^^^^ required by this bound in `f`
24
25 error[E0277]: `Rc<Foo>` cannot be sent between threads safely
26   --> $DIR/issue-40827.rs:14:5
27    |
28 LL |     f(Foo(Arc::new(Bar::B(None))));
29    |     ^ `Rc<Foo>` cannot be sent between threads safely
30    |
31    = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
32 note: required because it appears within the type `Bar`
33   --> $DIR/issue-40827.rs:6:6
34    |
35 LL | enum Bar {
36    |      ^^^
37    = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
38 note: required because it appears within the type `Foo`
39   --> $DIR/issue-40827.rs:4:8
40    |
41 LL | struct Foo(Arc<Bar>);
42    |        ^^^
43 note: required by a bound in `f`
44   --> $DIR/issue-40827.rs:11:9
45    |
46 LL | fn f<T: Send>(_: T) {}
47    |         ^^^^ required by this bound in `f`
48
49 error: aborting due to 2 previous errors
50
51 For more information about this error, try `rustc --explain E0277`.