rust/tests/ui/unboxed-closures/unboxed-closure-sugar-used-on-struct-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
338 B
Rust
Raw Normal View History

// Test that parentheses form doesn't work with struct types appearing in local variables.
struct Bar<A> {
f: A
}
fn bar() {
let x: Box<Bar()> = panic!();
//~^ ERROR parenthesized type parameters may only be used with a `Fn` trait
2021-05-12 11:35:12 +00:00
//~| ERROR this struct takes 1 generic argument but 0 generic arguments
}
fn main() { }