diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-3220.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-3220.rs b/src/test/ui/issues/issue-3220.rs new file mode 100644 index 000000000..7dc672edb --- /dev/null +++ b/src/test/ui/issues/issue-3220.rs @@ -0,0 +1,25 @@ +// run-pass +#![allow(dead_code)] +#![allow(non_camel_case_types)] +// pretty-expanded FIXME #23616 + +struct thing { x: isize, } + +impl Drop for thing { + fn drop(&mut self) {} +} + +fn thing() -> thing { + thing { + x: 0 + } +} + +impl thing { + pub fn f(self) {} +} + +pub fn main() { + let z = thing(); + (z).f(); +} |