From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/resolve/suggest-path-for-tuple-struct.rs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/test/ui/resolve/suggest-path-for-tuple-struct.rs (limited to 'src/test/ui/resolve/suggest-path-for-tuple-struct.rs') diff --git a/src/test/ui/resolve/suggest-path-for-tuple-struct.rs b/src/test/ui/resolve/suggest-path-for-tuple-struct.rs new file mode 100644 index 000000000..c8bc3e79f --- /dev/null +++ b/src/test/ui/resolve/suggest-path-for-tuple-struct.rs @@ -0,0 +1,26 @@ +mod module { + pub struct SomeTupleStruct(u8); + pub struct SomeRegularStruct { + foo: u8 + } + + impl SomeTupleStruct { + pub fn new() -> Self { + Self(0) + } + } + impl SomeRegularStruct { + pub fn new() -> Self { + Self { foo: 0 } + } + } +} + +use module::{SomeTupleStruct, SomeRegularStruct}; + +fn main() { + let _ = SomeTupleStruct.new(); + //~^ ERROR expected value, found struct `SomeTupleStruct` + let _ = SomeRegularStruct.new(); + //~^ ERROR expected value, found struct `SomeRegularStruct` +} -- cgit v1.2.3