Skip to content

Commit 891cbc3

Browse files
committed
Arbitrary self types v2: stabilize test changes
All the test changes necessary for stabilization here.
1 parent e4eec94 commit 891cbc3

File tree

67 files changed

+364
-339
lines changed

Some content is hidden

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

67 files changed

+364
-339
lines changed

tests/auxiliary/minicore.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ macro_rules! impl_marker_trait {
3131
#[lang = "sized"]
3232
pub trait Sized {}
3333

34-
#[lang = "legacy_receiver"]
35-
pub trait LegacyReceiver {}
36-
impl<T: ?Sized> LegacyReceiver for &T {}
37-
impl<T: ?Sized> LegacyReceiver for &mut T {}
38-
3934
#[lang = "copy"]
4035
pub trait Copy: Sized {}
4136

tests/codegen/avr/avr-func-addrspace.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// It also validates that functions can be called through function pointers
1010
// through traits.
1111

12-
#![feature(no_core, lang_items, intrinsics, unboxed_closures, arbitrary_self_types)]
12+
#![feature(no_core, lang_items, intrinsics, unboxed_closures)]
1313
#![crate_type = "lib"]
1414
#![no_core]
1515

@@ -18,8 +18,6 @@ pub trait Sized {}
1818
#[lang = "copy"]
1919
pub trait Copy {}
2020
impl<T: ?Sized> Copy for *const T {}
21-
#[lang = "legacy_receiver"]
22-
pub trait LegacyReceiver {}
2321
#[lang = "tuple_trait"]
2422
pub trait Tuple {}
2523

tests/codegen/sanitizer/kcfi/emit-type-metadata-trait-objects.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@
88
//@ compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
99

1010
#![crate_type = "lib"]
11-
#![feature(arbitrary_self_types, no_core, lang_items)]
11+
#![feature(no_core, lang_items)]
1212
#![no_core]
1313

1414
#[lang = "sized"]
1515
trait Sized {}
1616
#[lang = "copy"]
1717
trait Copy {}
1818
impl<T: ?Sized> Copy for &T {}
19-
#[lang = "legacy_receiver"]
20-
trait LegacyReceiver {}
2119
#[lang = "dispatch_from_dyn"]
2220
trait DispatchFromDyn<T> {}
2321
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<&'a U> for &'a T {}

tests/ui/async-await/issues/issue-53249.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//@ check-pass
22
//@ edition:2018
33

4-
#![feature(arbitrary_self_types)]
5-
64
use std::task::{self, Poll};
75
use std::future::Future;
86
use std::marker::Unpin;

tests/ui/deriving/deriving-coerce-pointee-neg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(derive_coerce_pointee, arbitrary_self_types)]
1+
#![feature(derive_coerce_pointee)]
22

33
extern crate core;
44
use std::marker::CoercePointee;

tests/ui/deriving/deriving-coerce-pointee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ run-pass
2-
#![feature(derive_coerce_pointee, arbitrary_self_types)]
2+
#![feature(derive_coerce_pointee)]
33

44
use std::marker::CoercePointee;
55

tests/ui/feature-gates/feature-gate-arbitrary-self-types-pointers.feature.stderr

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/ui/feature-gates/feature-gate-arbitrary-self-types-pointers.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//@ revisions: default feature
2-
#![cfg_attr(feature, feature(arbitrary_self_types))]
3-
41
trait Foo {
52
fn foo(self: *const Self); //~ ERROR `*const Self` cannot be used as the type of `self`
63
}

tests/ui/feature-gates/feature-gate-arbitrary-self-types-pointers.default.stderr renamed to tests/ui/feature-gates/feature-gate-arbitrary-self-types-pointers.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: `*const Bar` cannot be used as the type of `self` without the `arbitrary_self_types_pointers` feature
2-
--> $DIR/feature-gate-arbitrary-self-types-pointers.rs:11:18
2+
--> $DIR/feature-gate-arbitrary-self-types-pointers.rs:8:18
33
|
44
LL | fn foo(self: *const Self) {}
55
| ^^^^^^^^^^^
@@ -10,7 +10,7 @@ LL | fn foo(self: *const Self) {}
1010
= help: consider changing to `self`, `&self`, `&mut self`, or a type implementing `Receiver` such as `self: Box<Self>`, `self: Rc<Self>`, or `self: Arc<Self>`
1111

1212
error[E0658]: `*mut Bar` cannot be used as the type of `self` without the `arbitrary_self_types_pointers` feature
13-
--> $DIR/feature-gate-arbitrary-self-types-pointers.rs:15:18
13+
--> $DIR/feature-gate-arbitrary-self-types-pointers.rs:12:18
1414
|
1515
LL | fn bar(self: *mut Self) {}
1616
| ^^^^^^^^^
@@ -21,7 +21,7 @@ LL | fn bar(self: *mut Self) {}
2121
= help: consider changing to `self`, `&self`, `&mut self`, or a type implementing `Receiver` such as `self: Box<Self>`, `self: Rc<Self>`, or `self: Arc<Self>`
2222

2323
error[E0658]: `*const Self` cannot be used as the type of `self` without the `arbitrary_self_types_pointers` feature
24-
--> $DIR/feature-gate-arbitrary-self-types-pointers.rs:5:18
24+
--> $DIR/feature-gate-arbitrary-self-types-pointers.rs:2:18
2525
|
2626
LL | fn foo(self: *const Self);
2727
| ^^^^^^^^^^^

tests/ui/feature-gates/feature-gate-arbitrary-self-types.rs

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)