diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-13 13:34:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-13 13:34:27 +0200 |
| commit | d0f8bd6e26c40d3940d5d1c942c0e25ef0dd3ba4 (patch) | |
| tree | 800da6a28f23dd192fe728f9fd6d157d58d17860 /src/doc/rustc | |
| parent | 29b6e0f0a1d1a37f8dc729484a64e59bf0b9a0a3 (diff) | |
| parent | 334bafebc97c83be357ed1e5f933a3df87b76c3d (diff) | |
| download | rust-d0f8bd6e26c40d3940d5d1c942c0e25ef0dd3ba4.tar.gz rust-d0f8bd6e26c40d3940d5d1c942c0e25ef0dd3ba4.zip | |
Rollup merge of #65039 - HeroicKatora:deny-by-default-book, r=GuillaumeGomez
Document missing deny by default lints
Diffstat (limited to 'src/doc/rustc')
| -rw-r--r-- | src/doc/rustc/src/lints/listing/deny-by-default.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/doc/rustc/src/lints/listing/deny-by-default.md b/src/doc/rustc/src/lints/listing/deny-by-default.md index 6574267f185..5688e90ada1 100644 --- a/src/doc/rustc/src/lints/listing/deny-by-default.md +++ b/src/doc/rustc/src/lints/listing/deny-by-default.md @@ -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. |
