Skip to content

Commit

Permalink
Auto merge of rust-lang#5318 - matthiaskrgr:rustup_30, r=flip1995
Browse files Browse the repository at this point in the history
rustup rust-lang#69589

changelog: none
  • Loading branch information
bors committed Mar 15, 2020
2 parents c1a138c + 4d8ed5a commit d8bcdac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/dbg_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ declare_clippy_lint! {
declare_lint_pass!(DbgMacro => [DBG_MACRO]);

impl EarlyLintPass for DbgMacro {
fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::Mac) {
fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacCall) {
if mac.path == sym!(dbg) {
if let Some(sugg) = tts_span(mac.args.inner_tokens()).and_then(|span| snippet_opt(cx, span)) {
span_lint_and_sugg(
Expand Down
6 changes: 3 additions & 3 deletions clippy_lints/src/non_expressive_names.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::utils::{span_lint, span_lint_and_then};
use rustc_ast::ast::{
Arm, AssocItem, AssocItemKind, Attribute, Block, FnDecl, Ident, Item, ItemKind, Local, Mac, Pat, PatKind,
Arm, AssocItem, AssocItemKind, Attribute, Block, FnDecl, Ident, Item, ItemKind, Local, MacCall, Pat, PatKind,
};
use rustc_ast::attr;
use rustc_ast::visit::{walk_block, walk_expr, walk_pat, Visitor};
Expand Down Expand Up @@ -145,7 +145,7 @@ impl<'a, 'tcx, 'b> Visitor<'tcx> for SimilarNamesNameVisitor<'a, 'tcx, 'b> {
_ => walk_pat(self, pat),
}
}
fn visit_mac(&mut self, _mac: &Mac) {
fn visit_mac(&mut self, _mac: &MacCall) {
// do not check macs
}
}
Expand Down Expand Up @@ -347,7 +347,7 @@ impl<'a, 'tcx> Visitor<'tcx> for SimilarNamesLocalVisitor<'a, 'tcx> {
fn visit_item(&mut self, _: &Item) {
// do not recurse into inner items
}
fn visit_mac(&mut self, _mac: &Mac) {
fn visit_mac(&mut self, _mac: &MacCall) {
// do not check macs
}
}
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/utils/sugg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl<'a> Sugg<'a> {
| ast::ExprKind::InlineAsm(..)
| ast::ExprKind::Lit(..)
| ast::ExprKind::Loop(..)
| ast::ExprKind::Mac(..)
| ast::ExprKind::MacCall(..)
| ast::ExprKind::MethodCall(..)
| ast::ExprKind::Paren(..)
| ast::ExprKind::Path(..)
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::borrow::Cow;
use std::ops::Range;

use crate::utils::{snippet_with_applicability, span_lint, span_lint_and_sugg, span_lint_and_then};
use rustc_ast::ast::{Expr, ExprKind, Item, ItemKind, Mac, StrLit, StrStyle};
use rustc_ast::ast::{Expr, ExprKind, Item, ItemKind, MacCall, StrLit, StrStyle};
use rustc_ast::token;
use rustc_ast::tokenstream::TokenStream;
use rustc_errors::Applicability;
Expand Down Expand Up @@ -216,7 +216,7 @@ impl EarlyLintPass for Write {
self.in_debug_impl = false;
}

fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &Mac) {
fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &MacCall) {
if mac.path == sym!(println) {
span_lint(cx, PRINT_STDOUT, mac.span(), "use of `println!`");
if let (Some(fmt_str), _) = self.check_tts(cx, &mac.args.inner_tokens(), false) {
Expand Down

0 comments on commit d8bcdac

Please sign in to comment.