Skip to content

Commit c9d6445

Browse files
Add Tuple marker trait
1 parent 8236113 commit c9d6445

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/src/marker.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,15 @@ impl<T: ?Sized> Unpin for *mut T {}
800800
#[rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg)]
801801
pub trait Destruct {}
802802

803+
/// A marker for tuple types.
804+
///
805+
/// The implementation of this trait is built-in and cannot be implemented
806+
/// for any user type.
807+
#[unstable(feature = "tuple_trait", issue = "none")]
808+
#[cfg_attr(not(bootstrap), lang = "tuple_trait")]
809+
#[rustc_on_unimplemented(message = "`{Self}` is not a tuple")]
810+
pub trait Tuple {}
811+
803812
/// Implementations of `Copy` for primitive types.
804813
///
805814
/// Implementations that cannot be described in Rust

0 commit comments

Comments
 (0)