librustc: Improve error message for missing feature attributes.#13471
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 13, 2014
Merged
librustc: Improve error message for missing feature attributes.#13471bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
bors
added a commit
that referenced
this pull request
Apr 13, 2014
The current error message is misleading, it asks users to add `#[feature(..)]` which ends up being treated as an outer attribute, which then has no error unless `attribute_usage` lint is enforced. The code will still fail and the user might not understand why.
compiler-errors
pushed a commit
to compiler-errors/rust
that referenced
this pull request
Oct 26, 2022
Handle multiple projects sharing dependency correctly in `once` strategy
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Oct 3, 2024
Remove method call receiver special casing in `unused_async` lint Fixes the false positive mentioned in rust-lang/rust-clippy#13466 (comment). The false negative in the OP would be nice to fix too, but I'd rather do that in a separate PR because it's much more involved Before this change, the `unused_async` lint would check if the async fn is also used anywhere and avoid linting if so. The exception is if the async function is immediately called, because the returned future handling can be easily removed (and also if we don't have some exceptions then the lint wouldn't trigger anywhere) *or* if it's a method call receiver. I'm not exactly sure why I implemented that special casing for method call receivers in rust-lang#11200, but it doesn't make much sense in hindsight imo. Especially given that method calls are essentially equivalent to function calls with the receiver as the first argument, which was the primary motivation for not linting in the first place (async fn passed to another function, like `axum::get(handler)` where handler has to be an async fn). changelog: none
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current error message is misleading, it asks users to add
#[feature(..)]which ends up being treated as an outer attribute, which then has no error unlessattribute_usagelint is enforced. The code will still fail and the user might not understand why.