]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / 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    |     required by a bound introduced by this call
8    |
9    = help: the trait `Send` is not implemented for `dummy::TestType`
10 note: required by a bound in `Outer`
11   --> $DIR/negated-auto-traits-error.rs:10:17
12    |
13 LL | struct Outer<T: Send>(T);
14    |                 ^^^^ required by this bound in `Outer`
15
16 error[E0277]: `dummy::TestType` cannot be sent between threads safely
17   --> $DIR/negated-auto-traits-error.rs:23:5
18    |
19 LL |     Outer(TestType);
20    |     ^^^^^^^^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
21    |
22    = help: the trait `Send` is not implemented for `dummy::TestType`
23 note: required by a bound in `Outer`
24   --> $DIR/negated-auto-traits-error.rs:10:17
25    |
26 LL | struct Outer<T: Send>(T);
27    |                 ^^^^ required by this bound in `Outer`
28
29 error[E0277]: `dummy1b::TestType` cannot be sent between threads safely
30   --> $DIR/negated-auto-traits-error.rs:32:13
31    |
32 LL |     is_send(TestType);
33    |     ------- ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely
34    |     |
35    |     required by a bound introduced by this call
36    |
37    = help: the trait `Send` is not implemented for `dummy1b::TestType`
38 note: required by a bound in `is_send`
39   --> $DIR/negated-auto-traits-error.rs:16:15
40    |
41 LL | fn is_send<T: Send>(_: T) {}
42    |               ^^^^ required by this bound in `is_send`
43
44 error[E0277]: `dummy1c::TestType` cannot be sent between threads safely
45   --> $DIR/negated-auto-traits-error.rs:40:13
46    |
47 LL |     is_send((8, TestType));
48    |     ------- ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely
49    |     |
50    |     required by a bound introduced by this call
51    |
52    = help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType`
53    = note: required because it appears within the type `({integer}, TestType)`
54 note: required by a bound in `is_send`
55   --> $DIR/negated-auto-traits-error.rs:16:15
56    |
57 LL | fn is_send<T: Send>(_: T) {}
58    |               ^^^^ required by this bound in `is_send`
59
60 error[E0277]: `dummy2::TestType` cannot be sent between threads safely
61   --> $DIR/negated-auto-traits-error.rs:48:13
62    |
63 LL |     is_send(Box::new(TestType));
64    |     ------- ^^^^^^^^^^^^^^^^^^ the trait `Send` is not implemented for `Unique<dummy2::TestType>`
65    |     |
66    |     required by a bound introduced by this call
67    |
68    = note: the trait bound `Unique<dummy2::TestType>: Send` is not satisfied
69    = note: required for `Unique<dummy2::TestType>` to implement `Send`
70    = note: required because it appears within the type `Box<TestType>`
71 note: required by a bound in `is_send`
72   --> $DIR/negated-auto-traits-error.rs:16:15
73    |
74 LL | fn is_send<T: Send>(_: T) {}
75    |               ^^^^ required by this bound in `is_send`
76 help: consider borrowing here
77    |
78 LL |     is_send(&Box::new(TestType));
79    |             +
80
81 error[E0277]: `dummy3::TestType` cannot be sent between threads safely
82   --> $DIR/negated-auto-traits-error.rs:56:13
83    |
84 LL |     is_send(Box::new(Outer2(TestType)));
85    |     ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely
86    |     |
87    |     required by a bound introduced by this call
88    |
89    = help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType`
90 note: required because it appears within the type `Outer2<TestType>`
91   --> $DIR/negated-auto-traits-error.rs:12:8
92    |
93 LL | struct Outer2<T>(T);
94    |        ^^^^^^
95    = note: required for `Unique<Outer2<dummy3::TestType>>` to implement `Send`
96    = note: required because it appears within the type `Box<Outer2<TestType>>`
97 note: required by a bound in `is_send`
98   --> $DIR/negated-auto-traits-error.rs:16:15
99    |
100 LL | fn is_send<T: Send>(_: T) {}
101    |               ^^^^ required by this bound in `is_send`
102
103 error[E0277]: `main::TestType` cannot be sent between threads safely
104   --> $DIR/negated-auto-traits-error.rs:66:20
105    |
106 LL |     is_sync(Outer2(TestType));
107    |     -------        ^^^^^^^^ `main::TestType` cannot be sent between threads safely
108    |     |
109    |     required by a bound introduced by this call
110    |
111    = help: the trait `Send` is not implemented for `main::TestType`
112 note: required for `Outer2<main::TestType>` to implement `Sync`
113   --> $DIR/negated-auto-traits-error.rs:14:22
114    |
115 LL | unsafe impl<T: Send> Sync for Outer2<T> {}
116    |                ----  ^^^^     ^^^^^^^^^
117    |                |
118    |                unsatisfied trait bound introduced here
119 note: required by a bound in `is_sync`
120   --> $DIR/negated-auto-traits-error.rs:17:15
121    |
122 LL | fn is_sync<T: Sync>(_: T) {}
123    |               ^^^^ required by this bound in `is_sync`
124
125 error: aborting due to 7 previous errors
126
127 For more information about this error, try `rustc --explain E0277`.