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 1
1
error[E0277]: the trait bound `T: [const] Baz` is not satisfied
2
- --> $DIR/trait_alias.rs:22 :11
2
+ --> $DIR/trait_alias.rs:23 :11
3
3
|
4
4
LL | x.baz();
5
5
| ^^^
6
6
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
8
22
9
23
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 `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 1
1
#![ 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
5
6
6
7
const trait Bar {
7
8
fn bar ( & self ) { }
@@ -17,13 +18,14 @@ const trait Foo = [const] Bar + Baz;
17
18
18
19
const fn foo < T : [ const ] Foo > ( x : & T ) {
19
20
x. bar ( ) ;
20
- #[ cfg( fail) ]
21
+ #[ cfg( any ( fail, next_fail ) ) ]
21
22
{
22
23
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
24
25
}
25
26
}
26
27
27
28
const _: ( ) = foo ( & ( ) ) ;
29
+ //[fail,pass]~^ ERROR: `(): const Foo` is not satisfied
28
30
29
31
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments