Skip to content

tests: Convert two handwritten minicores to add-core-stubs #142480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions tests/codegen/retpoline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 3 additions & 5 deletions tests/ui/target-feature/retpoline-target-feature-flag.rs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Loading