diff options
| author | bors <bors@rust-lang.org> | 2021-10-01 22:47:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-01 22:47:22 +0000 |
| commit | 2cb37a19110be1f80133a336acae2072ea8e310d (patch) | |
| tree | e4fafb4e8511d5899d08dab546dc0b9a26690e1d | |
| parent | 72bf97f9326fe6993ec144c2a1526ca3580c130a (diff) | |
| parent | 6d18c9912f8347d77d340288ba9d968e07343b7a (diff) | |
| download | rust-2cb37a19110be1f80133a336acae2072ea8e310d.tar.gz rust-2cb37a19110be1f80133a336acae2072ea8e310d.zip | |
Auto merge of #89449 - Manishearth:rollup-3alb61f, r=Manishearth
Rollup of 7 pull requests Successful merges: - #85223 (rustdoc: Clarified the attribute which prompts the warning) - #88847 (platform-support.md: correct ARMv7+MUSL platform triple notes) - #88963 (Coerce const FnDefs to implement const Fn traits ) - #89376 (Fix use after drop in self-profile with llvm events) - #89422 (Replace whitespaces in doctests' name with dashes) - #89440 (Clarify a sentence in the documentation of Vec (#84488)) - #89441 (Normalize after substituting via `field.ty()`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
| -rw-r--r-- | clippy_utils/src/lib.rs | 1 | ||||
| -rw-r--r-- | clippy_utils/src/qualify_min_const_fn.rs | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index 7f5a1bf9c07..03f77f36b46 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -18,7 +18,6 @@ extern crate rustc_ast; extern crate rustc_ast_pretty; extern crate rustc_attr; -extern crate rustc_const_eval; extern crate rustc_data_structures; extern crate rustc_errors; extern crate rustc_hir; diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs index 238728f090f..e6d8ba3f02e 100644 --- a/clippy_utils/src/qualify_min_const_fn.rs +++ b/clippy_utils/src/qualify_min_const_fn.rs @@ -364,7 +364,7 @@ fn check_terminator( } fn is_const_fn(tcx: TyCtxt<'_>, def_id: DefId, msrv: Option<&RustcVersion>) -> bool { - rustc_const_eval::const_eval::is_const_fn(tcx, def_id) + tcx.is_const_fn(def_id) && tcx.lookup_const_stability(def_id).map_or(true, |const_stab| { if let rustc_attr::StabilityLevel::Stable { since } = const_stab.level { // Checking MSRV is manually necessary because `rustc` has no such concept. This entire |
