@@ -1369,7 +1369,7 @@ pub trait AsMacroCall {
1369
1369
& self ,
1370
1370
db : & dyn ExpandDatabase ,
1371
1371
krate : CrateId ,
1372
- resolver : impl Fn ( path:: ModPath ) -> Option < MacroDefId > + Copy ,
1372
+ resolver : impl Fn ( & path:: ModPath ) -> Option < MacroDefId > + Copy ,
1373
1373
) -> Option < MacroCallId > {
1374
1374
self . as_call_id_with_errors ( db, krate, resolver) . ok ( ) ?. value
1375
1375
}
@@ -1378,7 +1378,7 @@ pub trait AsMacroCall {
1378
1378
& self ,
1379
1379
db : & dyn ExpandDatabase ,
1380
1380
krate : CrateId ,
1381
- resolver : impl Fn ( path:: ModPath ) -> Option < MacroDefId > + Copy ,
1381
+ resolver : impl Fn ( & path:: ModPath ) -> Option < MacroDefId > + Copy ,
1382
1382
) -> Result < ExpandResult < Option < MacroCallId > > , UnresolvedMacro > ;
1383
1383
}
1384
1384
@@ -1387,7 +1387,7 @@ impl AsMacroCall for InFile<&ast::MacroCall> {
1387
1387
& self ,
1388
1388
db : & dyn ExpandDatabase ,
1389
1389
krate : CrateId ,
1390
- resolver : impl Fn ( path:: ModPath ) -> Option < MacroDefId > + Copy ,
1390
+ resolver : impl Fn ( & path:: ModPath ) -> Option < MacroDefId > + Copy ,
1391
1391
) -> Result < ExpandResult < Option < MacroCallId > > , UnresolvedMacro > {
1392
1392
let expands_to = hir_expand:: ExpandTo :: from_call_site ( self . value ) ;
1393
1393
let ast_id = AstId :: new ( self . file_id , db. ast_id_map ( self . file_id ) . ast_id ( self . value ) ) ;
@@ -1436,7 +1436,7 @@ fn macro_call_as_call_id(
1436
1436
call_site : SyntaxContextId ,
1437
1437
expand_to : ExpandTo ,
1438
1438
krate : CrateId ,
1439
- resolver : impl Fn ( path:: ModPath ) -> Option < MacroDefId > + Copy ,
1439
+ resolver : impl Fn ( & path:: ModPath ) -> Option < MacroDefId > + Copy ,
1440
1440
) -> Result < Option < MacroCallId > , UnresolvedMacro > {
1441
1441
macro_call_as_call_id_with_eager ( db, call, call_site, expand_to, krate, resolver, resolver)
1442
1442
. map ( |res| res. value )
@@ -1448,11 +1448,10 @@ fn macro_call_as_call_id_with_eager(
1448
1448
call_site : SyntaxContextId ,
1449
1449
expand_to : ExpandTo ,
1450
1450
krate : CrateId ,
1451
- resolver : impl FnOnce ( path:: ModPath ) -> Option < MacroDefId > ,
1452
- eager_resolver : impl Fn ( path:: ModPath ) -> Option < MacroDefId > ,
1451
+ resolver : impl FnOnce ( & path:: ModPath ) -> Option < MacroDefId > ,
1452
+ eager_resolver : impl Fn ( & path:: ModPath ) -> Option < MacroDefId > ,
1453
1453
) -> Result < ExpandResult < Option < MacroCallId > > , UnresolvedMacro > {
1454
- let def =
1455
- resolver ( call. path . clone ( ) ) . ok_or_else ( || UnresolvedMacro { path : call. path . clone ( ) } ) ?;
1454
+ let def = resolver ( & call. path ) . ok_or_else ( || UnresolvedMacro { path : call. path . clone ( ) } ) ?;
1456
1455
1457
1456
let res = match def. kind {
1458
1457
MacroDefKind :: BuiltInEager ( ..) => expand_eager_macro_input (
0 commit comments