diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-23 02:22:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-23 02:22:44 +0100 |
| commit | 0ae4a19cf3f0f8a9b1e5ea9e9307d6968eabf71e (patch) | |
| tree | 56c0560043e512a4f37fb304ff8d99dc27f15afd /src/test/debuginfo/enum-thinlto.rs | |
| parent | a449535bbc7912c4adc1bbf2ab2738d0442f212c (diff) | |
| parent | 985e66362f8dc96699e2c621e4a235e8451376d6 (diff) | |
| download | rust-0ae4a19cf3f0f8a9b1e5ea9e9307d6968eabf71e.tar.gz rust-0ae4a19cf3f0f8a9b1e5ea9e9307d6968eabf71e.zip | |
Rollup merge of #65961 - lcnr:typename_of, r=Dylan-DPC
add fn type_name_of_val
This function is often useful during testing and mirrors `align_of_val` and `size_of_val`.
# Example
Showing the default type of integers.
```rust
let x = 7;
println!("per default, integers have the type: {}", std::any::type_name_of_val(&x));
```
To my knowledge this can currently not be done without defining a function similar to `type_name_of_val`.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
