rustc: Improve error messages for resolve failures.#14086
Merged
bors merged 1 commit intorust-lang:masterfrom May 14, 2014
Merged
rustc: Improve error messages for resolve failures.#14086bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
|
Very nice. I'd prefer to replace |
Contributor
Author
|
@kud1ing If we can achieve consensus on this, sure, otherwise I'd prefer to leave that for a future PR, the current string is consistent with how rustc already behaves. |
Member
|
This looks pretty awesome, nice work! The primary thing which needs to get done here is to remove the usage of unsafe pointers. Other than that, just some minor cleanups here and there, and otherwise I think this is good to go! |
Contributor
Author
|
@alexcrichton Check latest commit, I'll squash the commits if those changes are OK for you. |
Member
|
Looks good to me, with a rebase I think this is good to go. |
Member
|
Erm, squash, not rebase. |
Contributor
Author
|
@alexcrichton Done. |
bors
added a commit
that referenced
this pull request
May 14, 2014
…ichton Provides better help for the resolve failures inside an `impl` if the name matches: - a field on the self type - a method on the self type - a method on the current trait ref (in a trait impl) Not handling trait method suggestions if in a regular `impl` (as you can see on line 69 of the test), I believe it is possible though. Also, provides a better message when `self` fails to resolve due to being a static method. It's using some unsafe pointers to skip copying the larger structures (which are only used in error conditions); it's likely possible to get it working with lifetimes (all the useful refs should outlive the visitor calls) but I haven't really figured that out for this case. (can switch to copying code if wanted) Closes #2356.
Contributor
|
This is fantastic. Thank you. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 20, 2025
`manual_flatten` should respect MSRV. changelog: [`manual_flatten`]: add MSRV check
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.
Provides better help for the resolve failures inside an
implif the name matches:Not handling trait method suggestions if in a regular
impl(as you can see on line 69 of the test), I believe it is possible though.Also, provides a better message when
selffails to resolve due to being a static method.It's using some unsafe pointers to skip copying the larger structures (which are only used in error conditions); it's likely possible to get it working with lifetimes (all the useful refs should outlive the visitor calls) but I haven't really figured that out for this case. (can switch to copying code if wanted)
Closes #2356.