File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ impl<'a> SubstituteTypeParams<'a> {
106
106
_ => return None ,
107
107
} ;
108
108
// FIXME: use `hir::Path::from_src` instead.
109
+ #[ allow( deprecated) ]
109
110
let path = hir:: Path :: from_ast ( path) ?;
110
111
let resolution = self . source_scope . resolve_hir_path ( & path) ?;
111
112
match resolution {
@@ -150,6 +151,7 @@ impl<'a> QualifyPaths<'a> {
150
151
return None ;
151
152
}
152
153
// FIXME: use `hir::Path::from_src` instead.
154
+ #[ allow( deprecated) ]
153
155
let hir_path = hir:: Path :: from_ast ( p. clone ( ) ) ;
154
156
let resolution = self . source_scope . resolve_hir_path ( & hir_path?) ?;
155
157
match resolution {
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ pub enum GenericArg {
154
154
155
155
impl Path {
156
156
/// Converts an `ast::Path` to `Path`. Works with use trees.
157
- /// DEPRECATED: It does not handle `$crate` from macro call.
157
+ # [ deprecated = "Doesn't handle hygiene, don't add new calls, remove old ones" ]
158
158
pub fn from_ast ( path : ast:: Path ) -> Option < Path > {
159
159
lower:: lower_path ( path, & Hygiene :: new_unhygienic ( ) )
160
160
}
Original file line number Diff line number Diff line change @@ -381,6 +381,7 @@ impl<'a> CompletionContext<'a> {
381
381
self . is_path_type = path. syntax ( ) . parent ( ) . and_then ( ast:: PathType :: cast) . is_some ( ) ;
382
382
self . has_type_args = segment. type_arg_list ( ) . is_some ( ) ;
383
383
384
+ #[ allow( deprecated) ]
384
385
if let Some ( path) = hir:: Path :: from_ast ( path. clone ( ) ) {
385
386
if let Some ( path_prefix) = path. qualifier ( ) {
386
387
self . path_prefix = Some ( path_prefix) ;
You can’t perform that action at this time.
0 commit comments