@@ -1146,12 +1146,13 @@ impl Resolver {
11461146 }
11471147
11481148 // These items live in the value namespace.
1149- item_const ( * ) => {
1149+ item_static ( _ , m , _ ) => {
11501150 let ( name_bindings, _) =
11511151 self . add_child ( ident, parent, ForbidDuplicateValues , sp) ;
1152+ let mutbl = m == ast:: m_mutbl;
11521153
11531154 name_bindings. define_value
1154- ( privacy, def_const ( local_def ( item. id ) ) , sp) ;
1155+ ( privacy, def_static ( local_def ( item. id ) , mutbl ) , sp) ;
11551156 }
11561157 item_fn( _, purity, _, _, _) => {
11571158 let ( name_bindings, new_parent) =
@@ -1566,7 +1567,7 @@ impl Resolver {
15661567 }
15671568 }
15681569 foreign_item_const( * ) => {
1569- let def = def_const ( local_def( foreign_item. id) ) ;
1570+ let def = def_static ( local_def( foreign_item. id) , false ) ;
15701571 name_bindings. define_value( Public , def, foreign_item. span) ;
15711572
15721573 visit_foreign_item( foreign_item, ( new_parent, visitor) ) ;
@@ -1673,7 +1674,7 @@ impl Resolver {
16731674 let privacy = variant_visibility_to_privacy( visibility, true) ;
16741675 child_name_bindings. define_value( privacy, def, dummy_sp( ) ) ;
16751676 }
1676- def_fn( * ) | def_static_method( * ) | def_const ( * ) => {
1677+ def_fn( * ) | def_static_method( * ) | def_static ( * ) => {
16771678 debug!( "( building reduced graph for external \
16781679 crate ) building value %s", final_ident) ;
16791680 child_name_bindings. define_value( privacy, def, dummy_sp( ) ) ;
@@ -3686,7 +3687,7 @@ impl Resolver {
36863687 visitor) ;
36873688 }
36883689
3689- item_const ( * ) => {
3690+ item_static ( * ) => {
36903691 self . with_constant_rib( || {
36913692 visit_item( item, ( ( ) , visitor) ) ;
36923693 } ) ;
@@ -4344,7 +4345,7 @@ impl Resolver {
43444345 Some ( def @ def_struct( * ) ) => {
43454346 self . record_def( pattern. id, def) ;
43464347 }
4347- Some ( def @ def_const ( * ) ) => {
4348+ Some ( def @ def_static ( * ) ) => {
43484349 self . enforce_default_binding_mode(
43494350 pattern,
43504351 binding_mode,
@@ -4376,7 +4377,7 @@ impl Resolver {
43764377 Some ( def @ def_fn( * ) ) |
43774378 Some ( def @ def_variant( * ) ) |
43784379 Some ( def @ def_struct( * ) ) |
4379- Some ( def @ def_const ( * ) ) => {
4380+ Some ( def @ def_static ( * ) ) => {
43804381 self . record_def( pattern. id, def) ;
43814382 }
43824383 Some ( _) => {
@@ -4459,7 +4460,7 @@ impl Resolver {
44594460 def @ def_variant( * ) | def @ def_struct( * ) => {
44604461 return FoundStructOrEnumVariant ( def) ;
44614462 }
4462- def @ def_const ( * ) => {
4463+ def @ def_static ( _ , false ) => {
44634464 return FoundConst ( def) ;
44644465 }
44654466 _ => {
0 commit comments