Skip to content

[beta] backports#159384

Merged
rust-bors[bot] merged 6 commits into
rust-lang:betafrom
Mark-Simulacrum:beta-backports
Jul 18, 2026
Merged

[beta] backports#159384
rust-bors[bot] merged 6 commits into
rust-lang:betafrom
Mark-Simulacrum:beta-backports

Conversation

@Mark-Simulacrum

@Mark-Simulacrum Mark-Simulacrum commented Jul 16, 2026

Copy link
Copy Markdown
Member

View all comments

This backports:

and also bumps to the just-released 1.97.1 compiler.

r? me

workingjubilee and others added 5 commits July 16, 2026 08:34
This reverts commit 569ad99.

The PR widened the effect of this from enums with the 0..=1 range to
those with any range if they had more than 1 byte.

Unfortunately, our LLVMIR now incurs miscompilations, so revert until
we find a better fix.
Since PR 154149, when one item is glob-imported into a module twice with
different visibilities, the first-arrived declaration stays in the
resolution slot and the most visible declaration of the ambiguous glob
set is only recorded in `ambiguity_vis_max`. `DeclData::vis()` returns
the max, so name resolution, metadata reexports and
`cross_crate_inlinable` export the item at the maximum visibility, but
`set_bindings_effective_visibilities` walked only the slot-resident
declaration's reexport chain. When the restricted route arrives first,
the definition's effective visibility caps at the restricted
visibility while the item is still exported: spurious dead_code, the
item missing from reachable_set, should_encode_mir returning false, and
downstream crates failing with "missing optimized MIR" (a 1.96.1 ->
1.97.0 stable-to-stable regression).

Generalize the one-level `ambiguity_vis_max` update that PR 154149 added
in `update_import` (to keep the most visible import from being reported
as unused) into a walk of that declaration's whole reexport chain:
extract the chain walk into `update_decl_chain` and recurse into
`ambiguity_vis_max` at every hop, so the most visible declaration
drives the effective visibility of everything on its route, including
the final definition. Updates are monotone, so the dual walk is
order-independent. The `ambiguous_import_visibilities` lint and the
PR 156284 diagnostic suppression are untouched.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue. labels Jul 16, 2026
@Mark-Simulacrum
Mark-Simulacrum marked this pull request as ready for review July 16, 2026 12:39
@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 Jul 16, 2026
@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never

@rust-bors

rust-bors Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit dfd139c has been approved by Mark-Simulacrum

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 Jul 16, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 16, 2026
…crum

[beta] backports

This backports:

* resolve: fix effective visibilities for items in ambiguous glob sets #159039
* Revert extension of -1 for None-like tags #159047

and also bumps to the just-released 1.97.1 compiler.

r? me
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 17, 2026
@rust-bors

rust-bors Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

💔 Test for c653486 failed: CI. Failed job:

@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

@bors retry

Couldn't write extended state status: Bad address

@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 Jul 17, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 17, 2026
…crum

[beta] backports

This backports:

* resolve: fix effective visibilities for items in ambiguous glob sets #159039
* Revert extension of -1 for None-like tags #159047

and also bumps to the just-released 1.97.1 compiler.

r? me
@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 17, 2026
@rust-bors

rust-bors Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

💔 Test for e7ed0bf failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors retry

@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 Jul 17, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 18, 2026
…crum

[beta] backports

This backports:

* resolve: fix effective visibilities for items in ambiguous glob sets #159039
* Revert extension of -1 for None-like tags #159047

and also bumps to the just-released 1.97.1 compiler.

r? me
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2026
@rust-bors

rust-bors Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

💔 Test for adedba3 failed: CI. Failed job:

@theemathas

Copy link
Copy Markdown
Contributor

Instance of #159073.

@bors retry

@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 Jul 18, 2026
@workingjubilee

Copy link
Copy Markdown
Member

@bors r-

This should include #159401

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2026
@rust-bors

rust-bors Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

View changes since this unapproval

@jieyouxu

Copy link
Copy Markdown
Member

INTEL(R) XEON(R) PLATINUM 8573C

Yep.

See RUST-159073, this test has been flaky with

```
/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.
```

on linux CI jobs under various environments and hosts/targets. I tried
running this under GDB 15.1 locally (WSL, `x86_64-unknown-linux-gnu`)
but could not reproduce. CI typically uses GDB 12.1 with Ubuntu 22.04.
So gate this test with min GDB 15.1 which prevents it from running in CI
to workaround the flakiness but still allow running it locally under
GDB >= 15.1.

It's *possible* there's a genuine problem here.
@Mark-Simulacrum

Copy link
Copy Markdown
Member Author

Added that PR.

@bors r+ rollup=never

@rust-bors

rust-bors Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c5e8afc has been approved by Mark-Simulacrum

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 18, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

@bors p=1
Scheduling

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 18, 2026
@rust-bors

rust-bors Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: Mark-Simulacrum
Duration: 3h 15m 52s
Pushing c666fcb to beta...

@rust-bors
rust-bors Bot merged commit c666fcb into rust-lang:beta Jul 18, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants