Skip to content

Commit dbcd7db

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

File tree

70 files changed

+363
-318
lines changed

Some content is hidden

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

70 files changed

+363
-318
lines changed

compiler/rustc_codegen_cranelift/example/mini_core.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
4747
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}
4848
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Box<U>> for Box<T> {}
4949

50-
#[lang = "legacy_receiver"]
51-
pub trait LegacyReceiver {}
52-
53-
impl<T: ?Sized> LegacyReceiver for &T {}
54-
impl<T: ?Sized> LegacyReceiver for &mut T {}
55-
impl<T: ?Sized> LegacyReceiver for Box<T> {}
56-
5750
#[lang = "copy"]
5851
pub unsafe trait Copy {}
5952

compiler/rustc_codegen_gcc/example/mini_core.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
4444
impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}
4545
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Box<U, ()>> for Box<T, ()> {}
4646

47-
#[lang = "legacy_receiver"]
48-
pub trait LegacyReceiver {}
49-
50-
impl<T: ?Sized> LegacyReceiver for &T {}
51-
impl<T: ?Sized> LegacyReceiver for &mut T {}
52-
impl<T: ?Sized, A: Allocator> LegacyReceiver for Box<T, A> {}
53-
5447
#[lang = "copy"]
5548
pub unsafe trait Copy {}
5649

library/core/src/ops/deref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ unsafe impl<T: ?Sized> DerefPure for &mut T {}
343343

344344
/// Indicates that a struct can be used as a method receiver.
345345
/// That is, a type can use this type as a type of `self`, like this:
346-
/// ```compile_fail
346+
/// ```
347347
/// # // This is currently compile_fail because the compiler-side parts
348348
/// # // of arbitrary_self_types are not implemented
349349
/// use std::ops::Receiver;

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/rustdoc-json/impls/auto.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
#[lang = "sized"]
55
trait Sized {}
66

7-
#[lang = "legacy_receiver"]
8-
pub trait LegacyReceiver {}
9-
107
pub auto trait Bar {}
118

129
/// has span

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

0 commit comments

Comments
 (0)