diff options
| author | Michael Hewson <michael@michaelhewson.ca> | 2018-09-21 02:16:29 -0400 |
|---|---|---|
| committer | Michael Hewson <michael@michaelhewson.ca> | 2018-11-01 18:16:22 -0400 |
| commit | c29641e067d44c754fbc6a40e463a7e4d45ab31e (patch) | |
| tree | 9c2bfe524887f32dc99bdbf9dd5c3b8875697879 | |
| parent | 82f1f9a5b4ccd1eae1ac6f00d98f9fb61b94946d (diff) | |
| download | rust-c29641e067d44c754fbc6a40e463a7e4d45ab31e.tar.gz rust-c29641e067d44c754fbc6a40e463a7e4d45ab31e.zip | |
fix docs on trait
tests were failing because I didn't wrap code snippets like in backticks. fixed that now, so hopefully tests will pass on travis
| -rw-r--r-- | src/libcore/ops/unsize.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/ops/unsize.rs b/src/libcore/ops/unsize.rs index 4faace26b02..0112258134d 100644 --- a/src/libcore/ops/unsize.rs +++ b/src/libcore/ops/unsize.rs @@ -85,10 +85,10 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {} /// where `Self = dyn Trait` to the version where `Self = T`, the erased, sized type /// of the underlying object. /// -/// CoerceSized is implemented for: -/// - &[T] is CoerceSized<&[T; N]> for any N -/// - &Trait is CoerceSized<&T> for any T: Trait -/// - and similarly for &mut T, *const T, *mut T, Box<T>, Rc<T>, Arc<T> +/// `CoerceSized` is implemented for: +/// - `&[T]` is `CoerceSized<&[T; N]>` for any `N` +/// - `&Trait` is `CoerceSized<&T>` for any `T: Trait` +/// - and similarly for `&mut T`, `*const T`, `*mut T`, `Box<T>`, `Rc<T>`, `Arc<T>` #[unstable(feature = "coerce_sized", issue = "0")] #[cfg_attr(not(stage0), lang = "coerce_sized")] pub trait CoerceSized<T> where T: CoerceUnsized<Self> { |
