]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr
New upstream version 1.57.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 | required by a bound introduced by this call
8 |
9 = help: the trait `Send` is not implemented for `dummy::TestType`
10 note: required by `Outer`
11 --> $DIR/negated-auto-traits-error.rs:10:1
12 |
13 LL | struct Outer<T: Send>(T);
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^
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: the trait `Send` is not implemented for `dummy1c::TestType`
53 = note: required because it appears within the type `({integer}, dummy1c::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 | ------- ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Send`
65 | |
66 | required by a bound introduced by this call
67 |
68 = note: the trait bound `dummy2::TestType: Send` is not satisfied
69 = note: required because of the requirements on the impl of `Send` for `Unique<dummy2::TestType>`
70 = note: required because it appears within the type `Box<dummy2::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: the trait `Send` is not implemented for `dummy3::TestType`
90 note: required because it appears within the type `Outer2<dummy3::TestType>`
91 --> $DIR/negated-auto-traits-error.rs:12:8
92 |
93 LL | struct Outer2<T>(T);
94 | ^^^^^^
95 = note: required because of the requirements on the impl of `Send` for `Unique<Outer2<dummy3::TestType>>`
96 = note: required because it appears within the type `Box<Outer2<dummy3::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:13
105 |
106 LL | is_sync(Outer2(TestType));
107 | ------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Sync`
108 | |
109 | required by a bound introduced by this call
110 |
111 = note: the trait bound `main::TestType: Sync` is not satisfied
112 note: required because of the requirements on the impl of `Sync` for `Outer2<main::TestType>`
113 --> $DIR/negated-auto-traits-error.rs:14:22
114 |
115 LL | unsafe impl<T: Send> Sync for Outer2<T> {}
116 | ^^^^ ^^^^^^^^^
117 note: required by a bound in `is_sync`
118 --> $DIR/negated-auto-traits-error.rs:17:15
119 |
120 LL | fn is_sync<T: Sync>(_: T) {}
121 | ^^^^ required by this bound in `is_sync`
122 help: consider borrowing here
123 |
124 LL | is_sync(&Outer2(TestType));
125 | +
126 LL | is_sync(&mut Outer2(TestType));
127 | ++++
128
129 error: aborting due to 7 previous errors
130
131 For more information about this error, try `rustc --explain E0277`.