-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Silence errors in expressions caused by bare traits in paths in 2021 edition #125784
Open
estebank
wants to merge
26
commits into
rust-lang:master
Choose a base branch
from
estebank:issue-51077
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,721
−1,214
Open
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
26cfeb1
Silence errors in experssions caused by bare traits in paths
estebank 936b692
Silence unsized types errors in some expressions
estebank 5028c30
Avoid potential for ICE by not stashing delayed as bug error and sile…
estebank f1f9842
Do not silence some sized errors as they would cause ICEs
estebank 5441f71
Add more tracking for the HIR source of well-formedness requirement
estebank 9a8f343
Add tests for various `dyn Trait` in path cases
estebank 9ada8bc
Add more HIR tracking information to `ObligationCauseCode`
estebank 5d85ffa
On object safety errors, point at specific object unsafe trait in path
estebank e2f2151
Move `FnCtxt::get_fn_decl` to `TyCtxt`
estebank 230a787
Deduplicate more E0038 object safety errors by pointing at type more …
estebank e55ab93
Move suggestions out of main error logic
estebank c9e8029
Tweak wording and only suggest `dyn Trait` if `Trait` is object safe
estebank adc750f
Suggest `<_ as Default>::default()` when given `<Default>::default()`
estebank dd7b36f
review comment: `guard` -> `guar`
estebank e6d9050
review comment: unnecessary check for object safety on sized trait
estebank 5f22c02
Add explanatory comment
estebank 84be44b
Fix tidy
estebank d8f5b14
Remove conditional delay_as_bug from "missing `dyn` error"
estebank 8ee6812
Remove `delay_as_bug` for fn call with unsized `Self` that return `Se…
estebank 8140dcd
Emit method not found error for object safe traits without `dyn`
estebank f116d4d
Move tests that no longer ICE
estebank aec9eeb
Do not produce incorrect `dyn Trait` suggestion in `fn`
estebank 05bffa0
Mention associated type with same name as trait in `E0782`
estebank 88ccfa4
Account for `static` and `const` in suggestion
estebank a62bfcd
Use verbose format for fully-qualified path suggestion
estebank 7f923f3
Fix tidy
estebank File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(note to self): I haven't properly reviewed commit "Add more tracking for HIR source well-formedness requirement" yet.