about summary refs log tree commit diff
path: root/src/doc/rustc
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-13 13:34:27 +0200
committerGitHub <noreply@github.com>2019-10-13 13:34:27 +0200
commitd0f8bd6e26c40d3940d5d1c942c0e25ef0dd3ba4 (patch)
tree800da6a28f23dd192fe728f9fd6d157d58d17860 /src/doc/rustc
parent29b6e0f0a1d1a37f8dc729484a64e59bf0b9a0a3 (diff)
parent334bafebc97c83be357ed1e5f933a3df87b76c3d (diff)
downloadrust-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.md25
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.