about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-01 00:50:12 +0200
committerGitHub <noreply@github.com>2024-08-01 00:50:12 +0200
commit046664bdea738b6d123aa3d06ad56e216e0ac6e1 (patch)
treee8d8fe1ebbde45f499c2cfc975ebe71851c90d17 /compiler
parentac67d1005042fea5495520d5ed9076ddaf0061b4 (diff)
parent840ca3cbef88919bfcacf0572f605145712195d7 (diff)
downloadrust-046664bdea738b6d123aa3d06ad56e216e0ac6e1.tar.gz
rust-046664bdea738b6d123aa3d06ad56e216e0ac6e1.zip
Rollup merge of #128449 - Urgau:tmp-allow-negative-lit-lint, r=compiler-errors
Temporarily switch `ambiguous_negative_literals` lint to allow

This PR temporarily switch the `ambiguous_negative_literals` lint to `allow-by-default`, as asked by T-lang in https://github.com/rust-lang/rust/issues/128287#issuecomment-2260902036.
Diffstat (limited to 'compiler')
-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
 }