]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gate-trivial_bounds.stderr
Reenable trivial bounds
[rust.git] / src / test / ui / feature-gate-trivial_bounds.stderr
1 error[E0277]: the trait bound `i32: Foo` is not satisfied
2   --> $DIR/feature-gate-trivial_bounds.rs:20:1
3    |
4 LL | enum E where i32: Foo { V } //~ ERROR
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
6    |
7    = help: see issue #48214
8    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
9
10 error[E0277]: the trait bound `i32: Foo` is not satisfied
11   --> $DIR/feature-gate-trivial_bounds.rs:22:1
12    |
13 LL | struct S where i32: Foo; //~ ERROR
14    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
15    |
16    = help: see issue #48214
17    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
18
19 error[E0277]: the trait bound `i32: Foo` is not satisfied
20   --> $DIR/feature-gate-trivial_bounds.rs:24:1
21    |
22 LL | trait T where i32: Foo {} //~ ERROR
23    | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
24    |
25    = help: see issue #48214
26    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
27
28 error[E0277]: the trait bound `i32: Foo` is not satisfied
29   --> $DIR/feature-gate-trivial_bounds.rs:26:1
30    |
31 LL | union U where i32: Foo { f: i32 } //~ ERROR
32    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
33    |
34    = help: see issue #48214
35    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
36
37 error[E0277]: the trait bound `i32: Foo` is not satisfied
38   --> $DIR/feature-gate-trivial_bounds.rs:30:1
39    |
40 LL | / impl Foo for () where i32: Foo { //~ ERROR
41 LL | |     fn test(&self) {
42 LL | |         3i32.test();
43 LL | |         Foo::test(&4i32);
44 LL | |         generic_function(5i32);
45 LL | |     }
46 LL | | }
47    | |_^ the trait `Foo` is not implemented for `i32`
48    |
49    = help: see issue #48214
50    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
51
52 error[E0277]: the trait bound `i32: Foo` is not satisfied
53   --> $DIR/feature-gate-trivial_bounds.rs:38:1
54    |
55 LL | / fn f() where i32: Foo //~ ERROR
56 LL | | {
57 LL | |     let s = S;
58 LL | |     3i32.test();
59 LL | |     Foo::test(&4i32);
60 LL | |     generic_function(5i32);
61 LL | | }
62    | |_^ the trait `Foo` is not implemented for `i32`
63    |
64    = help: see issue #48214
65    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
66
67 error[E0277]: the trait bound `std::string::String: std::ops::Neg` is not satisfied
68   --> $DIR/feature-gate-trivial_bounds.rs:46:1
69    |
70 LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> { //~ ERROR
71 LL | |     -s
72 LL | | }
73    | |_^ the trait `std::ops::Neg` is not implemented for `std::string::String`
74    |
75    = help: see issue #48214
76    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
77
78 error[E0277]: the trait bound `i32: std::iter::Iterator` is not satisfied
79   --> $DIR/feature-gate-trivial_bounds.rs:50:1
80    |
81 LL | / fn use_for() where i32: Iterator { //~ ERROR
82 LL | |     for _ in 2i32 {}
83 LL | | }
84    | |_^ `i32` is not an iterator; maybe try calling `.iter()` or a similar method
85    |
86    = help: the trait `std::iter::Iterator` is not implemented for `i32`
87    = help: see issue #48214
88    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
89
90 error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
91   --> $DIR/feature-gate-trivial_bounds.rs:62:1
92    |
93 LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
94    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `str` does not have a constant size known at compile-time
95    |
96    = help: the trait `std::marker::Sized` is not implemented for `str`
97    = help: see issue #48214
98    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
99
100 error[E0277]: the trait bound `A + 'static: std::marker::Sized` is not satisfied in `Dst<A + 'static>`
101   --> $DIR/feature-gate-trivial_bounds.rs:65:1
102    |
103 LL | / fn unsized_local() where Dst<A>: Sized { //~ ERROR
104 LL | |     let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
105 LL | | }
106    | |_^ `A + 'static` does not have a constant size known at compile-time
107    |
108    = help: within `Dst<A + 'static>`, the trait `std::marker::Sized` is not implemented for `A + 'static`
109    = note: required because it appears within the type `Dst<A + 'static>`
110    = help: see issue #48214
111    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
112
113 error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
114   --> $DIR/feature-gate-trivial_bounds.rs:69:1
115    |
116 LL | / fn return_str() -> str where str: Sized { //~ ERROR
117 LL | |     *"Sized".to_string().into_boxed_str()
118 LL | | }
119    | |_^ `str` does not have a constant size known at compile-time
120    |
121    = help: the trait `std::marker::Sized` is not implemented for `str`
122    = help: see issue #48214
123    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
124
125 error: aborting due to 11 previous errors
126
127 For more information about this error, try `rustc --explain E0277`.