Skip to content

use minicore more in testing inline assembly#154277

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:ui-asm-minicore
Mar 24, 2026
Merged

use minicore more in testing inline assembly#154277
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
folkertdev:ui-asm-minicore

Conversation

@folkertdev
Copy link
Copy Markdown
Contributor

@folkertdev folkertdev commented Mar 23, 2026

Both for easier development and because some niche assembly features were only tested on one platform.

try-job: aarch64-gnu
try-job: x86_64-gnu
try-job: x86_64-gnu-debug

@rustbot rustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 23, 2026
@rust-log-analyzer

This comment has been minimized.

@folkertdev folkertdev marked this pull request as ready for review March 23, 2026 23:05
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 23, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 23, 2026

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 23, 2026
@jieyouxu
Copy link
Copy Markdown
Member

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 24, 2026
use `minicore` more in testing inline assembly

try-job: aarch64-gnu
try-job: x86_64-gnu
try-job: x86_64-gnu-debug
@jieyouxu jieyouxu self-assigned this Mar 24, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 24, 2026

☀️ Try build successful (CI)
Build commit: f3d451d (f3d451df9d72469245e5390cdbf31d234af802b7, parent: f66622c7eca7fc48ccc4dac848ff911b09a4d566)

Copy link
Copy Markdown
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Largely looks good to me, just one question

@rustbot author

View changes since this review


// Checks that inline asm errors are mapped to the correct line in the source code.

#[unsafe(no_mangle)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Question: these no_mangle changes I'm less sure about. Can you say more on why the no_mangle is needed? To have a reproducible symbol name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without it the test will fail with

---- [ui] tests/ui/asm/aarch64/srcloc.rs stdout ----

error: ui test did not emit an error
note: by default, ui tests are expected not to compile.
hint: use check-pass, build-pass, or run-pass directive to change this behavior.
status: exit status: 0

because the function is not considered reachable the errors in it are not emitted. using no_mangle forces the function to be reachable. using pub would work too in this case.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, right. Thanks for clarifying.

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

rustbot commented Mar 24, 2026

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

Copy link
Copy Markdown
Contributor Author

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

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

@rustbot ready

I guess, anyway. There are other ways to make a function reachable but no_mangle is the most reliable one in my experience.

View changes since this review

@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 Mar 24, 2026
@jieyouxu
Copy link
Copy Markdown
Member

Thanks
@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 24, 2026

📌 Commit 6df99d6 has been approved by jieyouxu

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 24, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 24, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #152710 (Unalign `PackedFingerprint` on all hosts, not just x86 and x86-64)
 - #153874 (constify const Fn*: Destruct)
 - #154097 (improve validation error messages: show surrounding type)
 - #154277 (use `minicore` more in testing inline assembly)
 - #154293 (Use verbose span suggestion for type const)
@rust-bors rust-bors bot merged commit ef18725 into rust-lang:main Mar 24, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 24, 2026
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Mar 25, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#152710 (Unalign `PackedFingerprint` on all hosts, not just x86 and x86-64)
 - rust-lang/rust#153874 (constify const Fn*: Destruct)
 - rust-lang/rust#154097 (improve validation error messages: show surrounding type)
 - rust-lang/rust#154277 (use `minicore` more in testing inline assembly)
 - rust-lang/rust#154293 (Use verbose span suggestion for type const)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` 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.

5 participants