diff --git a/actix-router/src/resource.rs b/actix-router/src/resource.rs
index 7069b5fea..b5ee01958 100644
--- a/actix-router/src/resource.rs
+++ b/actix-router/src/resource.rs
@@ -1370,7 +1370,7 @@ mod tests {
         assert_eq!(path.unprocessed(), "");
     }
 
-    #[expect(clippy::literal_string_with_formatting_args)]
+    #[allow(clippy::literal_string_with_formatting_args)]
     #[test]
     fn newline_patterns_and_paths() {
         let re = ResourceDef::new("/user/a\nb");
diff --git a/actix-router/src/router.rs b/actix-router/src/router.rs
index 01f92e90b..b20cb7ee3 100644
--- a/actix-router/src/router.rs
+++ b/actix-router/src/router.rs
@@ -145,7 +145,7 @@ mod tests {
     };
 
     #[allow(clippy::cognitive_complexity)]
-    #[expect(clippy::literal_string_with_formatting_args)]
+    #[allow(clippy::literal_string_with_formatting_args)]
     #[test]
     fn test_recognizer_1() {
         let mut router = Router::<usize>::build();