@@ -84,7 +84,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
8484 /// Reachable macros with block module parents exist due to `#[macro_export] macro_rules!`,
8585 /// but they cannot use def-site hygiene, so the assumption holds
8686 /// (<https://github.com/rust-lang/rust/pull/77984#issuecomment-712445508>).
87- pub ( crate ) fn get_nearest_non_block_module ( & mut self , mut def_id : DefId ) -> Module < ' ra > {
87+ pub ( crate ) fn get_nearest_non_block_module ( & self , mut def_id : DefId ) -> Module < ' ra > {
8888 loop {
8989 match self . get_module ( def_id) {
9090 Some ( module) => return module,
@@ -93,14 +93,14 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
9393 }
9494 }
9595
96- pub ( crate ) fn expect_module ( & mut self , def_id : DefId ) -> Module < ' ra > {
96+ pub ( crate ) fn expect_module ( & self , def_id : DefId ) -> Module < ' ra > {
9797 self . get_module ( def_id) . expect ( "argument `DefId` is not a module" )
9898 }
9999
100100 /// If `def_id` refers to a module (in resolver's sense, i.e. a module item, crate root, enum,
101101 /// or trait), then this function returns that module's resolver representation, otherwise it
102102 /// returns `None`.
103- pub ( crate ) fn get_module ( & mut self , def_id : DefId ) -> Option < Module < ' ra > > {
103+ pub ( crate ) fn get_module ( & self , def_id : DefId ) -> Option < Module < ' ra > > {
104104 match def_id. as_local ( ) {
105105 Some ( local_def_id) => self . local_module_map . get ( & local_def_id) . copied ( ) ,
106106 None => {
@@ -133,7 +133,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
133133 }
134134 }
135135
136- pub ( crate ) fn expn_def_scope ( & mut self , expn_id : ExpnId ) -> Module < ' ra > {
136+ pub ( crate ) fn expn_def_scope ( & self , expn_id : ExpnId ) -> Module < ' ra > {
137137 match expn_id. expn_data ( ) . macro_def_id {
138138 Some ( def_id) => self . macro_def_scope ( def_id) ,
139139 None => expn_id
@@ -143,7 +143,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
143143 }
144144 }
145145
146- pub ( crate ) fn macro_def_scope ( & mut self , def_id : DefId ) -> Module < ' ra > {
146+ pub ( crate ) fn macro_def_scope ( & self , def_id : DefId ) -> Module < ' ra > {
147147 if let Some ( id) = def_id. as_local ( ) {
148148 self . local_macro_def_scopes [ & id]
149149 } else {
0 commit comments