Skip to content

Commit 9865a6c

Browse files
authored
Rollup merge of #130225 - adetaylor:rename-old-receiver, r=wesleywiser
Rename Receiver -> LegacyReceiver As part of the "arbitrary self types v2" project, we are going to replace the current `Receiver` trait with a new mechanism based on a new, different `Receiver` trait. This PR renames the old trait to get it out the way. Naming is hard. Options considered included: * HardCodedReceiver (because it should only be used for things in the standard library, and hence is sort-of hard coded) * LegacyReceiver * TargetLessReceiver * OldReceiver These are all bad names, but fortunately this will be temporary. Assuming the new mechanism proceeds to stabilization as intended, the legacy trait will be removed altogether. Although we expect this trait to be used only in the standard library, we suspect it may be in use elsehwere, so we're landing this change separately to identify any surprising breakages. It's known that this trait is used within the Rust for Linux project; a patch is in progress to remove their dependency. This is a part of the arbitrary self types v2 project, rust-lang/rfcs#3519 rust-lang/rust#44874 r? `@wesleywiser`
2 parents 6315254 + c12fdd2 commit 9865a6c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

example/mini_core.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ 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 = "receiver"]
48-
pub trait Receiver {}
47+
#[lang = "legacy_receiver"]
48+
pub trait LegacyReceiver {}
4949

50-
impl<T: ?Sized> Receiver for &T {}
51-
impl<T: ?Sized> Receiver for &mut T {}
52-
impl<T: ?Sized, A: Allocator> Receiver for Box<T, A> {}
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> {}
5353

5454
#[lang = "copy"]
5555
pub unsafe trait Copy {}

0 commit comments

Comments
 (0)