From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/box/issue-82446.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/ui/box/issue-82446.rs (limited to 'tests/ui/box/issue-82446.rs') diff --git a/tests/ui/box/issue-82446.rs b/tests/ui/box/issue-82446.rs new file mode 100644 index 000000000..2960f7fbc --- /dev/null +++ b/tests/ui/box/issue-82446.rs @@ -0,0 +1,15 @@ +// https://github.com/rust-lang/rust/issues/82446 +// Spurious 'help: store this in the heap' regression test +trait MyTrait {} + +struct Foo { + val: Box +} + +fn make_it(val: &Box) { + Foo { + val //~ ERROR [E0308] + }; +} + +fn main() {} -- cgit v1.2.3