Skip to content

fix: Fix a crash introduced in #13147#13257

Merged
bors merged 1 commit into
masterfrom
revert-13147-fix/dyn-ty-inherent-methods
Sep 19, 2022
Merged

fix: Fix a crash introduced in #13147#13257
bors merged 1 commit into
masterfrom
revert-13147-fix/dyn-ty-inherent-methods

Conversation

@lnicola

@lnicola lnicola commented Sep 19, 2022

Copy link
Copy Markdown
Member

@lnicola

lnicola commented Sep 19, 2022

Copy link
Copy Markdown
Member Author

@bors r+

@bors

bors commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

📌 Commit 878a403 has been approved by lnicola

It is now in the queue for this repository.

@bors

bors commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

⌛ Testing commit 878a403 with merge 10d193d...

bors added a commit that referenced this pull request Sep 19, 2022
@lnicola

lnicola commented Sep 19, 2022

Copy link
Copy Markdown
Member Author

@bors r-

@bors

bors commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

☀️ Try build successful - checks-actions
Build commit: 10d193d (10d193d2903511b3f4cb54bed528b8cdab423b30)

@lnicola lnicola force-pushed the revert-13147-fix/dyn-ty-inherent-methods branch from 878a403 to e54f61d Compare September 19, 2022 09:45
@lnicola lnicola changed the title Revert "fix: handle trait methods as inherent methods for trait-related types" fix: Fix a crash introduced in #13147 Sep 19, 2022
@lnicola

lnicola commented Sep 19, 2022

Copy link
Copy Markdown
Member Author

@bors r+

@bors

bors commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

📌 Commit e54f61d has been approved by lnicola

It is now in the queue for this repository.

@bors

bors commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

⌛ Testing commit e54f61d with merge 187bee0...

@lnicola

lnicola commented Sep 19, 2022

Copy link
Copy Markdown
Member Author

CC @lowr

@bors

bors commented Sep 19, 2022

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing 187bee0 to master...

@bors bors merged commit 187bee0 into master Sep 19, 2022
@bors bors deleted the revert-13147-fix/dyn-ty-inherent-methods branch September 19, 2022 09:55
bors added a commit that referenced this pull request Sep 19, 2022
Ensure at least one trait bound in `TyKind::DynTy`

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.
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.

2 participants