summaryrefslogtreecommitdiffstats
path: root/tests/ui/span/pub-struct-field.rs
blob: e149b9dbf5a6338ca677ab081908ec24068b44b8 (plain)
1
2
3
4
5
6
7
8
9
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() {}