diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-2170-lib.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-2170-lib.rs b/src/test/ui/issues/auxiliary/issue-2170-lib.rs new file mode 100644 index 000000000..a99385a83 --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-2170-lib.rs @@ -0,0 +1,18 @@ +fn foo(_x: i32) { +} + +pub struct rsrc { + x: i32, +} + +impl Drop for rsrc { + fn drop(&mut self) { + foo(self.x); + } +} + +pub fn rsrc(x: i32) -> rsrc { + rsrc { + x: x + } +} |