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