diff --git a/src/types/inferred.md b/src/types/inferred.md index 08964f99f..f5736b642 100644 --- a/src/types/inferred.md +++ b/src/types/inferred.md @@ -10,14 +10,15 @@ r[type.inferred.intro] The inferred type asks the compiler to infer the type if possible based on the surrounding information available. -r[type.inferred.constraint] -It cannot be used in item signatures. - -It is often used in generic arguments: +> [!EXAMPLE] +> The inferred type is often used in generic arguments: +> +> ```rust +> let x: Vec<_> = (0..10).collect(); +> ``` -```rust -let x: Vec<_> = (0..10).collect(); -``` +r[type.inferred.constraint] +The inferred type cannot be used in item signatures.