Skip to content

Conversation

@eggyal
Copy link
Contributor

@eggyal eggyal commented Jan 21, 2026

This method was broken by 258ace6, which changed self.normalized_pos to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes #149568
Fixes regression of #110885

r? cjgillot (as author of the breaking commit)

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Jan 21, 2026
@rust-log-analyzer

This comment has been minimized.

@eggyal
Copy link
Contributor Author

eggyal commented Jan 21, 2026

@rustbot author

@rustbot rustbot 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 Jan 21, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@eggyal eggyal marked this pull request as draft January 21, 2026 13:44
@eggyal eggyal force-pushed the normalized-byte-pos branch 4 times, most recently from 14cd5b1 to d4d3476 Compare January 21, 2026 16:59
@eggyal eggyal marked this pull request as ready for review January 21, 2026 17:00
@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 Jan 21, 2026
@eggyal
Copy link
Contributor Author

eggyal commented Jan 21, 2026

The test was failing on aarch64 because it uses a different asm syntax/language, so my # prefixed comments were rejected. This has been fixed by replacing with // prefixed comments, which are valid in both the Intel and Arm asm syntaxes.

However, differences in the precise error output required manual normalization. I suspect we should instead enable this test just for Intel architectures? Otherwise there will no doubt be other syntax/normalization failures on other targets?

@rustbot ready

@rust-log-analyzer

This comment has been minimized.

This method was broken by 258ace6, which changed `self.normalized_pos`
to use relative offsets however this method continued to compare against
an absolute offset.

Also adds a regression test for the issue that this method was
originally introduced to fix.
@eggyal eggyal force-pushed the normalized-byte-pos branch from d4d3476 to 01290cc Compare January 21, 2026 18:42
@rustbot
Copy link
Collaborator

rustbot commented Jan 21, 2026

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc labels Jan 21, 2026
@eggyal
Copy link
Contributor Author

eggyal commented Jan 21, 2026

Okay, so it was then failing on gcc which again isn't a surprise. So I've reverted the test normalization and restricted it to x86_64 on llvm; however the needs-backends directive (introduced in #144125) wasn't being recognised—hence 7e39015 (which should probably be in a separate PR? but it's soooo minor....).

@Zalathar
Copy link
Member

(which should probably be in a separate PR? but it's soooo minor....).

Fixing it in this PR is fine. 👍

@cjgillot
Copy link
Contributor

cjgillot commented Feb 8, 2026

r=me on the main change. As you prefer for the needs-backends change.

@eggyal
Copy link
Contributor Author

eggyal commented Feb 8, 2026

Then I guess I'll leave it here!

@eggyal
Copy link
Contributor Author

eggyal commented Feb 8, 2026

Not sure if you're expecting me to r= it now, but if so I don't have permission:

@bors r=cjgillot

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

@eggyal: 🔑 Insufficient privileges: not in review users

@Zalathar
Copy link
Member

Zalathar commented Feb 8, 2026

@bors r=cjgillot

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

📌 Commit 01290cc has been approved by cjgillot

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 Feb 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…llot

Fix `SourceFile::normalized_byte_pos`

This method was broken by 258ace6, which changed `self.normalized_pos` to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes rust-lang#149568
Fixes regression of rust-lang#110885

r? cjgillot (as author of the breaking commit)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…llot

Fix `SourceFile::normalized_byte_pos`

This method was broken by 258ace6, which changed `self.normalized_pos` to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes rust-lang#149568
Fixes regression of rust-lang#110885

r? cjgillot (as author of the breaking commit)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…llot

Fix `SourceFile::normalized_byte_pos`

This method was broken by 258ace6, which changed `self.normalized_pos` to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes rust-lang#149568
Fixes regression of rust-lang#110885

r? cjgillot (as author of the breaking commit)
rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151455 (Fix `SourceFile::normalized_byte_pos`)
 - #152250 (Remove support for slugs in diagnostic messages)
 - #152322 (Replace some `feature(core_intrinsics)` with stable hints)
 - #152328 (Fix a few diagnostics)
 - #151640 (Cleanup offload datatransfer)
 - #152212 (Port some attributes to the attr parser)
 - #152309 (Fix bound var resolution for trait aliases)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 8, 2026
…llot

Fix `SourceFile::normalized_byte_pos`

This method was broken by 258ace6, which changed `self.normalized_pos` to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes rust-lang#149568
Fixes regression of rust-lang#110885

r? cjgillot (as author of the breaking commit)
rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #151455 (Fix `SourceFile::normalized_byte_pos`)
 - #152250 (Remove support for slugs in diagnostic messages)
 - #152322 (Replace some `feature(core_intrinsics)` with stable hints)
 - #151640 (Cleanup offload datatransfer)
 - #152212 (Port some attributes to the attr parser)
 - #152309 (Fix bound var resolution for trait aliases)
 - #152339 (diagnostics: fix ICE in closure signature mismatch)
 - #152341 (`cfg_select!`: allow optional comma after `{ /* ... */ }`)
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

⌛ Testing commit 01290cc with merge 36ce3b6...

Workflow: https://github.com/rust-lang/rust/actions/runs/21802915755

rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
Fix `SourceFile::normalized_byte_pos`

This method was broken by 258ace6, which changed `self.normalized_pos` to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes #149568
Fixes regression of #110885

r? cjgillot (as author of the breaking commit)
@JonathanBrouwer
Copy link
Contributor

@bors yield
Yielding to enclosing rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

Auto build cancelled. Cancelled workflows:

The next pull request likely to be tested is #152358.

rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #151455 (Fix `SourceFile::normalized_byte_pos`)
 - #152250 (Remove support for slugs in diagnostic messages)
 - #152322 (Replace some `feature(core_intrinsics)` with stable hints)
 - #152328 (Fix a few diagnostics)
 - #151640 (Cleanup offload datatransfer)
 - #152212 (Port some attributes to the attr parser)
 - #152309 (Fix bound var resolution for trait aliases)
 - #152339 (diagnostics: fix ICE in closure signature mismatch)
 - #152341 (`cfg_select!`: allow optional comma after `{ /* ... */ }`)
@rust-bors rust-bors bot merged commit 329353e into rust-lang:main Feb 8, 2026
11 of 12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 8, 2026
rust-timer added a commit that referenced this pull request Feb 8, 2026
Rollup merge of #151455 - eggyal:normalized-byte-pos, r=cjgillot

Fix `SourceFile::normalized_byte_pos`

This method was broken by 258ace6, which changed `self.normalized_pos` to use relative offsets however this method continued to compare against an absolute offset.

Also adds a regression test for the issue that this method was originally introduced to fix.

Closes #149568
Fixes regression of #110885

r? cjgillot (as author of the breaking commit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Method SourceFile::normalized_byte_pos is broken

6 participants