Skip to content

Commit 1fb01b2

Browse files
committed
tests: {Meta,Pointee}Sized in non-minicore tests
As before, add `MetaSized` and `PointeeSized` traits to all of the non-minicore `no_core` tests so that they don't fail for lack of language items.
1 parent 5db6a52 commit 1fb01b2

File tree

73 files changed

+470
-131
lines changed

Some content is hidden

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

73 files changed

+470
-131
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313
#![crate_type = "lib"]
1414
#![no_std]
1515
#![no_core]
16-
1716
// FIXME: Migrate these code after PR #130693 is landed.
18-
// vvvvv core
17+
18+
#[lang = "pointeesized"]
19+
pub trait PointeeSized {}
20+
21+
#[lang = "metasized"]
22+
pub trait MetaSized: PointeeSized {}
1923

2024
#[lang = "sized"]
21-
trait Sized {}
25+
pub trait Sized: MetaSized {}
2226

2327
#[lang = "copy"]
2428
trait Copy {}

tests/assembly/s390x-vector-abi.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@
1515
#![no_core]
1616
#![crate_type = "lib"]
1717
#![allow(non_camel_case_types)]
18-
1918
// Cases where vector feature is disabled are rejected.
2019
// See tests/ui/simd-abi-checks-s390x.rs for test for them.
2120

21+
#[lang = "pointeesized"]
22+
pub trait PointeeSized {}
23+
24+
#[lang = "metasized"]
25+
pub trait MetaSized: PointeeSized {}
26+
2227
#[lang = "sized"]
23-
pub trait Sized {}
28+
pub trait Sized: MetaSized {}
2429
#[lang = "copy"]
2530
pub trait Copy {}
2631
#[lang = "freeze"]

tests/assembly/small_data_threshold.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@
1919
#![no_core]
2020
#![crate_type = "lib"]
2121

22+
#[lang = "pointeesized"]
23+
pub trait PointeeSized {}
24+
25+
#[lang = "metasized"]
26+
pub trait MetaSized: PointeeSized {}
27+
2228
#[lang = "sized"]
23-
trait Sized {}
29+
pub trait Sized: MetaSized {}
2430

2531
#[lang = "drop_in_place"]
2632
fn drop_in_place<T>(_: *mut T) {}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ fn panic_div_overflow() -> ! {
3030
loop {}
3131
}
3232

33+
#[lang = "pointeesized"]
34+
pub trait PointeeSized {}
35+
36+
#[lang = "metasized"]
37+
pub trait MetaSized: PointeeSized {}
38+
3339
#[lang = "sized"]
34-
trait Sized {}
40+
pub trait Sized: MetaSized {}
3541

3642
#[lang = "copy"]
3743
trait Copy {}

tests/codegen/abi-x86-sse.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
#![crate_type = "lib"]
1818

1919
#[lang = "sized"]
20-
trait Sized {}
20+
trait Sized: MetaSized {}
21+
22+
#[lang = "metasized"]
23+
trait MetaSized: PointeeSized {}
24+
25+
#[lang = "pointeesized"]
26+
trait PointeeSized {}
2127

2228
#[lang = "copy"]
2329
trait Copy {}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@
99
#![no_std]
1010
#![no_core]
1111

12+
#[lang = "pointeesized"]
13+
pub trait PointeeSized {}
14+
15+
#[lang = "metasized"]
16+
pub trait MetaSized: PointeeSized {}
17+
1218
#[lang = "sized"]
13-
trait Sized {}
19+
pub trait Sized: MetaSized {}
1420
#[lang = "freeze"]
1521
trait Freeze {}
1622
#[lang = "copy"]

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
#![no_std]
99
#![no_core]
1010

11+
#[lang = "pointeesized"]
12+
pub trait PointeeSized {}
13+
14+
#[lang = "metasized"]
15+
pub trait MetaSized: PointeeSized {}
16+
1117
#[lang = "sized"]
12-
trait Sized {}
18+
pub trait Sized: MetaSized {}
1319
#[lang = "freeze"]
1420
trait Freeze {}
1521
#[lang = "copy"]

tests/codegen/terminating-catchpad.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@
1515
#![no_std]
1616
#![no_core]
1717

18+
#[lang = "pointeesized"]
19+
pub trait PointeeSized {}
20+
21+
#[lang = "metasized"]
22+
pub trait MetaSized: PointeeSized {}
23+
1824
#[lang = "sized"]
19-
trait Sized {}
25+
pub trait Sized: MetaSized {}
2026

2127
unsafe extern "C-unwind" {
2228
safe fn unwinds();

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
//@ compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
44
#![feature(no_core, lang_items)]
5+
6+
#[lang = "pointeesized"]
7+
pub trait PointeeSized {}
8+
9+
#[lang = "metasized"]
10+
pub trait MetaSized: PointeeSized {}
11+
512
#[lang = "sized"]
6-
trait Sized {}
13+
pub trait Sized: MetaSized {}
714

815
// Test that `nounwind` attributes are correctly applied to exported `aapcs` and
916
// `aapcs-unwind` extern functions. `aapcs-unwind` functions MUST NOT have this attribute. We

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
33
#![no_core]
44
#![feature(no_core, lang_items)]
5+
6+
#[lang = "pointeesized"]
7+
pub trait PointeeSized {}
8+
9+
#[lang = "metasized"]
10+
pub trait MetaSized: PointeeSized {}
11+
512
#[lang = "sized"]
6-
trait Sized {}
13+
pub trait Sized: MetaSized {}
714

815
// Test that `nounwind` attributes are correctly applied to exported `fastcall` and
916
// `fastcall-unwind` extern functions. `fastcall-unwind` functions MUST NOT have this attribute. We

0 commit comments

Comments
 (0)