]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_resolve/diagnostics.rs
Eliminate unnecessary `Ident::with_empty_ctxt`s
[rust.git] / src / librustc_resolve / diagnostics.rs
index 730927d2bb57030eb724dd552dd9ac8c85b67fcf..8b5e2b86d5ee8025804b1c4b802497e0833759fb 100644 (file)
@@ -460,7 +460,7 @@ pub(crate) fn make_path_suggestion(
             (Some(fst), _) if fst.ident.span.rust_2018() &&
                               !fst.ident.is_path_segment_keyword() => {
                 // Insert a placeholder that's later replaced by `self`/`super`/etc.
-                path.insert(0, Segment::from_ident(Ident::with_empty_ctxt(kw::Invalid)));
+                path.insert(0, Segment::from_ident(Ident::invalid()));
             }
             _ => return None,
         }