Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser
rustc_span: `Ident::invalid` -> `Ident::empty` The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s as well.
This commit is contained in:
commit
2fd765c1d9
20 changed files with 34 additions and 35 deletions
|
@ -1327,7 +1327,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
|
|||
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::invalid()));
|
||||
path.insert(0, Segment::from_ident(Ident::empty()));
|
||||
}
|
||||
_ => return None,
|
||||
}
|
||||
|
|
|
@ -978,7 +978,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
|
|||
// HACK(eddyb) `lint_if_path_starts_with_module` needs at least
|
||||
// 2 segments, so the `resolve_path` above won't trigger it.
|
||||
let mut full_path = import.module_path.clone();
|
||||
full_path.push(Segment::from_ident(Ident::invalid()));
|
||||
full_path.push(Segment::from_ident(Ident::empty()));
|
||||
self.r.lint_if_path_starts_with_module(
|
||||
import.crate_lint(),
|
||||
&full_path,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue