@@ -210,7 +210,7 @@ pub fn expand_speculative(
210210 let mut speculative_expansion = match loc. def . kind {
211211 MacroDefKind :: ProcMacro ( expander, ..) => {
212212 tt. delimiter = tt:: Delimiter :: unspecified ( ) ;
213- expander. expand ( db, loc. krate , & tt, attr_arg. as_ref ( ) )
213+ expander. expand ( db, loc. def . krate , loc . krate , & tt, attr_arg. as_ref ( ) )
214214 }
215215 MacroDefKind :: BuiltInAttr ( BuiltinAttrExpander :: Derive , _) => {
216216 pseudo_derive_attr_expansion ( & tt, attr_arg. as_ref ( ) ?)
@@ -256,9 +256,9 @@ fn parse_macro_expansion(
256256 macro_file : MacroFile ,
257257) -> ExpandResult < Option < ( Parse < SyntaxNode > , Arc < mbe:: TokenMap > ) > > {
258258 let _p = profile:: span ( "parse_macro_expansion" ) ;
259- let result = db. macro_expand ( macro_file. macro_call_id ) ;
259+ let mbe :: ValueResult { value , err } = db. macro_expand ( macro_file. macro_call_id ) ;
260260
261- if let Some ( err) = & result . err {
261+ if let Some ( err) = & err {
262262 // Note:
263263 // The final goal we would like to make all parse_macro success,
264264 // such that the following log will not call anyway.
@@ -279,9 +279,9 @@ fn parse_macro_expansion(
279279 parents
280280 ) ;
281281 }
282- let tt = match result . value {
282+ let tt = match value {
283283 Some ( tt) => tt,
284- None => return ExpandResult { value : None , err : result . err } ,
284+ None => return ExpandResult { value : None , err } ,
285285 } ;
286286
287287 let expand_to = macro_expand_to ( db, macro_file. macro_call_id ) ;
@@ -291,7 +291,7 @@ fn parse_macro_expansion(
291291
292292 let ( parse, rev_token_map) = token_tree_to_syntax_node ( & tt, expand_to) ;
293293
294- ExpandResult { value : Some ( ( parse, Arc :: new ( rev_token_map) ) ) , err : result . err }
294+ ExpandResult { value : Some ( ( parse, Arc :: new ( rev_token_map) ) ) , err }
295295}
296296
297297fn macro_arg (
@@ -504,7 +504,7 @@ fn expand_proc_macro(db: &dyn ExpandDatabase, id: MacroCallId) -> ExpandResult<t
504504 _ => None ,
505505 } ;
506506
507- expander. expand ( db, loc. krate , & macro_arg. 0 , attr_arg. as_ref ( ) )
507+ expander. expand ( db, loc. def . krate , loc . krate , & macro_arg. 0 , attr_arg. as_ref ( ) )
508508}
509509
510510fn hygiene_frame ( db : & dyn ExpandDatabase , file_id : HirFileId ) -> Arc < HygieneFrame > {
0 commit comments