diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-01 00:50:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-01 00:50:12 +0200 |
| commit | 046664bdea738b6d123aa3d06ad56e216e0ac6e1 (patch) | |
| tree | e8d8fe1ebbde45f499c2cfc975ebe71851c90d17 /compiler | |
| parent | ac67d1005042fea5495520d5ed9076ddaf0061b4 (diff) | |
| parent | 840ca3cbef88919bfcacf0572f605145712195d7 (diff) | |
| download | rust-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.rs | 3 |
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 } |
