File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ impl MarkSymbolVisitor {
107107 match item. node {
108108 ast:: item_fn( ..)
109109 | ast:: item_ty( ..)
110+ | ast:: item_enum( ..)
111+ | ast:: item_struct( ..)
110112 | ast:: item_static( ..) => {
111113 visit:: walk_item ( self , item, ( ) ) ;
112114 }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ static priv_static: int = 0; //~ ERROR: code is never used
2727static used_static: int = 0 ;
2828pub static used_static2: int = used_static;
2929static USED_STATIC : int = 0 ;
30+ static STATIC_USED_IN_ENUM_DISCRIMINANT : uint = 10 ;
3031
3132pub type typ = ~UsedStruct4 ;
3233pub struct PubStruct ( ) ;
@@ -41,8 +42,15 @@ struct SemiUsedStruct;
4142impl SemiUsedStruct {
4243 fn la_la_la ( ) { }
4344}
45+ struct StructUsedAsField ;
46+ struct StructUsedInEnum ;
47+ pub struct PubStruct2 {
48+ struct_used_as_field : * StructUsedAsField
49+ }
4450
4551pub enum pub_enum { foo1, bar1 }
52+ pub enum pub_enum2 { a( ~StructUsedInEnum ) }
53+ pub enum pub_enum3 { Foo = STATIC_USED_IN_ENUM_DISCRIMINANT }
4654enum priv_enum { foo2, bar2 } //~ ERROR: code is never used
4755enum used_enum { foo3, bar3 }
4856
You can’t perform that action at this time.
0 commit comments