Skip to content

Commit fc334ce

Browse files
Fix Identity trait bounds
1 parent 5335530 commit fc334ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/marker.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -787,15 +787,15 @@ unsafe impl<T: ?Sized> Freeze for &mut T {}
787787
/// type Foo = <Bar as Identity>::Identity;
788788
/// ```
789789
#[stable(feature = "pin", since = "1.33.0")]
790-
pub trait Identity: Sized {
790+
pub trait Identity {
791791
#[cfg_attr(not(bootstrap), lang = "identity")]
792792
#[stable(feature = "pin", since = "1.33.0")]
793-
/// lol
794-
type Identity;
793+
/// doc
794+
type Identity: ?Sized;
795795
}
796796

797797
#[stable(feature = "pin", since = "1.33.0")]
798-
impl<T> Identity for T {
798+
impl<T: ?Sized> Identity for T {
799799
type Identity = T;
800800
}
801801

0 commit comments

Comments
 (0)