rustc: Make x-ray resolution work with non-legacy-exports

Code generated for the test runner needs to break visibility rules
This commit is contained in:
Brian Anderson 2012-09-21 19:25:30 -07:00
parent 3d59ac3a19
commit 60a1497ebb

View file

@ -4204,7 +4204,7 @@ impl Resolver {
match containing_module.children.find(name) {
Some(child_name_bindings) => {
match (*child_name_bindings).def_for_namespace(namespace) {
Some(def) if def.privacy == Public => {
Some(def) if def.privacy == Public || xray == Xray => {
// Found it. Stop the search here.
return ChildNameDefinition(def.def);
}