Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 78dbe11

Browse files
Arbitrary self types v2: stabilize test changes
All the test changes necessary for stabilization here.
1 parent c93c894 commit 78dbe11

File tree

93 files changed

+397
-401
lines changed

Some content is hidden

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

93 files changed

+397
-401
lines changed

‎compiler/rustc_codegen_cranelift/example/arbitrary_self_types_pointers_and_wrappers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Adapted from rustc run-pass test suite
22

3-
#![feature(arbitrary_self_types,unsize, coerce_unsized, dispatch_from_dyn)]
3+
#![feature(unsize, coerce_unsized, dispatch_from_dyn)]
44

55
use std::marker::Unsize;
66
use std::ops::{CoerceUnsized, Deref, DispatchFromDyn};

‎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 trait Copy {}
5952

‎compiler/rustc_codegen_gcc/example/arbitrary_self_types_pointers_and_wrappers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Adapted from rustc run-pass test suite
22

3-
#![feature(arbitrary_self_types,unsize, coerce_unsized, dispatch_from_dyn)]
3+
#![feature(unsize, coerce_unsized, dispatch_from_dyn)]
44
#![feature(rustc_attrs)]
55
#![allow(internal_features)]
66

‎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 trait Copy {}
5649

‎compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4894,8 +4894,6 @@ declare_lint! {
48944894
/// UB in safe code afterwards. For example:
48954895
///
48964896
/// ```ignore (causes a warning)
4897-
/// #![feature(arbitrary_self_types)]
4898-
///
48994897
/// trait Trait {
49004898
/// fn f(self: *const Self)
49014899
/// where

‎library/core/src/ops/deref.rs

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

301301
/// Indicates that a struct can be used as a method receiver.
302302
/// That is, a type can use this type as a type of `self`, like this:
303-
/// ```compile_fail
303+
/// ```
304304
/// # // This is currently compile_fail because the compiler-side parts
305305
/// # // of arbitrary_self_types are not implemented
306306
/// use std::ops::Receiver;

‎src/doc/unstable-book/src/language-features/coroutines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Feedback on the design and usage is always appreciated!
8989
The `Coroutine` trait in `std::ops` currently looks like:
9090

9191
```rust
92-
# #![feature(arbitrary_self_types, coroutine_trait)]
92+
# #![feature(coroutine_trait)]
9393
# use std::ops::CoroutineState;
9494
# use std::pin::Pin;
9595

@@ -184,7 +184,7 @@ fn main() {
184184
This coroutine literal will compile down to something similar to:
185185

186186
```rust
187-
#![feature(arbitrary_self_types, coroutine_trait)]
187+
#![feature(coroutine_trait)]
188188

189189
use std::ops::{Coroutine, CoroutineState};
190190
use std::pin::Pin;

‎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 {}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /