]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
Merge branch 'master' into patch-2
[rust.git] / compiler / rustc_lint / src / opaque_hidden_inferred_bound.rs
index 7443d131c64dc315c8f278059fe488e498b54a0e..619582c0539b86dd0f3d04d6c09b4c557306f383 100644 (file)
     ///
     /// ### Example
     ///
-    /// ```
+    /// ```rust
+    /// trait Duh {}
+    ///
+    /// impl Duh for i32 {}
+    ///
     /// trait Trait {
-    ///     type Assoc: Send;
+    ///     type Assoc: Duh;
     /// }
     ///
     /// struct Struct;
     ///
-    /// impl Trait for Struct {
-    ///     type Assoc = i32;
+    /// impl<F: Duh> Trait for F {
+    ///     type Assoc = F;
     /// }
     ///
     /// fn test() -> impl Trait<Assoc = impl Sized> {
-    ///     Struct
+    ///     42
     /// }
     /// ```
     ///