about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2025-06-13 20:59:23 -0700
committerGitHub <noreply@github.com>2025-06-13 20:59:23 -0700
commit572b452bd50ae2c01ee783f584dbcd3fbd2e87f9 (patch)
tree2471de91808f1465eb92ee06f3e8f6a24ad50fe9
parente3aa60d9475fb3408895c14f41350ba93d9b65c0 (diff)
parent4658aee1270a89dbf89d26f68e7d6148f4c86563 (diff)
downloadrust-572b452bd50ae2c01ee783f584dbcd3fbd2e87f9.tar.gz
rust-572b452bd50ae2c01ee783f584dbcd3fbd2e87f9.zip
Rollup merge of #142480 - workingjubilee:unhandwrite-minicore, r=tgross35
tests: Convert two handwritten minicores to add-core-stubs
-rw-r--r--tests/codegen/retpoline.rs8
-rw-r--r--tests/ui/target-feature/retpoline-target-feature-flag.rs8
2 files changed, 6 insertions, 10 deletions
diff --git a/tests/codegen/retpoline.rs b/tests/codegen/retpoline.rs
index 30fdd9c2db2..915c2c3d797 100644
--- a/tests/codegen/retpoline.rs
+++ b/tests/codegen/retpoline.rs
@@ -3,18 +3,16 @@
 // `retpoline-external-thunk`, `retpoline-indirect-branches`, `retpoline-indirect-calls`
 // target features are (not) emitted when the `retpoline/retpoline-external-thunk` flag is (not) set.
 
+//@ add-core-stubs
 //@ revisions: disabled enabled_retpoline enabled_retpoline_external_thunk
 //@ needs-llvm-components: x86
 //@ compile-flags: --target x86_64-unknown-linux-gnu
 //@ [enabled_retpoline] compile-flags: -Zretpoline
 //@ [enabled_retpoline_external_thunk] compile-flags: -Zretpoline-external-thunk
-
 #![crate_type = "lib"]
-#![feature(no_core, lang_items)]
+#![feature(no_core)]
 #![no_core]
-
-#[lang = "sized"]
-trait Sized {}
+extern crate minicore;
 
 #[no_mangle]
 pub fn foo() {
diff --git a/tests/ui/target-feature/retpoline-target-feature-flag.rs b/tests/ui/target-feature/retpoline-target-feature-flag.rs
index 3e614a4236c..de3c44c3ed0 100644
--- a/tests/ui/target-feature/retpoline-target-feature-flag.rs
+++ b/tests/ui/target-feature/retpoline-target-feature-flag.rs
@@ -1,3 +1,4 @@
+//@ add-core-stubs
 //@ revisions: by_flag by_feature1 by_feature2 by_feature3
 //@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
 //@ needs-llvm-components: x86
@@ -11,12 +12,9 @@
 //@ [by_feature1]build-pass
 //@ [by_feature2]build-pass
 //@ [by_feature3]build-pass
-#![feature(no_core, lang_items)]
-#![no_std]
+#![feature(no_core)]
 #![no_core]
-
-#[lang = "sized"]
-pub trait Sized {}
+extern crate minicore;
 
 //[by_feature1]~? WARN target feature `retpoline-external-thunk` cannot be enabled with `-Ctarget-feature`: use `retpoline-external-thunk` target modifier flag instead
 //[by_feature2]~? WARN target feature `retpoline-indirect-branches` cannot be enabled with `-Ctarget-feature`: use `retpoline` target modifier flag instead