Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document missing deny by default lints #65039

Merged
merged 1 commit into from
Oct 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/doc/rustc/src/lints/listing/deny-by-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.