about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorAndreas Molzer <andreas.molzer@gmx.de>2019-10-03 04:01:37 +0200
committerAndreas Molzer <andreas.molzer@gmx.de>2019-10-03 04:46:24 +0200
commit334bafebc97c83be357ed1e5f933a3df87b76c3d (patch)
treef83bc171b7b002aa977160b4a82d0f81df843511 /src/doc
parentff191b54cc8a95e3bfc7ae5f8f9984f934758165 (diff)
downloadrust-334bafebc97c83be357ed1e5f933a3df87b76c3d.tar.gz
rust-334bafebc97c83be357ed1e5f933a3df87b76c3d.zip
Document current deny by default lints
Diffstat (limited to 'src/doc')
-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.