Skip to content

Conversation

@lowr
Copy link
Contributor

@lowr lowr commented Sep 19, 2022

One would expect TyKind::DynTy to have at least one trait bound, but we may produce a dyn type with no trait bounds at all. This patch prevents it by returning TyKind::Error in such cases.

An "empty" dyn type would have caused panic during method resolution without #13257. Although already fixed, I think an invariant to never produce such types would help prevent similar problems in the future.

@Veykril
Copy link
Member

Veykril commented Sep 19, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Sep 19, 2022

📌 Commit 9845e37 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 19, 2022

⌛ Testing commit 9845e37 with merge bde76b9...

@bors
Copy link
Contributor

bors commented Sep 19, 2022

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing bde76b9 to master...

@bors bors merged commit bde76b9 into rust-lang:master Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants