Skip to content

Resolve some cases of #132279 by using the right typing mode in the next solver#156141

Open
jdonszelmann wants to merge 4 commits intorust-lang:mainfrom
jdonszelmann:use-right-typingmode
Open

Resolve some cases of #132279 by using the right typing mode in the next solver#156141
jdonszelmann wants to merge 4 commits intorust-lang:mainfrom
jdonszelmann:use-right-typingmode

Conversation

@jdonszelmann
Copy link
Copy Markdown
Contributor

@jdonszelmann jdonszelmann commented May 4, 2026

r? @lcnr

Convert 3 FIXMEs of #132279 to using the right typing mode when we can (tcx.use_typing_mode_borrowck())

Also resolves #155093, which I closed

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 4, 2026
@jdonszelmann jdonszelmann force-pushed the use-right-typingmode branch 4 times, most recently from bac5eb5 to 7d76533 Compare May 4, 2026 13:28
@jdonszelmann jdonszelmann marked this pull request as ready for review May 4, 2026 13:28
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 4, 2026

Some changes occurred to constck

cc @fee1-dead

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 4, 2026
Comment thread compiler/rustc_const_eval/src/check_consts/qualifs.rs Outdated
Comment thread compiler/rustc_middle/src/mir/mod.rs Outdated
Comment thread compiler/rustc_infer/src/infer/mod.rs
@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented May 4, 2026

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 4, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 4, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@jdonszelmann jdonszelmann force-pushed the use-right-typingmode branch from 7d76533 to a59bc36 Compare May 5, 2026 11:46
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 5, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@jdonszelmann
Copy link
Copy Markdown
Contributor Author

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 5, 2026
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
341 |         if !self.is_empty() {
    |                  ^^^^^^^^ method cannot be called on `&mut infer::InferCtxt<'tcx>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `infer::InferCtxt<'tcx>: ExactSizeIterator`
            which is required by `&mut infer::InferCtxt<'tcx>: ExactSizeIterator`
note: the trait `ExactSizeIterator` must be implemented
   --> /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/iter/traits/exact_size.rs:86:0
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `is_empty`, perhaps you need to implement one of them:
            candidate #1: `ExactSizeIterator`
            candidate #2: `RangeBounds`

error[E0609]: no field `opaque_types` on type `&mut infer::InferCtxt<'tcx>`
   --> compiler/rustc_infer/src/infer/mod.rs:342:76
    |
342 |             ty::tls::with(|tcx| tcx.dcx().delayed_bug(format!("{:?}", self.opaque_types)));
    |                                                                            ^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `tcx`, `typing_mode`, `considering_regions`, `in_hir_typeck`, `skip_leak_check` ... and 10 others

Some errors have detailed explanations: E0599, E0609.
For more information about an error, try `rustc --explain E0599`.
[RUSTC-TIMING] rustc_infer test:false 2.288
error: `rustc_infer` (lib) generated 1 warning

if !self.is_empty() {
ty::tls::with(|tcx| tcx.dcx().delayed_bug(format!("{:?}", self.opaque_types)));
}
}
Copy link
Copy Markdown
Contributor

@lcnr lcnr May 5, 2026

Choose a reason for hiding this comment

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

please update comment the merge the controlflow

View changes since the review

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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants