summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-return_type_notation.rs
blob: 60ac9f8d4f1a55a8c1a723217e4bd4c6b88b79fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// edition: 2021
// revisions: cfg no

// [no] check-pass
// Since we're not adding new syntax, `cfg`'d out RTN must pass.


trait Trait {
    #[allow(async_fn_in_trait)]
    async fn m();
}

#[cfg(cfg)]
fn foo<T: Trait<m(): Send>>() {}
//[cfg]~^ ERROR return type notation is experimental
//[cfg]~| ERROR parenthesized generic arguments cannot be used in associated type constraints
//[cfg]~| ERROR expected type, found function
//[no]~^^^^ WARN return type notation is experimental
//[no]~| WARN unstable syntax can change at any point in the future, causing a hard error!

fn main() {}