Skip to content

internal: Be more resilient to bad language item definitions in binop inference#17891

Merged
bors merged 1 commit intorust-lang:masterfrom
lnicola:binop-bad-lang-items
Aug 14, 2024
Merged

internal: Be more resilient to bad language item definitions in binop inference#17891
bors merged 1 commit intorust-lang:masterfrom
lnicola:binop-bad-lang-items

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Aug 14, 2024

Fixes #16287
Fixes #16286

There's one more in write_fn_trait_method_resolution, but I'm not sure if it won't cause further problems in infer_closures.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2024
self.write_method_resolution(tgt_expr, func, substs);
let subst = TyBuilder::subst_for_def(self.db, index_trait, None);
if subst.remaining() != 2 {
return self.err_ty();
Copy link
Member Author

@lnicola lnicola Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We modify adj above, not sure if it will cause problems.

And I couldn't find a failing test case for this.

@lnicola
Copy link
Member Author

lnicola commented Aug 14, 2024

@bors r=flodiebold

@bors
Copy link
Contributor

bors commented Aug 14, 2024

📌 Commit e37df4c has been approved by flodiebold

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 14, 2024

⌛ Testing commit e37df4c with merge 36a071c...

@bors
Copy link
Contributor

bors commented Aug 14, 2024

☀️ Test successful - checks-actions
Approved by: flodiebold
Pushing 36a071c to master...

@bors bors merged commit 36a071c into rust-lang:master Aug 14, 2024
@lnicola lnicola deleted the binop-bad-lang-items branch August 14, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ice: self.remaining() > 0 ice: assertion failed 2 == 3 [Type, Type, Type]

4 participants