From 68ea46179b912e58ef9511559ba7b30ea569def0 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Tue, 18 Mar 2025 20:51:24 +0100 Subject: Add TODO for const stability MSRV checking Also, update error marker for consistency. --- clippy_lints/src/incompatible_msrv.rs | 1 + tests/ui/incompatible_msrv.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/incompatible_msrv.rs b/clippy_lints/src/incompatible_msrv.rs index bf165624b43..a31168fc746 100644 --- a/clippy_lints/src/incompatible_msrv.rs +++ b/clippy_lints/src/incompatible_msrv.rs @@ -168,6 +168,7 @@ impl IncompatibleMsrv { impl<'tcx> LateLintPass<'tcx> for IncompatibleMsrv { fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { + // TODO: check for const stability when in const context match expr.kind { ExprKind::MethodCall(_, _, _, span) => { if let Some(method_did) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { diff --git a/tests/ui/incompatible_msrv.rs b/tests/ui/incompatible_msrv.rs index 41ee9d22124..37e55e9e18a 100644 --- a/tests/ui/incompatible_msrv.rs +++ b/tests/ui/incompatible_msrv.rs @@ -74,7 +74,7 @@ fn lang_items() { #[clippy::msrv = "1.80.0"] fn issue14212() { let _ = std::iter::repeat_n((), 5); - //~^ ERROR: is `1.80.0` but this item is stable since `1.82.0` + //~^ incompatible_msrv } fn local_msrv_change_suggestion() { -- cgit 1.4.1-3-g733a5