@@ -112,14 +112,13 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
112
112
pub fn expand ( & self , macro_call : & ast:: MacroCall ) -> Option < SyntaxNode > {
113
113
self . imp . expand ( macro_call)
114
114
}
115
-
116
- pub fn expand_hypothetical (
115
+ pub fn speculative_expand (
117
116
& self ,
118
117
actual_macro_call : & ast:: MacroCall ,
119
118
hypothetical_args : & ast:: TokenTree ,
120
119
token_to_map : SyntaxToken ,
121
120
) -> Option < ( SyntaxNode , SyntaxToken ) > {
122
- self . imp . expand_hypothetical ( actual_macro_call, hypothetical_args, token_to_map)
121
+ self . imp . speculative_expand ( actual_macro_call, hypothetical_args, token_to_map)
123
122
}
124
123
125
124
pub fn descend_into_macros ( & self , token : SyntaxToken ) -> SyntaxToken {
@@ -311,7 +310,7 @@ impl<'db> SemanticsImpl<'db> {
311
310
Some ( node)
312
311
}
313
312
314
- fn expand_hypothetical (
313
+ fn speculative_expand (
315
314
& self ,
316
315
actual_macro_call : & ast:: MacroCall ,
317
316
hypothetical_args : & ast:: TokenTree ,
@@ -756,7 +755,7 @@ impl<'a> SemanticsScope<'a> {
756
755
757
756
/// Resolve a path as-if it was written at the given scope. This is
758
757
/// necessary a heuristic, as it doesn't take hygiene into account.
759
- pub fn resolve_hypothetical ( & self , path : & ast:: Path ) -> Option < PathResolution > {
758
+ pub fn speculative_resolve ( & self , path : & ast:: Path ) -> Option < PathResolution > {
760
759
let hygiene = Hygiene :: new ( self . db . upcast ( ) , self . file_id ) ;
761
760
let path = Path :: from_src ( path. clone ( ) , & hygiene) ?;
762
761
self . resolve_hir_path ( & path)
0 commit comments