File tree 4 files changed +24
-3
lines changed
rfc-1937-termination-trait
4 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 1
1
// check-pass
2
+ // [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
3
+ // revisions: current next
2
4
3
5
#![ feature( return_position_impl_trait_in_trait) ]
4
6
#![ allow( incomplete_features) ]
Original file line number Diff line number Diff line change 1
1
error[E0277]: the trait bound `Something: Termination` is not satisfied
2
- --> $DIR/issue-103052-2.rs:12 :22
2
+ --> $DIR/issue-103052-2.rs:15 :22
3
3
|
4
4
LL | fn main() -> Something {
5
5
| ^^^^^^^^^ the trait `Termination` is not implemented for `Something`
6
6
|
7
7
note: required by a bound in `Main::main::{opaque#0}`
8
- --> $DIR/issue-103052-2.rs:6 :27
8
+ --> $DIR/issue-103052-2.rs:9 :27
9
9
|
10
10
LL | fn main() -> impl std::process::Termination;
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::main::{opaque#0}`
Original file line number Diff line number Diff line change
1
+ error[E0277]: the trait bound `Something: Termination` is not satisfied
2
+ --> $DIR/issue-103052-2.rs:15:22
3
+ |
4
+ LL | fn main() -> Something {
5
+ | ^^^^^^^^^ the trait `Termination` is not implemented for `Something`
6
+ |
7
+ note: required by a bound in `Main::{opaque#0}`
8
+ --> $DIR/issue-103052-2.rs:9:27
9
+ |
10
+ LL | fn main() -> impl std::process::Termination;
11
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Main::{opaque#0}`
12
+
13
+ error: aborting due to previous error
14
+
15
+ For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change
1
+ // [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
2
+ // revisions: current next
3
+
1
4
#![ feature( return_position_impl_trait_in_trait) ]
2
5
#![ allow( incomplete_features) ]
3
6
@@ -9,7 +12,8 @@ mod child {
9
12
struct Something ;
10
13
11
14
impl Main for ( ) {
12
- fn main ( ) -> Something { //~ ERROR the trait bound `Something: Termination` is not satisfied
15
+ fn main ( ) -> Something {
16
+ //~^ ERROR the trait bound `Something: Termination` is not satisfied
13
17
Something
14
18
}
15
19
}
You can’t perform that action at this time.
0 commit comments