Skip to content

Commit 334bafe

Browse files
committed
Document current deny by default lints
1 parent ff191b5 commit 334bafe

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/doc/rustc/src/lints/listing/deny-by-default.md

+25
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,28 @@ error: invalid `crate_type` value
222222
| ^^^^^^^^^^^^^^^^^^^^
223223
|
224224
```
225+
226+
## const-err
227+
228+
This lint detects expressions that will always panic at runtime and would be an
229+
error in a `const` context.
230+
231+
```rust,ignore
232+
let _ = [0; 4][4];
233+
```
234+
235+
This will produce:
236+
237+
```text
238+
error: index out of bounds: the len is 4 but the index is 4
239+
--> src/lib.rs:1:9
240+
|
241+
1 | let _ = [0; 4][4];
242+
| ^^^^^^^^^
243+
|
244+
```
245+
246+
## order-dependent-trait-objects
247+
248+
This lint detects a trait coherency violation that would allow creating two
249+
trait impls for the same dynamic trait object involving marker traits.

0 commit comments

Comments
 (0)