]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
Rollup merge of #104483 - oli-obk:santa-clauses-make-goals, r=compiler-errors
[rust.git] / compiler / rustc_lint / src / opaque_hidden_inferred_bound.rs
index 0e6731fa25192ce70336406ed5e4ed8416cb05d1..7e0a8a0df16c02228bc6d419c5c6b6098244190c 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
     /// }
     /// ```
     ///