]> git.lizzy.rs Git - rust.git/blob - tests/ui/unboxed-closures/unboxed-closure-sugar-not-used-on-fn.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / unboxed-closures / unboxed-closure-sugar-not-used-on-fn.rs
1 // Test that the `Fn` traits require `()` form without a feature gate.
2
3 fn bar1(x: &dyn Fn<(), Output=()>) {
4     //~^ ERROR of `Fn`-family traits' type parameters is subject to change
5 }
6
7 fn bar2<T>(x: &T) where T: Fn<()> {
8     //~^ ERROR of `Fn`-family traits' type parameters is subject to change
9 }
10
11 fn main() { }