diff options
| author | Urgau <urgau@numericable.fr> | 2024-07-31 19:36:47 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2024-07-31 19:36:47 +0200 |
| commit | 840ca3cbef88919bfcacf0572f605145712195d7 (patch) | |
| tree | 0f633f663a7c86692ef74a1d0932516bee1bfcfe /compiler/rustc_lint/src | |
| parent | 4db3d12e6f395babed53dee1d209a5c8699a5ae6 (diff) | |
| download | rust-840ca3cbef88919bfcacf0572f605145712195d7.tar.gz rust-840ca3cbef88919bfcacf0572f605145712195d7.zip | |
Temporarily switch `ambiguous_negative_literals` lint to allow
Diffstat (limited to 'compiler/rustc_lint/src')
| -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 } |
