Skip to content

Use TypingMode::PostAnalysis in try_evaluate_const - #149183

Merged
bors merged 2 commits into
rust-lang:mainfrom
tiif:typing_env_fix
Dec 4, 2025
Merged

Use TypingMode::PostAnalysis in try_evaluate_const#149183
bors merged 2 commits into
rust-lang:mainfrom
tiif:typing_env_fix

Conversation

@tiif

@tiiftiif commented Nov 21, 2025

Copy link
Copy Markdown
Member

As mentioned in #148698 (comment), we should use TypingMode::PostAnalysis for that path.

@BoxyUwU prefer the match in try_evaluate_const to be exhaustive, so I also included that in this PR :3

@rustbotrustbot added 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. labels Nov 21, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@tiif

tiif commented Nov 21, 2025

Copy link
Copy Markdown
MemberAuthor

I tried writing some tests for this, but none of them manage to trigger any weird behaviour :(

@BoxyUwU

Copy link
Copy Markdown
Member

r? BoxyUwU

@rustbotrustbot assigned BoxyUwU and unassigned jackh726Nov 22, 2025
@lcnrlcnr changed the title Use TypingMode::PostAnalysis in try_evaluate_constUse TypingMode::PostAnalysis in try_evaluate_constDec 2, 2025
Comment threadcompiler/rustc_trait_selection/src/traits/mod.rs Outdated
@BoxyUwUBoxyUwU 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 Dec 3, 2025
@tiiftiif 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 Dec 3, 2025
@BoxyUwU

Copy link
Copy Markdown
Member

r=me if CI passes

@BoxyUwUBoxyUwU 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 Dec 3, 2025
@tiif

tiif commented Dec 4, 2025

Copy link
Copy Markdown
MemberAuthor

@bors r=BoxyUwU rollup

@bors

bors commented Dec 4, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit af66b68 has been approved by BoxyUwU

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 4, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 4, 2025
Use `TypingMode::PostAnalysis` in `try_evaluate_const`
As mentioned in rust-lang#148698 (comment), we should use ``TypingMode::PostAnalysis`` for that path.
`@BoxyUwU` prefer the match in ``try_evaluate_const`` to be exhaustive, so I also included that in this PR :3
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 4, 2025
Use `TypingMode::PostAnalysis` in `try_evaluate_const`
As mentioned in rust-lang#148698 (comment), we should use ``TypingMode::PostAnalysis`` for that path.
``@BoxyUwU`` prefer the match in ``try_evaluate_const`` to be exhaustive, so I also included that in this PR :3
@ZalatharZalathar mentioned this pull request Dec 4, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 4, 2025
Use `TypingMode::PostAnalysis` in `try_evaluate_const`
As mentioned in rust-lang#148698 (comment), we should use ``TypingMode::PostAnalysis`` for that path.
```@BoxyUwU``` prefer the match in ``try_evaluate_const`` to be exhaustive, so I also included that in this PR :3
bors added a commit that referenced this pull request Dec 4, 2025
Rollup of 12 pull requests
Successful merges:
- #147841 (Fix ICE when applying test macro to crate root)
- #149147 (Fix unused_assignments false positives from macros)
- #149183 (Use `TypingMode::PostAnalysis` in `try_evaluate_const`)
- #149456 (std: don't call `current_os_id` from signal handler)
- #149501 (CTFE: avoid emitting a hard error on generic normalization failures)
- #149528 (reword error for invalid range patterns)
- #149539 (Additional test for uN::{gather,scatter}_bits)
- #149549 (Regression test for system register `ttbr0_el2`)
- #149550 (Disable native-lib for x check miri)
- #149554 (build-manifest: generate MSI and MINGW arrays from rustc)
- #149557 (c-variadic: bpf and spirv do not support c-variadic definitions)
- #149569 (Fix mailmap issue)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit bea2f89 into rust-lang:mainDec 4, 2025
11 checks passed
@rustbotrustbot added this to the 1.93.0 milestone Dec 4, 2025
rust-timer added a commit that referenced this pull request Dec 4, 2025
Rollup merge of #149183 - tiif:typing_env_fix, r=BoxyUwU
Use `TypingMode::PostAnalysis` in `try_evaluate_const`
As mentioned in #148698 (comment), we should use ``TypingMode::PostAnalysis`` for that path.
````@BoxyUwU```` prefer the match in ``try_evaluate_const`` to be exhaustive, so I also included that in this PR :3
@Kobzol

Copy link
Copy Markdown
Member

@rust-timer build 44a9083

For #149631 (comment).

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (44a9083): comparison URL.

Overall result: no relevant changes - BENCHMARK(S) FAILED

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

❗ ❗ ❗ ❗ ❗
Warning ⚠️: The following benchmark(s) failed to build:

  • Job failure

❗ ❗ ❗ ❗ ❗

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: missing data
Artifact size: missing data

@Kobzol

Copy link
Copy Markdown
Member

@rust-timer build 44a9083

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (44a9083): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 0.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
0.8%[0.8%, 0.8%]1
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.8%[0.8%, 0.8%]1

Cycles

Results (secondary 2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
2.4%[1.3%, 3.4%]2
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 468.789s -> 468.897s (0.02%)
Artifact size: 386.75 MiB -> 386.70 MiB (-0.01%)

github-actionsBot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Dec 15, 2025
Rollup of 12 pull requests
Successful merges:
- rust-lang/rust#147841 (Fix ICE when applying test macro to crate root)
- rust-lang/rust#149147 (Fix unused_assignments false positives from macros)
- rust-lang/rust#149183 (Use `TypingMode::PostAnalysis` in `try_evaluate_const`)
- rust-lang/rust#149456 (std: don't call `current_os_id` from signal handler)
- rust-lang/rust#149501 (CTFE: avoid emitting a hard error on generic normalization failures)
- rust-lang/rust#149528 (reword error for invalid range patterns)
- rust-lang/rust#149539 (Additional test for uN::{gather,scatter}_bits)
- rust-lang/rust#149549 (Regression test for system register `ttbr0_el2`)
- rust-lang/rust#149550 (Disable native-lib for x check miri)
- rust-lang/rust#149554 (build-manifest: generate MSI and MINGW arrays from rustc)
- rust-lang/rust#149557 (c-variadic: bpf and spirv do not support c-variadic definitions)
- rust-lang/rust#149569 (Fix mailmap issue)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

7 participants

@tiif@rustbot@BoxyUwU@bors@Kobzol@rust-timer@jackh726