Skip to content

Commit 86e0eab

Browse files
committedDec 16, 2024·
tests/ui/asm: Remove uses of rustc_attrs, lang_items, and decl_macro features by using minicore
1 parent eedc229 commit 86e0eab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+537
-618
lines changed
 

‎tests/auxiliary/minicore.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! <https://github.com/rust-lang/rust/blob/c0b5cc9003f6464c11ae1c0662c6a7e06f6f5cab/compiler/rustc_codegen_cranelift/example/mini_core.rs>.
1515
// ignore-tidy-linelength
1616

17-
#![feature(no_core, lang_items, rustc_attrs, decl_macro)]
17+
#![feature(no_core, lang_items, rustc_attrs, decl_macro, naked_functions)]
1818
#![allow(unused, improper_ctypes_definitions, internal_features)]
1919
#![feature(asm_experimental_arch)]
2020
#![no_std]
@@ -80,3 +80,11 @@ pub struct UnsafeCell<T: ?Sized> {
8080
pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
8181
/* compiler built-in */
8282
}
83+
#[rustc_builtin_macro]
84+
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
85+
/* compiler built-in */
86+
}
87+
#[rustc_builtin_macro]
88+
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
89+
/* compiler built-in */
90+
}

‎tests/ui/asm/aarch64/aarch64-sve.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,10 @@
33
//@ needs-asm-support
44

55
#![crate_type = "rlib"]
6-
#![feature(no_core, rustc_attrs, lang_items)]
7-
#![no_core]
86

97
// AArch64 test corresponding to arm64ec-sve.rs.
108

11-
#[lang = "sized"]
12-
trait Sized {}
13-
#[lang = "copy"]
14-
trait Copy {}
15-
16-
impl Copy for f64 {}
17-
18-
#[rustc_builtin_macro]
19-
macro_rules! asm {
20-
() => {};
21-
}
9+
use std::arch::asm;
2210

2311
fn f(x: f64) {
2412
unsafe {

0 commit comments

Comments
 (0)
Please sign in to comment.