Rename kw::Invalid -> kw::Empty

See 220054471
for context.
This commit is contained in:
Joshua Nelson 2020-12-29 20:28:08 -05:00
parent dc6121ca68
commit edeac1778c
27 changed files with 46 additions and 46 deletions

View file

@ -868,7 +868,7 @@ impl EarlyLintPass for AnonymousParameters {
if let ast::AssocItemKind::Fn(_, ref sig, _, _) = it.kind {
for arg in sig.decl.inputs.iter() {
if let ast::PatKind::Ident(_, ident, None) = arg.pat.kind {
if ident.name == kw::Invalid {
if ident.name == kw::Empty {
cx.struct_span_lint(ANONYMOUS_PARAMETERS, arg.pat.span, |lint| {
let ty_snip = cx.sess.source_map().span_to_snippet(arg.ty.span);

View file

@ -728,7 +728,7 @@ impl<'tcx> LateContext<'tcx> {
/// Check if a `DefId`'s path matches the given absolute type path usage.
///
/// Anonymous scopes such as `extern` imports are matched with `kw::Invalid`;
/// Anonymous scopes such as `extern` imports are matched with `kw::Empty`;
/// inherent `impl` blocks are matched with the name of the type.
///
/// Instead of using this method, it is often preferable to instead use