@@ -25,7 +25,6 @@ use syntax::ast::*;
25
25
use syntax:: ast;
26
26
use syntax:: ast_util:: { def_id_of_def, local_def, mtwt_resolve} ;
27
27
use syntax:: ast_util:: { path_to_ident, walk_pat, trait_method_to_ty_method} ;
28
- use syntax:: attr;
29
28
use syntax:: parse:: token;
30
29
use syntax:: parse:: token:: { ident_interner, interner_get} ;
31
30
use syntax:: parse:: token:: special_idents;
@@ -254,19 +253,6 @@ enum MethodSort {
254
253
Provided ( NodeId )
255
254
}
256
255
257
- // The X-ray flag indicates that a context has the X-ray privilege, which
258
- // allows it to reference private names. Currently, this is used for the test
259
- // runner.
260
- //
261
- // FIXME #4947: The X-ray flag is kind of questionable in the first
262
- // place. It might be better to introduce an expr_xray_path instead.
263
-
264
- #[ deriving( Eq ) ]
265
- enum XrayFlag {
266
- NoXray , //< Private items cannot be accessed.
267
- Xray //< Private items can be accessed.
268
- }
269
-
270
256
enum UseLexicalScopeFlag {
271
257
DontUseLexicalScope ,
272
258
UseLexicalScope
@@ -831,7 +817,6 @@ fn Resolver(session: Session,
831
817
type_ribs : @mut ~[ ] ,
832
818
label_ribs : @mut ~[ ] ,
833
819
834
- xray_context : NoXray ,
835
820
current_trait_refs : None ,
836
821
837
822
self_ident : special_idents:: self_,
@@ -883,10 +868,6 @@ struct Resolver {
883
868
// The current set of local scopes, for labels.
884
869
label_ribs : @mut ~[ @Rib ] ,
885
870
886
- // Whether the current context is an X-ray context. An X-ray context is
887
- // allowed to access private names of any module.
888
- xray_context : XrayFlag ,
889
-
890
871
// The trait that the current context can refer to.
891
872
current_trait_refs : Option < ~[ DefId ] > ,
892
873
@@ -3545,13 +3526,6 @@ impl Resolver {
3545
3526
debug ! ( "(resolving item) resolving {}" ,
3546
3527
self . session. str_of( item. ident) ) ;
3547
3528
3548
- // Items with the !resolve_unexported attribute are X-ray contexts.
3549
- // This is used to allow the test runner to run unexported tests.
3550
- let orig_xray_flag = self . xray_context ;
3551
- if attr:: contains_name ( item. attrs , "!resolve_unexported" ) {
3552
- self . xray_context = Xray ;
3553
- }
3554
-
3555
3529
match item. node {
3556
3530
3557
3531
// enum item: resolve all the variants' discrs,
@@ -3715,8 +3689,6 @@ impl Resolver {
3715
3689
fail ! ( "item macros unimplemented" )
3716
3690
}
3717
3691
}
3718
-
3719
- self . xray_context = orig_xray_flag;
3720
3692
}
3721
3693
3722
3694
fn with_type_parameter_rib ( & mut self ,
0 commit comments