summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.rs
blob: 6d6ed4b568f0b73cd4188d8479f48f14084975c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Test that the `Fn` traits require `()` form without a feature gate.

fn bar1(x: &dyn Fn<(), Output=()>) {
    //~^ ERROR of `Fn`-family traits' type parameters is subject to change
}

fn bar2<T>(x: &T) where T: Fn<()> {
    //~^ ERROR of `Fn`-family traits' type parameters is subject to change
}

fn main() { }