]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / traits / negative-impls / negated-auto-traits-error.stderr
1 error[E0277]: `dummy::TestType` cannot be sent between threads safely
2 --> $DIR/negated-auto-traits-error.rs:23:11
3 |
4 LL | Outer(TestType);
5 | ^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
6 |
7 = help: the trait `Send` is not implemented for `dummy::TestType`
8 note: required by `Outer`
9 --> $DIR/negated-auto-traits-error.rs:10:1
10 |
11 LL | struct Outer<T: Send>(T);
12 | ^^^^^^^^^^^^^^^^^^^^^^^^^
13
14 error[E0277]: `dummy::TestType` cannot be sent between threads safely
15 --> $DIR/negated-auto-traits-error.rs:23:5
16 |
17 LL | struct Outer<T: Send>(T);
18 | ---- required by this bound in `Outer`
19 ...
20 LL | Outer(TestType);
21 | ^^^^^^^^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
22 |
23 = help: the trait `Send` is not implemented for `dummy::TestType`
24
25 error[E0277]: `dummy1b::TestType` cannot be sent between threads safely
26 --> $DIR/negated-auto-traits-error.rs:32:13
27 |
28 LL | fn is_send<T: Send>(_: T) {}
29 | ---- required by this bound in `is_send`
30 ...
31 LL | is_send(TestType);
32 | ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely
33 |
34 = help: the trait `Send` is not implemented for `dummy1b::TestType`
35
36 error[E0277]: `dummy1c::TestType` cannot be sent between threads safely
37 --> $DIR/negated-auto-traits-error.rs:40:13
38 |
39 LL | fn is_send<T: Send>(_: T) {}
40 | ---- required by this bound in `is_send`
41 ...
42 LL | is_send((8, TestType));
43 | ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely
44 |
45 = help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType`
46 = note: required because it appears within the type `({integer}, dummy1c::TestType)`
47
48 error[E0277]: `dummy2::TestType` cannot be sent between threads safely
49 --> $DIR/negated-auto-traits-error.rs:48:13
50 |
51 LL | fn is_send<T: Send>(_: T) {}
52 | ---- required by this bound in `is_send`
53 ...
54 LL | is_send(Box::new(TestType));
55 | ^^^^^^^^^^^^^^^^^^
56 | |
57 | expected an implementor of trait `Send`
58 | help: consider borrowing here: `&Box::new(TestType)`
59 |
60 = note: the trait bound `dummy2::TestType: Send` is not satisfied
61 = note: required because of the requirements on the impl of `Send` for `Unique<dummy2::TestType>`
62 = note: required because it appears within the type `Box<dummy2::TestType>`
63
64 error[E0277]: `dummy3::TestType` cannot be sent between threads safely
65 --> $DIR/negated-auto-traits-error.rs:56:13
66 |
67 LL | fn is_send<T: Send>(_: T) {}
68 | ---- required by this bound in `is_send`
69 ...
70 LL | is_send(Box::new(Outer2(TestType)));
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely
72 |
73 = help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType`
74 note: required because it appears within the type `Outer2<dummy3::TestType>`
75 --> $DIR/negated-auto-traits-error.rs:12:8
76 |
77 LL | struct Outer2<T>(T);
78 | ^^^^^^
79 = note: required because of the requirements on the impl of `Send` for `Unique<Outer2<dummy3::TestType>>`
80 = note: required because it appears within the type `Box<Outer2<dummy3::TestType>>`
81
82 error[E0277]: `main::TestType` cannot be sent between threads safely
83 --> $DIR/negated-auto-traits-error.rs:66:13
84 |
85 LL | fn is_sync<T: Sync>(_: T) {}
86 | ---- required by this bound in `is_sync`
87 ...
88 LL | is_sync(Outer2(TestType));
89 | ^^^^^^^^^^^^^^^^
90 | |
91 | expected an implementor of trait `Sync`
92 | help: consider borrowing here: `&Outer2(TestType)`
93 |
94 = note: the trait bound `main::TestType: Sync` is not satisfied
95 note: required because of the requirements on the impl of `Sync` for `Outer2<main::TestType>`
96 --> $DIR/negated-auto-traits-error.rs:14:22
97 |
98 LL | unsafe impl<T: Send> Sync for Outer2<T> {}
99 | ^^^^ ^^^^^^^^^
100
101 error: aborting due to 7 previous errors
102
103 For more information about this error, try `rustc --explain E0277`.