Add a regression test for public struct field spans

This commit is contained in:
Chris Hellmuth 2015-06-07 17:29:09 -06:00
parent a72283832d
commit 2938d92a35

View File

@ -0,0 +1,20 @@
// Regression test for issue #26083
// Test that span for public struct fields start at `pub` instead of the identifier
struct Foo {
pub bar: u8,
pub
//~^ error: field `bar` is already declared [E0124]
bar: u8,
pub bar:
//~^ error: field `bar` is already declared [E0124]
u8,
bar:
//~^ error: field `bar` is already declared [E0124]
u8,
}
fn main() { }