Some fixes to diagnostics and lints#18417
Merged
bors merged 5 commits intorust-lang:masterfrom Oct 31, 2014
Merged
Conversation
There was a problem hiding this comment.
I think this would be better expressed as a match:
let is_sized = match fcx.ccx.tcx.lang_item.sized_trait() {
Some(sized_id) => sized_id == trait_ref.def_id,
None => false
};Or if you feel more adventurous:
let is_sized = fcx.ccx.tcx.lang_items.sized_trait()
.map_or(false, |sized_id| sized_id == trait_ref.def_id);…nt group These lints are allow by default because they are sometimes too sensitive.
The error messages still aren’t as good as they were before DST, but they better describe the actual problem, not mentioning `Sized` at all (because that bound is normally implied, not explicitly stated). Closes rust-lang#17567. Closes rust-lang#18040. Closes rust-lang#18159.
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this pull request
Oct 30, 2014
lnicola
pushed a commit
to lnicola/rust
that referenced
this pull request
Oct 29, 2024
fix: Correctly handle `#""` in edition <2024
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.
I’m not so sure about the way I’ve handled #17567, but at least the error message is an improvement over what it was before (albeit still not quite as good as it was before DST).