]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unboxed-closures/unboxed-closure-feature-gate.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / unboxed-closures / unboxed-closure-feature-gate.rs
CommitLineData
1a4d82fc
JJ
1// Check that parenthetical notation is feature-gated except with the
2// `Fn` traits.
223e47cc 3
85aaf69f
SL
4use std::marker;
5
6trait Foo<A> {
7 type Output;
8
9 fn dummy(&self, a: A) { }
223e47cc
LB
10}
11
12fn main() {
dc9dc135 13 let x: Box<dyn Foo(isize)>;
c1a9b12d 14 //~^ ERROR parenthetical notation is only stable when used with `Fn`-family
1a4d82fc
JJ
15
16 // No errors with these:
dc9dc135
XL
17 let x: Box<dyn Fn(isize)>;
18 let x: Box<dyn FnMut(isize)>;
19 let x: Box<dyn FnOnce(isize)>;
223e47cc 20}