Skip to content

Commit 6be80a1

Browse files
committed
Add feature to set path-based visibility of macro_rules to pub by default
1 parent 3391c01 commit 6be80a1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

compiler/rustc_resolve/src/build_reduced_graph.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,11 +1299,7 @@ impl<'a, 'ra, 'tcx> BuildReducedGraphVisitor<'a, 'ra, 'tcx> {
12991299
let ident = ident.normalize_to_macros_2_0();
13001300
self.r.macro_names.insert(ident);
13011301
let is_macro_export = ast::attr::contains_name(&item.attrs, sym::macro_export);
1302-
let vis = if is_macro_export {
1303-
Visibility::Public
1304-
} else {
1305-
Visibility::Restricted(CRATE_DEF_ID)
1306-
};
1302+
let vis = Visibility::Public;
13071303
let binding = self.r.arenas.new_res_binding(res, vis.to_def_id(), span, expansion);
13081304
self.r.set_binding_parent_module(binding, parent_scope.module);
13091305
self.r.all_macro_rules.insert(ident.name);

0 commit comments

Comments
 (0)