Skip to content

Commit d723f8f

Browse files
committed
doc: replace exceeding_bitshifts with arithmetic_overflow
1 parent a69a632 commit d723f8f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/doc/rustc/src/lints/levels.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ level is capped via cap-lints.
104104
## deny
105105

106106
A 'deny' lint produces an error if you violate it. For example, this code
107-
runs into the `exceeding_bitshifts` lint.
107+
runs into the `arithmetic_overflow` lint.
108108

109109
```rust,no_run
110110
fn main() {
@@ -114,13 +114,13 @@ fn main() {
114114

115115
```bash
116116
$ rustc main.rs
117-
error: bitshift exceeds the type's number of bits
118-
--> main.rs:2:13
117+
error: this arithmetic operation will overflow
118+
--> main.rs:2:5
119119
|
120120
2 | 100u8 << 10;
121-
| ^^^^^^^^^^^
121+
| ^^^^^^^^^^^ attempt to shift left by `10_i32`, which would overflow
122122
|
123-
= note: `#[deny(exceeding_bitshifts)]` on by default
123+
= note: `#[deny(arithmetic_overflow)]` on by default
124124
```
125125
126126
What's the difference between an error from a lint and a regular old error?

0 commit comments

Comments
 (0)