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

11 lines
249 B
Rust
Raw Normal View History

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