diff options
Diffstat (limited to 'src/test/ui/did_you_mean/issue-42599_available_fields_note.rs')
-rw-r--r-- | src/test/ui/did_you_mean/issue-42599_available_fields_note.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/test/ui/did_you_mean/issue-42599_available_fields_note.rs b/src/test/ui/did_you_mean/issue-42599_available_fields_note.rs deleted file mode 100644 index c377dfc12..000000000 --- a/src/test/ui/did_you_mean/issue-42599_available_fields_note.rs +++ /dev/null @@ -1,37 +0,0 @@ -mod submodule { - - #[derive(Default)] - pub struct Demo { - pub favorite_integer: isize, - secret_integer: isize, - pub innocently_misspellable: (), - another_field: bool, - yet_another_field: bool, - always_more_fields: bool, - and_ever: bool, - } - - impl Demo { - fn new_with_secret_two() -> Self { - Self { secret_integer: 2, inocently_mispellable: () } - //~^ ERROR no field - } - - fn new_with_secret_three() -> Self { - Self { secret_integer: 3, egregiously_nonexistent_field: () } - //~^ ERROR no field - } - } - -} - -fn main() { - use submodule::Demo; - - let demo = Demo::default(); - let innocent_field_misaccess = demo.inocently_mispellable; - //~^ ERROR no field - // note shouldn't suggest private fields - let egregious_field_misaccess = demo.egregiously_nonexistent_field; - //~^ ERROR no field -} |