parent
dc6121ca68
commit
edeac1778c
27 changed files with 46 additions and 46 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue