about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/precedence.rs
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-07-31 19:36:47 +0200
committerUrgau <urgau@numericable.fr>2024-07-31 19:36:47 +0200
commit840ca3cbef88919bfcacf0572f605145712195d7 (patch)
tree0f633f663a7c86692ef74a1d0932516bee1bfcfe /compiler/rustc_lint/src/precedence.rs
parent4db3d12e6f395babed53dee1d209a5c8699a5ae6 (diff)
downloadrust-840ca3cbef88919bfcacf0572f605145712195d7.tar.gz
rust-840ca3cbef88919bfcacf0572f605145712195d7.zip
Temporarily switch `ambiguous_negative_literals` lint to allow
Diffstat (limited to 'compiler/rustc_lint/src/precedence.rs')
-rw-r--r--compiler/rustc_lint/src/precedence.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/precedence.rs b/compiler/rustc_lint/src/precedence.rs
index eb2ba397277..52321e25c7d 100644
--- a/compiler/rustc_lint/src/precedence.rs
+++ b/compiler/rustc_lint/src/precedence.rs
@@ -16,6 +16,7 @@ declare_lint! {
     /// ### Example
     ///
     /// ```rust,compile_fail
+    /// # #![deny(ambiguous_negative_literals)]
     /// # #![allow(unused)]
     /// -1i32.abs(); // equals -1, while `(-1i32).abs()` equals 1
     /// ```
@@ -27,7 +28,7 @@ declare_lint! {
     /// Method calls take precedence over unary precedence. Setting the
     /// precedence explicitly makes the code clearer and avoid potential bugs.
     pub AMBIGUOUS_NEGATIVE_LITERALS,
-    Deny,
+    Allow,
     "ambiguous negative literals operations",
     report_in_external_macro
 }