Use a dummy ident for a lint_if_path_starts_with_module
call.
This is pretty weird code. As the `HACK` comment indicates, we push the empty ident here only to make the path longer, so certain checks to occur within `lint_if_path_starts_with_module`. `dummy` is a better choice because it explicitly communicates that the actual value doesn't matter.
This commit is contained in:
parent
2b43e66496
commit
c12b4aade0
1 changed files with 1 additions and 1 deletions
|
@ -1012,7 +1012,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
||||||
// HACK(eddyb) `lint_if_path_starts_with_module` needs at least
|
// HACK(eddyb) `lint_if_path_starts_with_module` needs at least
|
||||||
// 2 segments, so the `resolve_path` above won't trigger it.
|
// 2 segments, so the `resolve_path` above won't trigger it.
|
||||||
let mut full_path = import.module_path.clone();
|
let mut full_path = import.module_path.clone();
|
||||||
full_path.push(Segment::from_ident(Ident::empty()));
|
full_path.push(Segment::from_ident(Ident::dummy()));
|
||||||
self.lint_if_path_starts_with_module(Some(finalize), &full_path, None);
|
self.lint_if_path_starts_with_module(Some(finalize), &full_path, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue