Skip to content

Migrate basic block ctors to require Terminator where possible - #165517

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
panstromek:no-terminator-option-2
Nov 7, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
panstromek:no-terminator-option-2

Conversation

@panstromek

Copy link
Copy Markdown
Contributor

This is a step towards replacing Option<Terminator> with Terminator in BasicBlockData. See this thread for more info.

This commit changes BasicBlockData constructors to require Terminator. For callsites where this is not yet possible, it keeps existing constructors with Option under different names. These are intentionally more verbose to point people towards the new ones.

There should be no behaviour change.

@rustbot

rustbot commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in coverage instrumentation.

cc @Zalathar

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Nov 5, 2026
@rustbot

rustbot commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

r? @folkertdev

rustbot has assigned @folkertdev.
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: compiler, mir, mir-opt
  • compiler, mir, mir-opt expanded to 77 candidates
  • Random selection from 19 candidates

@rust-log-analyzer

This comment has been minimized.

@panstromek

This comment was marked as outdated.

@panstromek
panstromek force-pushed the no-terminator-option-2 branch from d748673 to 5cc2524 Compare November 5, 2026 19:11
@rustbot

rustbot commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

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.

@panstromek

This comment was marked as outdated.

@folkertdev

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5cc2524 has been approved by folkertdev

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 Nov 7, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 7, 2026
… r=folkertdev

Migrate basic block ctors to require Terminator where possible

This is a step towards replacing `Option<Terminator>` with `Terminator` in `BasicBlockData`. See [this thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/vibe.20check.20-.20removing.20Option.20from.20Terminator/with/637588808) for more info.

This commit changes `BasicBlockData` constructors to require `Terminator`. For callsites where this is not yet possible, it keeps existing constructors with `Option` under different names. These are intentionally more verbose to point people towards the new ones.

There should be no behaviour change.
rust-bors Bot pushed a commit that referenced this pull request Nov 7, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #164784 (Introduce OptimizationObjective and fix the entry shim's size attributes)
 - #165469 (Make notable trait `i` badges `<span>` instead of `<a>`)
 - #165576 (compiletest: Reject whitespace between `//` & `@` and reject leading revision conditions like (e.g., `//[rev]@ dir`))
 - #147696 (Implement `bit` and `set_bit` for integral types.)
 - #163202 (nuttx: use updated pollfd definition)
 - #165482 (apply `-Zcrate-attr` attributes before the crate attributes)
 - #165517 (Migrate basic block ctors to require Terminator where possible)
 - #165552 (use lang item instead of name when assembling builtin `Clone::clone` instances)
rust-bors Bot pushed a commit that referenced this pull request Nov 7, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #164784 (Introduce OptimizationObjective and fix the entry shim's size attributes)
 - #165469 (Make notable trait `i` badges `<span>` instead of `<a>`)
 - #165576 (compiletest: Reject whitespace between `//` & `@` and reject leading revision conditions like (e.g., `//[rev]@ dir`))
 - #147696 (Implement `bit` and `set_bit` for integral types.)
 - #163202 (nuttx: use updated pollfd definition)
 - #165482 (apply `-Zcrate-attr` attributes before the crate attributes)
 - #165517 (Migrate basic block ctors to require Terminator where possible)
 - #165552 (use lang item instead of name when assembling builtin `Clone::clone` instances)
@rust-bors
rust-bors Bot merged commit a93a298 into rust-lang:main Nov 7, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 7, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 7, 2026
Rollup merge of #165517 - panstromek:no-terminator-option-2, r=folkertdev

Migrate basic block ctors to require Terminator where possible

This is a step towards replacing `Option<Terminator>` with `Terminator` in `BasicBlockData`. See [this thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/vibe.20check.20-.20removing.20Option.20from.20Terminator/with/637588808) for more info.

This commit changes `BasicBlockData` constructors to require `Terminator`. For callsites where this is not yet possible, it keeps existing constructors with `Option` under different names. These are intentionally more verbose to point people towards the new ones.

There should be no behaviour change.
RalfJung pushed a commit to JoJoDeveloping/miri that referenced this pull request Nov 8, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#164784 (Introduce OptimizationObjective and fix the entry shim's size attributes)
 - rust-lang/rust#165469 (Make notable trait `i` badges `<span>` instead of `<a>`)
 - rust-lang/rust#165576 (compiletest: Reject whitespace between `//` & `@` and reject leading revision conditions like (e.g., `//[rev]@ dir`))
 - rust-lang/rust#147696 (Implement `bit` and `set_bit` for integral types.)
 - rust-lang/rust#163202 (nuttx: use updated pollfd definition)
 - rust-lang/rust#165482 (apply `-Zcrate-attr` attributes before the crate attributes)
 - rust-lang/rust#165517 (Migrate basic block ctors to require Terminator where possible)
 - rust-lang/rust#165552 (use lang item instead of name when assembling builtin `Clone::clone` instances)
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