Skip to content

Commit 1436b6b

Browse files
committed
Update tests to use #[rustc_auto_trait]
1 parent 7b06035 commit 1436b6b

File tree

114 files changed

+480
-391
lines changed

Some content is hidden

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

114 files changed

+480
-391
lines changed

compiler/rustc_codegen_cranelift/example/mini_core.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
decl_macro,
88
rustc_attrs,
99
transparent_unions,
10-
auto_traits,
1110
thread_local
1211
)]
1312
#![no_core]
@@ -93,7 +92,8 @@ unsafe impl<'a, T: ?Sized> Sync for &'a T {}
9392
unsafe impl Sync for [u8; 16] {}
9493

9594
#[lang = "freeze"]
96-
unsafe auto trait Freeze {}
95+
#[rustc_auto_trait]
96+
unsafe trait Freeze {}
9797

9898
unsafe impl<T: ?Sized> Freeze for PhantomData<T> {}
9999
unsafe impl<T: ?Sized> Freeze for *const T {}
@@ -503,7 +503,8 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
503503
}
504504

505505
#[lang = "unpin"]
506-
pub auto trait Unpin {}
506+
#[rustc_auto_trait]
507+
pub trait Unpin {}
507508

508509
#[lang = "deref"]
509510
pub trait Deref {

compiler/rustc_codegen_gcc/example/mini_core.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(
22
no_core, lang_items, intrinsics, unboxed_closures, type_ascription, extern_types,
3-
decl_macro, rustc_attrs, transparent_unions, auto_traits,
3+
decl_macro, rustc_attrs, transparent_unions,
44
thread_local
55
)]
66
#![no_core]
@@ -89,7 +89,8 @@ unsafe impl<'a, T: ?Sized> Sync for &'a T {}
8989
unsafe impl Sync for [u8; 16] {}
9090

9191
#[lang = "freeze"]
92-
unsafe auto trait Freeze {}
92+
#[rustc_auto_trait]
93+
unsafe trait Freeze {}
9394

9495
unsafe impl<T: ?Sized> Freeze for PhantomData<T> {}
9596
unsafe impl<T: ?Sized> Freeze for *const T {}
@@ -452,7 +453,8 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
452453
}
453454

454455
#[lang = "unpin"]
455-
pub auto trait Unpin {}
456+
#[rustc_auto_trait]
457+
pub trait Unpin {}
456458

457459
#[lang = "deref"]
458460
pub trait Deref {

compiler/rustc_codegen_gcc/tests/run/abort1.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Run-time:
44
// status: signal
55

6-
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
6+
#![feature(rustc_attrs, lang_items, no_core, start, intrinsics)]
77

88
#![no_std]
99
#![no_core]
@@ -27,7 +27,8 @@ trait Receiver {
2727
}
2828

2929
#[lang = "freeze"]
30-
pub(crate) unsafe auto trait Freeze {}
30+
#[rustc_auto_trait]
31+
pub(crate) unsafe trait Freeze {}
3132

3233
mod intrinsics {
3334
use super::Sized;

compiler/rustc_codegen_gcc/tests/run/abort2.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Run-time:
44
// status: signal
55

6-
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
6+
#![feature(rustc_attrs, lang_items, no_core, start, intrinsics)]
77

88
#![no_std]
99
#![no_core]
@@ -27,7 +27,8 @@ trait Receiver {
2727
}
2828

2929
#[lang = "freeze"]
30-
pub(crate) unsafe auto trait Freeze {}
30+
#[rustc_auto_trait]
31+
pub(crate) unsafe trait Freeze {}
3132

3233
mod intrinsics {
3334
use super::Sized;

compiler/rustc_codegen_gcc/tests/run/array.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// 5
88
// 10
99

10-
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
10+
#![feature(arbitrary_self_types, rustc_attrs, lang_items, no_core, start, intrinsics)]
1111

1212
#![no_std]
1313
#![no_core]
@@ -36,7 +36,8 @@ trait Receiver {
3636
}
3737

3838
#[lang = "freeze"]
39-
pub(crate) unsafe auto trait Freeze {}
39+
#[rustc_auto_trait]
40+
pub(crate) unsafe trait Freeze {}
4041

4142
mod libc {
4243
#[link(name = "c")]

compiler/rustc_codegen_gcc/tests/run/assign.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// 10
77

88
#![allow(unused_attributes)]
9-
#![feature(auto_traits, lang_items, no_core, start, intrinsics, track_caller)]
9+
#![feature(rustc_attrs, lang_items, no_core, start, intrinsics, track_caller)]
1010

1111
#![no_std]
1212
#![no_core]
@@ -35,7 +35,8 @@ trait Receiver {
3535
}
3636

3737
#[lang = "freeze"]
38-
pub(crate) unsafe auto trait Freeze {}
38+
#[rustc_auto_trait]
39+
pub(crate) unsafe trait Freeze {}
3940

4041
#[lang = "panic_location"]
4142
struct PanicLocation {

compiler/rustc_codegen_gcc/tests/run/closure.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// Int argument: 2
99
// Both args: 11
1010

11-
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics,
11+
#![feature(arbitrary_self_types, rustc_attrs, lang_items, no_core, start, intrinsics,
1212
unboxed_closures)]
1313

1414
#![no_std]
@@ -38,7 +38,8 @@ trait Receiver {
3838
}
3939

4040
#[lang = "freeze"]
41-
pub(crate) unsafe auto trait Freeze {}
41+
#[rustc_auto_trait]
42+
pub(crate) unsafe trait Freeze {}
4243

4344
mod libc {
4445
#[link(name = "c")]

compiler/rustc_codegen_gcc/tests/run/condition.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// stdout: true
66
// 1
77

8-
#![feature(arbitrary_self_types, auto_traits, lang_items, no_core, start, intrinsics)]
8+
#![feature(arbitrary_self_types, rustc_attrs, lang_items, no_core, start, intrinsics)]
99

1010
#![no_std]
1111
#![no_core]
@@ -39,7 +39,8 @@ trait Receiver {
3939
}
4040

4141
#[lang = "freeze"]
42-
pub(crate) unsafe auto trait Freeze {}
42+
#[rustc_auto_trait]
43+
pub(crate) unsafe trait Freeze {}
4344

4445
mod libc {
4546
#[link(name = "c")]

compiler/rustc_codegen_gcc/tests/run/empty_main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Run-time:
44
// status: 0
55

6-
#![feature(auto_traits, lang_items, no_core, start)]
6+
#![feature(rustc_attrs, lang_items, no_core, start)]
77

88
#![no_std]
99
#![no_core]
@@ -27,7 +27,8 @@ trait Receiver {
2727
}
2828

2929
#[lang = "freeze"]
30-
pub(crate) unsafe auto trait Freeze {}
30+
#[rustc_auto_trait]
31+
pub(crate) unsafe trait Freeze {}
3132

3233
/*
3334
* Code

compiler/rustc_codegen_gcc/tests/run/exit.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Run-time:
44
// status: 2
55

6-
#![feature(auto_traits, lang_items, no_core, start, intrinsics)]
6+
#![feature(rustc_attrs, lang_items, no_core, start, intrinsics)]
77

88
#![no_std]
99
#![no_core]
@@ -34,7 +34,8 @@ trait Receiver {
3434
}
3535

3636
#[lang = "freeze"]
37-
pub(crate) unsafe auto trait Freeze {}
37+
#[rustc_auto_trait]
38+
pub(crate) unsafe trait Freeze {}
3839

3940
/*
4041
* Code

0 commit comments

Comments
 (0)