Auto merge of #4996 - JohnTitor:rustup, r=matthiaskrgr
Rustup to rust-lang/rust#67803 and rust-lang/rust#67137 changelog: none
This commit is contained in:
commit
732825dcff
@ -130,7 +130,7 @@ fn match_assert_with_message<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx E
|
|||||||
if let Some(begin_panic_call) = &inner_block.expr;
|
if let Some(begin_panic_call) = &inner_block.expr;
|
||||||
// function call
|
// function call
|
||||||
if let Some(args) = match_function_call(cx, begin_panic_call, &paths::BEGIN_PANIC);
|
if let Some(args) = match_function_call(cx, begin_panic_call, &paths::BEGIN_PANIC);
|
||||||
if args.len() == 2;
|
if args.len() == 1;
|
||||||
// bind the second argument of the `assert!` macro if it exists
|
// bind the second argument of the `assert!` macro if it exists
|
||||||
if let panic_message = snippet_opt(cx, args[0].span);
|
if let panic_message = snippet_opt(cx, args[0].span);
|
||||||
// second argument of begin_panic is irrelevant
|
// second argument of begin_panic is irrelevant
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use rustc::hir::intravisit as visit;
|
use rustc::hir::intravisit as visit;
|
||||||
|
use rustc::hir::HirIdSet;
|
||||||
use rustc::hir::{self, *};
|
use rustc::hir::{self, *};
|
||||||
use rustc::impl_lint_pass;
|
use rustc::impl_lint_pass;
|
||||||
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
|
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
|
||||||
use rustc::ty::layout::LayoutOf;
|
use rustc::ty::layout::LayoutOf;
|
||||||
use rustc::ty::{self, Ty};
|
use rustc::ty::{self, Ty};
|
||||||
use rustc::util::nodemap::HirIdSet;
|
|
||||||
use rustc_session::declare_tool_lint;
|
use rustc_session::declare_tool_lint;
|
||||||
use rustc_span::source_map::Span;
|
use rustc_span::source_map::Span;
|
||||||
use rustc_typeck::expr_use_visitor::*;
|
use rustc_typeck::expr_use_visitor::*;
|
||||||
|
@ -4,10 +4,10 @@ use crate::utils::{get_trait_def_id, implements_trait, return_ty, same_tys, span
|
|||||||
use if_chain::if_chain;
|
use if_chain::if_chain;
|
||||||
use rustc::hir;
|
use rustc::hir;
|
||||||
use rustc::hir::def_id::DefId;
|
use rustc::hir::def_id::DefId;
|
||||||
|
use rustc::hir::HirIdSet;
|
||||||
use rustc::impl_lint_pass;
|
use rustc::impl_lint_pass;
|
||||||
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
use rustc::lint::{in_external_macro, LateContext, LateLintPass, LintArray, LintContext, LintPass};
|
||||||
use rustc::ty::{self, Ty};
|
use rustc::ty::{self, Ty};
|
||||||
use rustc::util::nodemap::HirIdSet;
|
|
||||||
use rustc_errors::Applicability;
|
use rustc_errors::Applicability;
|
||||||
use rustc_session::declare_tool_lint;
|
use rustc_session::declare_tool_lint;
|
||||||
use rustc_span::source_map::Span;
|
use rustc_span::source_map::Span;
|
||||||
|
@ -98,7 +98,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PanicUnimplemented {
|
|||||||
if let ExprKind::Block(ref block, _) = expr.kind;
|
if let ExprKind::Block(ref block, _) = expr.kind;
|
||||||
if let Some(ref ex) = block.expr;
|
if let Some(ref ex) = block.expr;
|
||||||
if let Some(params) = match_function_call(cx, ex, &paths::BEGIN_PANIC);
|
if let Some(params) = match_function_call(cx, ex, &paths::BEGIN_PANIC);
|
||||||
if params.len() == 2;
|
if params.len() == 1;
|
||||||
then {
|
then {
|
||||||
if is_expn_of(expr.span, "unimplemented").is_some() {
|
if is_expn_of(expr.span, "unimplemented").is_some() {
|
||||||
let span = get_outer_span(expr);
|
let span = get_outer_span(expr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user