Skip to content

Commit d322a54

Browse files
committed
tests: const {Meta,}Sized in non-minicore
Now that `MetaSized` and `Sized` are const traits, this must be reflected in tests without minicore which define these language items.
1 parent e5557c7 commit d322a54

File tree

68 files changed

+208
-114
lines changed

Some content is hidden

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

68 files changed

+208
-114
lines changed

tests/assembly/rust-abi-arg-attr.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//@ [loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu
1010
//@ [loongarch64] needs-llvm-components: loongarch
1111

12-
#![feature(no_core, lang_items, intrinsics, rustc_attrs)]
12+
#![feature(no_core, lang_items, intrinsics, rustc_attrs, const_trait_impl)]
1313
#![crate_type = "lib"]
1414
#![no_std]
1515
#![no_core]
@@ -19,9 +19,11 @@
1919
pub trait PointeeSized {}
2020

2121
#[lang = "metasized"]
22+
#[const_trait]
2223
pub trait MetaSized: PointeeSized {}
2324

2425
#[lang = "sized"]
26+
#[const_trait]
2527
pub trait Sized: MetaSized {}
2628

2729
#[lang = "copy"]

tests/assembly/s390x-vector-abi.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//@[z13_no_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z13 -C target-feature=-vector --cfg no_vector
1212
//@[z13_no_vector] needs-llvm-components: systemz
1313

14-
#![feature(no_core, lang_items, repr_simd, s390x_target_feature)]
14+
#![feature(no_core, lang_items, repr_simd, s390x_target_feature, const_trait_impl)]
1515
#![no_core]
1616
#![crate_type = "lib"]
1717
#![allow(non_camel_case_types)]
@@ -22,9 +22,11 @@
2222
pub trait PointeeSized {}
2323

2424
#[lang = "metasized"]
25+
#[const_trait]
2526
pub trait MetaSized: PointeeSized {}
2627

2728
#[lang = "sized"]
29+
#[const_trait]
2830
pub trait Sized: MetaSized {}
2931
#[lang = "copy"]
3032
pub trait Copy {}

tests/assembly/small_data_threshold.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//@ [M68K] compile-flags: --target=m68k-unknown-linux-gnu
1515
//@ [M68K] needs-llvm-components: m68k
1616

17-
#![feature(no_core, lang_items)]
17+
#![feature(no_core, lang_items, const_trait_impl)]
1818
#![no_std]
1919
#![no_core]
2020
#![crate_type = "lib"]
@@ -23,9 +23,11 @@
2323
pub trait PointeeSized {}
2424

2525
#[lang = "metasized"]
26+
#[const_trait]
2627
pub trait MetaSized: PointeeSized {}
2728

2829
#[lang = "sized"]
30+
#[const_trait]
2931
pub trait Sized: MetaSized {}
3032

3133
#[lang = "drop_in_place"]

tests/codegen-units/item-collection/implicit-panic-call.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// rust-lang/rust#90405
44
// Ensure implicit panic calls are collected
55

