-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
'static bound not enforced in borrowed trait coercion #10751
Labels
Comments
cc @nikomatsakis, this should have aborted much earlier in compilation. I've updated the title of the bug to be what the root cause is. |
Not sure if related to this issue, but this also compiles (taken from irc):
|
dmski
added a commit
to dmski/rust
that referenced
this issue
Apr 8, 2014
bors
added a commit
that referenced
this issue
Apr 18, 2014
There wasn't a check for builtin bounds when looking up vtables, only for trait bounds. This led to types sometimes implementing traits they shouldn't have been able to. Closes #10751
dmski
added a commit
to dmski/rust
that referenced
this issue
Apr 23, 2014
This issue has since been fixed, closing. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
May 20, 2023
Add configuration options to `--explain` This PR rearranges some modules, taking `metadata_collector` out of `internal_lints` and making public just the necessary functions for `explain()` to use. The output looks something like this: ```sh $ cargo run --bin cargo-clippy --manifest-path ../rust-clippy/Cargo.toml -- --explain cognitive_complexity ### What it does Checks for methods with high cognitive complexity. ### Why is this bad? Methods of high cognitive complexity tend to be hard to both read and maintain. Also LLVM will tend to optimize small methods better. ### Known problems Sometimes it's hard to find a way to reduce the complexity. ### Example You'll see it when you get the warning. ======================================== Configuration for clippy::cognitive_complexity: - cognitive-complexity-threshold: The maximum cognitive complexity a function can have (default: 25) ``` Fixes rust-lang#9990 r? `@xFrednet` --- changelog: Docs: `cargo clippy --explain LINT` now shows possible configuration options for the explained lint [rust-lang#10751](rust-lang/rust-clippy#10751) <!-- changelog_checked -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current bug report
I would not expect this program to compile:
Original Bug Report
Results in
The text was updated successfully, but these errors were encountered: