]>
Commit | Line | Data |
---|---|---|
94b46f34 | 1 | error[E0277]: the trait bound `i32: Foo` is not satisfied |
0731742a | 2 | --> $DIR/feature-gate-trivial_bounds.rs:10:1 |
94b46f34 | 3 | | |
532ac7d7 | 4 | LL | enum E where i32: Foo { V } |
94b46f34 XL |
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 | |
0731742a | 11 | --> $DIR/feature-gate-trivial_bounds.rs:12:1 |
94b46f34 | 12 | | |
532ac7d7 | 13 | LL | struct S where i32: Foo; |
94b46f34 XL |
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 | |
0731742a | 20 | --> $DIR/feature-gate-trivial_bounds.rs:14:1 |
94b46f34 | 21 | | |
532ac7d7 | 22 | LL | trait T where i32: Foo {} |
94b46f34 XL |
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 | |
0731742a | 29 | --> $DIR/feature-gate-trivial_bounds.rs:16:1 |
94b46f34 | 30 | | |
532ac7d7 | 31 | LL | union U where i32: Foo { f: i32 } |
94b46f34 XL |
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 | |
0731742a | 38 | --> $DIR/feature-gate-trivial_bounds.rs:20:1 |
94b46f34 | 39 | | |
532ac7d7 | 40 | LL | / impl Foo for () where i32: Foo { |
94b46f34 XL |
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 | |
0731742a | 53 | --> $DIR/feature-gate-trivial_bounds.rs:28:1 |
94b46f34 | 54 | | |
532ac7d7 | 55 | LL | / fn f() where i32: Foo |
94b46f34 XL |
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 | |
0731742a | 68 | --> $DIR/feature-gate-trivial_bounds.rs:36:1 |
94b46f34 | 69 | | |
532ac7d7 | 70 | LL | / fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> { |
94b46f34 XL |
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 | ||
0bf4aa26 | 78 | error[E0277]: `i32` is not an iterator |
0731742a | 79 | --> $DIR/feature-gate-trivial_bounds.rs:40:1 |
94b46f34 | 80 | | |
532ac7d7 | 81 | LL | / fn use_for() where i32: Iterator { |
94b46f34 XL |
82 | LL | | for _ in 2i32 {} |
83 | LL | | } | |
0bf4aa26 | 84 | | |_^ `i32` is not an iterator |
94b46f34 XL |
85 | | |
86 | = help: the trait `std::iter::Iterator` is not implemented for `i32` | |
0bf4aa26 | 87 | = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end` |
94b46f34 XL |
88 | = help: see issue #48214 |
89 | = help: add #![feature(trivial_bounds)] to the crate attributes to enable | |
90 | ||
8faf50e0 | 91 | error[E0277]: the size for values of type `str` cannot be known at compilation time |
0731742a | 92 | --> $DIR/feature-gate-trivial_bounds.rs:52:1 |
94b46f34 | 93 | | |
532ac7d7 | 94 | LL | struct TwoStrs(str, str) where str: Sized; |
8faf50e0 | 95 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time |
94b46f34 XL |
96 | | |
97 | = help: the trait `std::marker::Sized` is not implemented for `str` | |
0731742a | 98 | = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
94b46f34 XL |
99 | = help: see issue #48214 |
100 | = help: add #![feature(trivial_bounds)] to the crate attributes to enable | |
101 | ||
8faf50e0 | 102 | error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time |
0731742a | 103 | --> $DIR/feature-gate-trivial_bounds.rs:55:1 |
94b46f34 | 104 | | |
532ac7d7 | 105 | LL | / fn unsized_local() where Dst<A>: Sized { |
94b46f34 XL |
106 | LL | | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>); |
107 | LL | | } | |
8faf50e0 | 108 | | |_^ doesn't have a size known at compile-time |
94b46f34 | 109 | | |
8faf50e0 | 110 | = help: within `Dst<(dyn A + 'static)>`, the trait `std::marker::Sized` is not implemented for `(dyn A + 'static)` |
0731742a | 111 | = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
8faf50e0 | 112 | = note: required because it appears within the type `Dst<(dyn A + 'static)>` |
94b46f34 XL |
113 | = help: see issue #48214 |
114 | = help: add #![feature(trivial_bounds)] to the crate attributes to enable | |
115 | ||
8faf50e0 | 116 | error[E0277]: the size for values of type `str` cannot be known at compilation time |
0731742a | 117 | --> $DIR/feature-gate-trivial_bounds.rs:59:1 |
94b46f34 | 118 | | |
532ac7d7 | 119 | LL | / fn return_str() -> str where str: Sized { |
94b46f34 XL |
120 | LL | | *"Sized".to_string().into_boxed_str() |
121 | LL | | } | |
8faf50e0 | 122 | | |_^ doesn't have a size known at compile-time |
94b46f34 XL |
123 | | |
124 | = help: the trait `std::marker::Sized` is not implemented for `str` | |
0731742a | 125 | = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> |
94b46f34 XL |
126 | = help: see issue #48214 |
127 | = help: add #![feature(trivial_bounds)] to the crate attributes to enable | |
128 | ||
129 | error: aborting due to 11 previous errors | |
130 | ||
131 | For more information about this error, try `rustc --explain E0277`. |