6-
#![feature(lang_items)]
6+
#![feature(lang_items, const_trait_impl)]
77
#![feature(no_core)]
88
#![crate_type = "lib"]
99
#![no_core]
@@ -34,9 +34,11 @@ fn panic_div_overflow() -> ! {
3434
pub trait PointeeSized {}
3535

3636
#[lang = "metasized"]
37+
#[const_trait]
3738
pub trait MetaSized: PointeeSized {}
3839

3940
#[lang = "sized"]
41+
#[const_trait]
4042
pub trait Sized: MetaSized {}
4143

4244
#[lang = "copy"]

tests/codegen/abi-x86-sse.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
//@[x86-32-nosse] compile-flags: --target i586-unknown-linux-gnu
1313
//@[x86-32-nosse] needs-llvm-components: x86
1414

15-
#![feature(no_core, lang_items, rustc_attrs, repr_simd)]
15+
#![feature(no_core, lang_items, const_trait_impl, rustc_attrs, repr_simd)]
1616
#![no_core]
1717
#![crate_type = "lib"]
1818

1919
#[lang = "sized"]
20+
#[const_trait]
2021
trait Sized: MetaSized {}
2122

2223
#[lang = "metasized"]
24+
#[const_trait]
2325
trait MetaSized: PointeeSized {}
2426

2527
#[lang = "pointeesized"]

tests/codegen/emscripten-catch-unwind-js-eh.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Emscripten has its own unique implementation of catch_unwind (in `codegen_emcc_try`),
55
// make sure it generates something reasonable.
66

7-
#![feature(no_core, lang_items, intrinsics, rustc_attrs)]
7+
#![feature(no_core, lang_items, intrinsics, rustc_attrs, const_trait_impl)]
88
#![crate_type = "lib"]
99
#![no_std]
1010
#![no_core]
@@ -13,9 +13,11 @@
1313
pub trait PointeeSized {}
1414

1515
#[lang = "metasized"]
16+
#[const_trait]
1617
pub trait MetaSized: PointeeSized {}
1718

1819
#[lang = "sized"]
20+
#[const_trait]
1921
pub trait Sized: MetaSized {}
2022
#[lang = "freeze"]
2123
trait Freeze {}

tests/codegen/emscripten-catch-unwind-wasm-eh.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Emscripten catch_unwind using wasm exceptions
55

6-
#![feature(no_core, lang_items, intrinsics, rustc_attrs)]
6+
#![feature(no_core, lang_items, intrinsics, rustc_attrs, const_trait_impl)]
77
#![crate_type = "lib"]
88
#![no_std]
99
#![no_core]
@@ -12,9 +12,11 @@
1212
pub trait PointeeSized {}
1313

1414
#[lang = "metasized"]
15+
#[const_trait]
1516
pub trait MetaSized: PointeeSized {}
1617

1718
#[lang = "sized"]
19+
#[const_trait]
1820
pub trait Sized: MetaSized {}
1921
#[lang = "freeze"]
2022
trait Freeze {}

tests/codegen/terminating-catchpad.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// - `catchpad ... [ptr null]` on Wasm (otherwise LLVM gets confused)
1111
// - `catchpad ... [ptr null, i32 64, ptr null]` on Windows (otherwise we catch SEH exceptions)
1212

13-
#![feature(no_core, lang_items, rustc_attrs)]
13+
#![feature(no_core, lang_items, rustc_attrs, const_trait_impl)]
1414
#![crate_type = "lib"]
1515
#![no_std]
1616
#![no_core]
@@ -19,9 +19,11 @@
1919
pub trait PointeeSized {}
2020

2121
#[lang = "metasized"]
22+
#[const_trait]
2223
pub trait MetaSized: PointeeSized {}
2324

2425
#[lang = "sized"]
26+
#[const_trait]
2527
pub trait Sized: MetaSized {}
2628

2729
unsafe extern "C-unwind" {

tests/codegen/unwind-abis/aapcs-unwind-abi.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
//@ needs-llvm-components: arm
22
//@ compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items)]
4+
#![feature(no_core, lang_items, const_trait_impl)]
55

66
#[lang = "pointeesized"]
77
pub trait PointeeSized {}
88

99
#[lang = "metasized"]
10+
#[const_trait]
1011
pub trait MetaSized: PointeeSized {}
1112

1213
#[lang = "sized"]
14+
#[const_trait]
1315
pub trait Sized: MetaSized {}
1416

1517
// Test that `nounwind` attributes are correctly applied to exported `aapcs` and

tests/codegen/unwind-abis/fastcall-unwind-abi.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
//@ needs-llvm-components: x86
22
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
4-
#![feature(no_core, lang_items)]
4+
#![feature(no_core, lang_items, const_trait_impl)]
55

66
#[lang = "pointeesized"]
77
pub trait PointeeSized {}
88

99
#[lang = "metasized"]
10+
#[const_trait]
1011
pub trait MetaSized: PointeeSized {}
1112

1213
#[lang = "sized"]
14+
#[const_trait]
1315
pub trait Sized: MetaSized {}
1416

1517
// Test that `nounwind` attributes are correctly applied to exported `fastcall` and

0 commit comments

Comments
 (0)