use minicore more in testing inline assembly#154277
use minicore more in testing inline assembly#154277rust-bors[bot] merged 1 commit intorust-lang:mainfrom
minicore more in testing inline assembly#154277Conversation
This comment has been minimized.
This comment has been minimized.
d53c7d0 to
6df99d6
Compare
|
This PR modifies cc @jieyouxu |
|
@bors try |
This comment has been minimized.
This comment has been minimized.
use `minicore` more in testing inline assembly try-job: aarch64-gnu try-job: x86_64-gnu try-job: x86_64-gnu-debug
|
|
||
| // Checks that inline asm errors are mapped to the correct line in the source code. | ||
|
|
||
| #[unsafe(no_mangle)] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Ah, right. Thanks for clarifying.
|
Reminder, once the PR becomes ready for a review, use |
There was a problem hiding this comment.
@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.
|
Thanks |
…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)
…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)
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