Use different type in an example (#1908)

* Use different type in an example

Sentences such as «without the argument u32» were ambiguous, as there were two distincts u32. Having a single one, the one in the monomorphization of the type, remove the ambiguity.

* Update src/ty.md

---------

Co-authored-by: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com>
This commit is contained in:
Arthur Milchior 2024-03-01 23:26:16 +01:00 committed by GitHub
parent 6595d0e0f0
commit 9ce24d1cbf
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ modules choose to import a larger or smaller set of names explicitly.
Let's consider the example of a type like `MyStruct<u32>`, where `MyStruct` is defined like so: Let's consider the example of a type like `MyStruct<u32>`, where `MyStruct` is defined like so:
```rust,ignore ```rust,ignore
struct MyStruct<T> { x: u32, y: T } struct MyStruct<T> { x: u8, y: T }
``` ```
The type `MyStruct<u32>` would be an instance of `TyKind::Adt`: The type `MyStruct<u32>` would be an instance of `TyKind::Adt`: