diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-60057.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-60057.rs b/src/test/ui/issues/issue-60057.rs new file mode 100644 index 000000000..b52343ada --- /dev/null +++ b/src/test/ui/issues/issue-60057.rs @@ -0,0 +1,19 @@ +struct A { + banana: u8, +} + +impl A { + fn new(peach: u8) -> A { + A { + banana: banana //~ ERROR cannot find value `banana` in this scope + } + } + + fn foo(&self, peach: u8) -> A { + A { + banana: banana //~ ERROR cannot find value `banana` in this scope + } + } +} + +fn main() {} |