Skip to content

Commit 572b452

Browse files
Rollup merge of #142480 - workingjubilee:unhandwrite-minicore, r=tgross35
tests: Convert two handwritten minicores to add-core-stubs
2 parents e3aa60d + 4658aee commit 572b452

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

tests/codegen/retpoline.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
// `retpoline-external-thunk`, `retpoline-indirect-branches`, `retpoline-indirect-calls`
44
// target features are (not) emitted when the `retpoline/retpoline-external-thunk` flag is (not) set.
55

6+
//@ add-core-stubs
67
//@ revisions: disabled enabled_retpoline enabled_retpoline_external_thunk
78
//@ needs-llvm-components: x86
89
//@ compile-flags: --target x86_64-unknown-linux-gnu
910
//@ [enabled_retpoline] compile-flags: -Zretpoline
1011
//@ [enabled_retpoline_external_thunk] compile-flags: -Zretpoline-external-thunk
11-
1212
#![crate_type = "lib"]
13-
#![feature(no_core, lang_items)]
13+
#![feature(no_core)]
1414
#![no_core]
15-
16-
#[lang = "sized"]
17-
trait Sized {}
15+
extern crate minicore;
1816

1917
#[no_mangle]
2018
pub fn foo() {

tests/ui/target-feature/retpoline-target-feature-flag.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ add-core-stubs
12
//@ revisions: by_flag by_feature1 by_feature2 by_feature3
23
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
34
//@ needs-llvm-components: x86
@@ -11,12 +12,9 @@
1112
//@ [by_feature1]build-pass
1213
//@ [by_feature2]build-pass
1314
//@ [by_feature3]build-pass
14-
#![feature(no_core, lang_items)]
15-
#![no_std]
15+
#![feature(no_core)]
1616
#![no_core]
17-
18-
#[lang = "sized"]
19-
pub trait Sized {}
17+
extern crate minicore;
2018

2119
//[by_feature1]~? WARN target feature `retpoline-external-thunk` cannot be enabled with `-Ctarget-feature`: use `retpoline-external-thunk` target modifier flag instead
2220
//[by_feature2]~? WARN target feature `retpoline-indirect-branches` cannot be enabled with `-Ctarget-feature`: use `retpoline` target modifier flag instead

0 commit comments

Comments
 (0)