diff options
Diffstat (limited to 'tests/ui/span/pub-struct-field.rs')
-rw-r--r-- | tests/ui/span/pub-struct-field.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/span/pub-struct-field.rs b/tests/ui/span/pub-struct-field.rs new file mode 100644 index 000000000..e149b9dbf --- /dev/null +++ b/tests/ui/span/pub-struct-field.rs @@ -0,0 +1,10 @@ +// Regression test for issue #26083 and #35435 +// Test that span for public struct fields start at `pub` + +struct Foo { + bar: u8, + pub bar: u8, //~ ERROR is already declared + pub(crate) bar: u8, //~ ERROR is already declared +} + +fn main() {} |