rust/tests/ui/span/pub-struct-field.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
249 B
Rust
Raw Normal View History

2016-08-08 07:35:15 -05:00
// Regression test for issue #26083 and #35435
// Test that span for public struct fields start at `pub`
2016-08-08 07:35:15 -05:00
struct Foo {
bar: u8,
2017-11-20 06:13:27 -06:00
pub bar: u8, //~ ERROR is already declared
pub(crate) bar: u8, //~ ERROR is already declared
}
2016-08-08 07:35:15 -05:00
fn main() {}