@@ -38,7 +38,7 @@ error[E0277]: the trait bound `i32: Foo` is not satisfied
38
38
--> $DIR/feature-gate-trivial_bounds.rs:30:1
39
39
|
40
40
LL | / impl Foo for () where i32: Foo { //~ ERROR
41
- LL | | fn test(&self) {
41
+ LL | | fn test(&self) { //~ ERROR
42
42
LL | | 3i32.test();
43
43
LL | | Foo::test(&4i32);
44
44
LL | | generic_function(5i32);
@@ -97,8 +97,17 @@ LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
97
97
= help: see issue #48214
98
98
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
99
99
100
+ error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
101
+ --> $DIR/feature-gate-trivial_bounds.rs:62:16
102
+ |
103
+ LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
104
+ | ^^^ `str` does not have a constant size known at compile-time
105
+ |
106
+ = help: the trait `std::marker::Sized` is not implemented for `str`
107
+ = note: only the last field of a struct may have a dynamically sized type
108
+
100
109
error[E0277]: the trait bound `A + 'static: std::marker::Sized` is not satisfied in `Dst<A + 'static>`
101
- --> $DIR/feature-gate-trivial_bounds.rs:64 :1
110
+ --> $DIR/feature-gate-trivial_bounds.rs:65 :1
102
111
|
103
112
LL | / fn unsized_local() where Dst<A>: Sized { //~ ERROR
104
113
LL | | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
@@ -111,7 +120,7 @@ LL | | }
111
120
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
112
121
113
122
error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
114
- --> $DIR/feature-gate-trivial_bounds.rs:68 :1
123
+ --> $DIR/feature-gate-trivial_bounds.rs:69 :1
115
124
|
116
125
LL | / fn return_str() -> str where str: Sized { //~ ERROR
117
126
LL | | *"Sized".to_string().into_boxed_str()
@@ -122,6 +131,22 @@ LL | | }
122
131
= help: see issue #48214
123
132
= help: add #![feature(trivial_bounds)] to the crate attributes to enable
124
133
125
- error: aborting due to 11 previous errors
134
+ error[E0277]: the trait bound `i32: Foo` is not satisfied
135
+ --> $DIR/feature-gate-trivial_bounds.rs:31:5
136
+ |
137
+ LL | / fn test(&self) { //~ ERROR
138
+ LL | | 3i32.test();
139
+ LL | | Foo::test(&4i32);
140
+ LL | | generic_function(5i32);
141
+ LL | | }
142
+ | |_____^ the trait `Foo` is not implemented for `i32`
143
+ |
144
+ note: required by `Foo`
145
+ --> $DIR/feature-gate-trivial_bounds.rs:14:1
146
+ |
147
+ LL | pub trait Foo {
148
+ | ^^^^^^^^^^^^^
149
+
150
+ error: aborting due to 13 previous errors
126
151
127
152
For more information about this error, try `rustc --explain E0277`.
0 commit comments