1
Fork 0

Rollup merge of #65039 - HeroicKatora:deny-by-default-book, r=GuillaumeGomez

Document missing deny by default lints
This commit is contained in:
Mazdak Farrokhzad 2019-10-13 13:34:27 +02:00 committed by GitHub
commit d0f8bd6e26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -222,3 +222,28 @@ error: invalid `crate_type` value
| ^^^^^^^^^^^^^^^^^^^^
|
```
## const-err
This lint detects expressions that will always panic at runtime and would be an
error in a `const` context.
```rust,ignore
let _ = [0; 4][4];
```
This will produce:
```text
error: index out of bounds: the len is 4 but the index is 4
--> src/lib.rs:1:9
|
1 | let _ = [0; 4][4];
| ^^^^^^^^^
|
```
## order-dependent-trait-objects
This lint detects a trait coherency violation that would allow creating two
trait impls for the same dynamic trait object involving marker traits.