Skip to content

Commit

Permalink
Auto merge of #6118 - ebroto:rustup, r=ebroto
Browse files Browse the repository at this point in the history
Rustup

changelog: none

r? `@ghost`
  • Loading branch information
bors committed Oct 5, 2020
2 parents 2ed5143 + 5554641 commit 411e3ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@ declare_clippy_lint! {
/// **Example:**
/// ```rust
/// // Good (as inner attribute)
/// #![inline(always)]
/// #![allow(dead_code)]
///
/// fn this_is_fine() { }
///
/// // Bad
/// #[inline(always)]
/// #[allow(dead_code)]
///
/// fn not_quite_good_code() { }
///
/// // Good (as outer attribute)
/// #[inline(always)]
/// #[allow(dead_code)]
/// fn this_is_fine_too() { }
/// ```
pub EMPTY_LINE_AFTER_OUTER_ATTR,
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/missing_const_for_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {

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

if let Err((span, err)) = is_min_const_fn(cx.tcx, def_id.to_def_id(), &mir) {
if let Err((span, err)) = is_min_const_fn(cx.tcx, &mir) {
if rustc_mir::const_eval::is_min_const_fn(cx.tcx, def_id.to_def_id()) {
cx.tcx.sess.span_err(span, &err);
}
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/redundant_clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantClone {
let mir = cx.tcx.optimized_mir(def_id.to_def_id());

let maybe_storage_live_result = MaybeStorageLive
.into_engine(cx.tcx, mir, def_id.to_def_id())
.into_engine(cx.tcx, mir)
.pass_name("redundant_clone")
.iterate_to_fixpoint()
.into_results_cursor(mir);
Expand Down
3 changes: 2 additions & 1 deletion clippy_lints/src/utils/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use std::borrow::Cow;

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

pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, def_id: DefId, body: &'a Body<'tcx>) -> McfResult {
pub fn is_min_const_fn(tcx: TyCtxt<'tcx>, body: &'a Body<'tcx>) -> McfResult {
let def_id = body.source.def_id();
let mut current = def_id;
loop {
let predicates = tcx.predicates_of(current);
Expand Down

0 comments on commit 411e3ba

Please sign in to comment.