File tree Expand file tree Collapse file tree 4 files changed +49
-7
lines changed Expand file tree Collapse file tree 4 files changed +49
-7
lines changed Original file line number Diff line number Diff line change 11error[E0277]: the trait bound `T: [const] Baz` is not satisfied
2- --> $DIR/trait_alias.rs:22 :11
2+ --> $DIR/trait_alias.rs:23 :11
33 |
44LL | x.baz();
55 | ^^^
66
7- error: aborting due to 1 previous error
7+ error[E0277]: the trait bound `(): const Foo` is not satisfied
8+ --> $DIR/trait_alias.rs:28:19
9+ |
10+ LL | const _: () = foo(&());
11+ | --- ^^^
12+ | |
13+ | required by a bound introduced by this call
14+ |
15+ note: required by a bound in `foo`
16+ --> $DIR/trait_alias.rs:19:17
17+ |
18+ LL | const fn foo<T: [const] Foo>(x: &T) {
19+ | ^^^^^^^^^^^ required by this bound in `foo`
20+
21+ error: aborting due to 2 previous errors
822
923For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change 1+ error[E0277]: the trait bound `T: [const] Baz` is not satisfied
2+ --> $DIR/trait_alias.rs:23:11
3+ |
4+ LL | x.baz();
5+ | ^^^
6+
7+ error: aborting due to 1 previous error
8+
9+ For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change 1+ error[E0277]: the trait bound `(): const Foo` is not satisfied
2+ --> $DIR/trait_alias.rs:28:19
3+ |
4+ LL | const _: () = foo(&());
5+ | --- ^^^
6+ | |
7+ | required by a bound introduced by this call
8+ |
9+ note: required by a bound in `foo`
10+ --> $DIR/trait_alias.rs:19:17
11+ |
12+ LL | const fn foo<T: [const] Foo>(x: &T) {
13+ | ^^^^^^^^^^^ required by this bound in `foo`
14+
15+ error: aborting due to 1 previous error
16+
17+ For more information about this error, try `rustc --explain E0277`.
Original file line number Diff line number Diff line change 11#![ feature( trait_alias, const_trait_impl) ]
2- //@ revisions: pass fail
3- //@ compile-flags: -Znext-solver
4- //@[pass] check-pass
2+ //@ revisions: next_pass next_fail pass fail
3+ //@[next_pass] compile-flags: -Znext-solver
4+ //@[next_fail] compile-flags: -Znext-solver
5+ //@[next_pass] check-pass
56
67const trait Bar {
78 fn bar ( & self ) { }
@@ -17,13 +18,14 @@ const trait Foo = [const] Bar + Baz;
1718
1819const fn foo < T : [ const ] Foo > ( x : & T ) {
1920 x. bar ( ) ;
20- #[ cfg( fail) ]
21+ #[ cfg( any ( fail, next_fail ) ) ]
2122 {
2223 x. baz ( ) ;
23- //[fail]~^ ERROR: the trait bound `T: [const] Baz` is not satisfied
24+ //[fail,next_fail ]~^ ERROR: the trait bound `T: [const] Baz` is not satisfied
2425 }
2526}
2627
2728const _: ( ) = foo ( & ( ) ) ;
29+ //[fail,pass]~^ ERROR: `(): const Foo` is not satisfied
2830
2931fn main ( ) { }
You can’t perform that action at this time.
0 commit comments