Skip to content

borrowck/type_check: remove helper left-over from unsized locals#154036

Open
RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung:unsized-locals-helper-rm
Open

borrowck/type_check: remove helper left-over from unsized locals#154036
RalfJung wants to merge 1 commit intorust-lang:mainfrom
RalfJung:unsized-locals-helper-rm

Conversation

@RalfJung
Copy link
Member

This used to check two features, but ever since #141811 it's only one so there's no reason any more to have a helper function here.

@rustbot rustbot 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 Mar 18, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2026

r? @nnethercote

rustbot has assigned @nnethercote.
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 69 candidates
  • Random selection from 15 candidates

if !self.unsized_feature_enabled() {
// When `unsized_fn_params` is enabled, this is checked in `check_call_dest`,
// and `hir_typeck` still forces all non-argument locals to be sized (i.e., we don't
// fully re-check what was already checked on HIR).
Copy link
Member Author

@RalfJung RalfJung Mar 18, 2026

Choose a reason for hiding this comment

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

Nullary ops don't exist any more so the comment needed updating.

And from all I can tell, we do not fully re-check non-argument locals to be sized here. Not sure if that is a problem, being sized cannot depend on lifetimes after all. But then I don't know why we re-check any of the sized stuff here.^^

Cc @lqd @lcnr

@nnethercote
Copy link
Contributor

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 18, 2026

📌 Commit 38aa322 has been approved by nnethercote

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 Mar 18, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 18, 2026
… r=nnethercote

borrowck/type_check: remove helper left-over from unsized locals

This used to check two features, but ever since rust-lang#141811 it's only one so there's no reason any more to have a helper function here.
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.

3 participants