1
1
// edition: 2021
2
- // revisions: cfg no
2
+ // revisions: cfg_current cfg_next no_current no_next
3
+ // [cfg_next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
4
+ // [no_next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
3
5
4
- //[no] check-pass
6
+ // [no_current] check-pass
7
+ // [no_next] check-pass
5
8
// Since we're not adding new syntax, `cfg`'d out RTN must pass.
6
9
7
10
#![ feature( async_fn_in_trait) ]
@@ -10,12 +13,17 @@ trait Trait {
10
13
async fn m ( ) ;
11
14
}
12
15
13
- #[ cfg( cfg ) ]
16
+ #[ cfg( any ( cfg_current , cfg_next ) ) ]
14
17
fn foo < T : Trait < m ( ) : Send > > ( ) { }
15
- //[cfg]~^ ERROR return type notation is experimental
16
- //[cfg]~| ERROR parenthesized generic arguments cannot be used in associated type constraints
17
- //[cfg]~| ERROR associated type `m` not found for `Trait`
18
- //[no]~^^^^ WARN return type notation is experimental
19
- //[no]~| WARN unstable syntax can change at any point in the future, causing a hard error!
18
+ //[cfg_current]~^ ERROR return type notation is experimental
19
+ //[cfg_current]~| ERROR parenthesized generic arguments cannot be used in associated type constraints
20
+ //[cfg_current]~| ERROR associated type `m` not found for `Trait`
21
+ //[cfg_next]~^^^^ ERROR return type notation is experimental
22
+ //[cfg_next]~| ERROR parenthesized generic arguments cannot be used in associated type constraints
23
+ //[cfg_next]~| ERROR associated type `m` not found for `Trait`
24
+ //[no_current]~^^^^^^^ WARN return type notation is experimental
25
+ //[no_current]~| WARN unstable syntax can change at any point in the future, causing a hard error!
26
+ //[no_next]~^^^^^^^^^ WARN return type notation is experimental
27
+ //[no_next]~| WARN unstable syntax can change at any point in the future, causing a hard error!
20
28
21
29
fn main ( ) { }
0 commit comments