diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/confuse-field-and-method/issue-18343.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/confuse-field-and-method/issue-18343.rs b/src/test/ui/confuse-field-and-method/issue-18343.rs new file mode 100644 index 000000000..bc2d73fae --- /dev/null +++ b/src/test/ui/confuse-field-and-method/issue-18343.rs @@ -0,0 +1,9 @@ +struct Obj<F> where F: FnMut() -> u32 { + closure: F, +} + +fn main() { + let o = Obj { closure: || 42 }; + o.closure(); + //~^ ERROR no method named `closure` found +} |