Skip to content

Prevent error reporting from outputting a recursion error if it finds an ambiguous trait impl during suggestions #89576

Merged
bors merged 1 commit into
rust-lang:masterfrom
tom7980:issue-89275-fix
Oct 8, 2021
Merged

Prevent error reporting from outputting a recursion error if it finds an ambiguous trait impl during suggestions #89576
bors merged 1 commit into
rust-lang:masterfrom
tom7980:issue-89275-fix

Conversation

@tom7980

@tom7980 tom7980 commented Oct 5, 2021

Copy link
Copy Markdown
Contributor

Closes #89275

This fixes the compiler reporting a recursion error during another already in progress error by trying to make a conversion method suggestion and encounters ambiguous trait implementations that can convert a the original type into a type that can then be recursively converted into itself via another method in the trait.

Updated OverflowError struct to be an enum so I could differentiate between passes - it's no longer a ZST but I don't think that should be a problem as they only generate when there's an error in compiling code anyway

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overflow evaluating the requirement [stable/nightly]

9 participants