Skip to content

Conversation

@jyn514
Copy link
Member

@jyn514 jyn514 commented Jan 26, 2026

Spans for the offset_of! builtin macro point into an arbitrary place in core::mem. This means that the test has to be re-blessed whenever core/src/mem/mod.rs line numbers change.

Ideally, Span printing would be smarter and wouldn't show an end span if it came from a different crate than the start span (or maybe truncated the span to the last place in the start's crate). But that's a more involved fix and this avoids the immediate problem.

For transparency: This PR is mostly to make Ferrocene's CI break less often. But I expect it to also be useful upstream.

Spans for the `offset_of!` builtin macro point into an arbitrary place
in `core::mem`. This means that the test has to be re-blessed whenever
`core/src/mem/mod.rs` line numbers change.

Ideally, Span printing would be smarter and wouldn't show an end span if
it came from a different crate than the start span (or maybe truncated
the span to the last place in the start's crate). But that's a more
involved fix and this avoids the immediate problem.
@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 Jan 26, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2026

r? @madsmtm

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants