Skip to content

Commit 89dfb3a

Browse files
kpreidMark-Simulacrum
authored andcommitted
Make the first mention of type_name_of_val a link and qualified.
This will make it easier for people reading the post to jump to the documentation for more details. There is already a link in Stabilized APIs but why not both?
1 parent e7800f8 commit 89dfb3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/2024-02-08-Rust-1.76.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The one new addition is that it is now guaranteed that `char` and `u32` are ABI
2929

3030
### Type names from references
3131

32-
For debugging purposes, [`any::type_name::<T>()`](https://doc.rust-lang.org/stable/std/any/fn.type_name.html) has been available since Rust 1.38 to return a string description of the type `T`, but that requires an explicit type parameter. It is not always easy to specify that type, especially for unnameable types like closures or for opaque return types. The new `type_name_of_val(&T)` offers a way to get a descriptive name from any reference to a type.
32+
For debugging purposes, [`any::type_name::<T>()`](https://doc.rust-lang.org/stable/std/any/fn.type_name.html) has been available since Rust 1.38 to return a string description of the type `T`, but that requires an explicit type parameter. It is not always easy to specify that type, especially for unnameable types like closures or for opaque return types. The new [`any::type_name_of_val(&T)`](https://doc.rust-lang.org/stable/std/any/fn.type_name_of_val.html) offers a way to get a descriptive name from any reference to a type.
3333

3434
```rust
3535
fn get_iter() -> impl Iterator<Item = i32> {

0 commit comments

Comments
 (0)