Skip to content

Do not depend on typeck to borrow-check inline consts.#156064

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
cjgillot:borrowck-no-typeck
May 2, 2026
Merged

Do not depend on typeck to borrow-check inline consts.#156064
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
cjgillot:borrowck-no-typeck

Conversation

@cjgillot
Copy link
Copy Markdown
Contributor

@cjgillot cjgillot commented May 1, 2026

Instead fetch the type from the inline-const's MIR, which comes from exactly the same typeck information.

@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 1, 2026
@cjgillot
Copy link
Copy Markdown
Contributor Author

cjgillot commented May 1, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2026
rust-bors Bot pushed a commit that referenced this pull request May 1, 2026
Do not depend on typeck to borrow-check inline consts.
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 1, 2026

☀️ Try build successful (CI)
Build commit: d7e530a (d7e530af59133bd3b703690962214548d36830f5, parent: 67bcaa9c4b1b1015efae3d591155c79760b1e0a5)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d7e530a): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.2%, secondary 0.2%)

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

mean range count
Regressions ❌
(primary)
3.2% [2.3%, 4.7%] 3
Regressions ❌
(secondary)
1.5% [0.5%, 3.3%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-3.5%, -3.5%] 1
All ❌✅ (primary) 3.2% [2.3%, 4.7%] 3

Cycles

Results (primary -2.0%, secondary -0.7%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
-0.8% [-2.3%, -0.4%] 8
All ❌✅ (primary) -2.0% [-2.0%, -2.0%] 1

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 487.864s -> 483.909s (-0.81%)
Artifact size: 390.99 MiB -> 391.01 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2026
@cjgillot cjgillot marked this pull request as ready for review May 2, 2026 03:28
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 2, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 2, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 2, 2026

r? @dingxiangfei2009

rustbot has assigned @dingxiangfei2009.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: borrowck, compiler
  • borrowck, compiler expanded to 73 candidates
  • Random selection from 21 candidates

@dingxiangfei2009
Copy link
Copy Markdown
Contributor

@bors r+ rollup=always

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 2, 2026

📌 Commit f4c3a71 has been approved by dingxiangfei2009

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2026
rust-bors Bot pushed a commit that referenced this pull request May 2, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #156074 (Add extra symbol check for `.to_owned()`)
 - #156045 (Move tests associated consts)
 - #156064 (Do not depend on typeck to borrow-check inline consts.)
 - #156083 (Move tests attributes)
@rust-bors rust-bors Bot merged commit 1f97ab1 into rust-lang:main May 2, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 2, 2026
rust-timer added a commit that referenced this pull request May 2, 2026
Rollup merge of #156064 - cjgillot:borrowck-no-typeck, r=dingxiangfei2009

Do not depend on typeck to borrow-check inline consts.

Instead fetch the type from the inline-const's MIR, which comes from exactly the same typeck information.
@cjgillot cjgillot deleted the borrowck-no-typeck branch May 2, 2026 20:16
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request May 4, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#156074 (Add extra symbol check for `.to_owned()`)
 - rust-lang/rust#156045 (Move tests associated consts)
 - rust-lang/rust#156064 (Do not depend on typeck to borrow-check inline consts.)
 - rust-lang/rust#156083 (Move tests attributes)
pull Bot pushed a commit to Kokoro2336/rust-analyzer that referenced this pull request May 4, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#156074 (Add extra symbol check for `.to_owned()`)
 - rust-lang/rust#156045 (Move tests associated consts)
 - rust-lang/rust#156064 (Do not depend on typeck to borrow-check inline consts.)
 - rust-lang/rust#156083 (Move tests attributes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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