Skip to content

Commit 411e3ba

Browse files
committed
Auto merge of #6118 - ebroto:rustup, r=ebroto
Rustup changelog: none r? `@ghost`
2 parents 2ed5143 + 5554641 commit 411e3ba

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

clippy_lints/src/attrs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,17 @@ declare_clippy_lint! {
137137
/// **Example:**
138138
/// ```rust
139139
/// // Good (as inner attribute)
140-
/// #![inline(always)]
140+
/// #![allow(dead_code)]
141141
///
142142
/// fn this_is_fine() { }
143143
///
144144
/// // Bad
145-
/// #[inline(always)]
145+
/// #[allow(dead_code)]
146146
///
147147
/// fn not_quite_good_code() { }
148148
///
149149
/// // Good (as outer attribute)
150-
/// #[inline(always)]
150+
/// #[allow(dead_code)]
151151
/// fn this_is_fine_too() { }
152152
/// ```
153153
pub EMPTY_LINE_AFTER_OUTER_ATTR,

clippy_lints/src/missing_const_for_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {
118118

119119
let mir = cx.tcx.optimized_mir(def_id);
120120

121-
if let Err((span, err)) = is_min_const_fn(cx.tcx, def_id.to_def_id(), &mir) {
121+
if let Err((span, err)) = is_min_const_fn(cx.tcx, &mir) {
122122
if rustc_mir::const_eval::is_min_const_fn(cx.tcx, def_id.to_def_id()) {
123123
cx.tcx.sess.span_err(span, &err);
124124
}

clippy_lints/src/redundant_clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantClone {
8686
let mir = cx.tcx.optimized_mir(def_id.to_def_id());
8787

8888
let maybe_storage_live_result = MaybeStorageLive
89-
.into_engine(cx.tcx, mir, def_id.to_def_id())
89+
.into_engine(cx.tcx, mir)
9090
.pass_name("redundant_clone")
9191
.iterate_to_fixpoint()
9292
.into_results_cursor(mir);

clippy_lints/src/utils/qualify_min_const_fn.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ use std::borrow::Cow;
1313

1414
type McfResult = Result<(), (Span, Cow<'static, str>)>;
1515

16-
pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, def_id: DefId, body: &'a Body<'tcx>) -> McfResult {
16+
pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>) -> McfResult {
17+
let def_id = body.source.def_id();
1718
let mut current = def_id;
1819
loop {
1920
let predicates = tcx.predicates_of(current);

0 commit comments

Comments
 (0)