about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-23 02:22:44 +0100
committerGitHub <noreply@github.com>2019-11-23 02:22:44 +0100
commit0ae4a19cf3f0f8a9b1e5ea9e9307d6968eabf71e (patch)
tree56c0560043e512a4f37fb304ff8d99dc27f15afd /src/rustllvm/RustWrapper.cpp
parenta449535bbc7912c4adc1bbf2ab2738d0442f212c (diff)
parent985e66362f8dc96699e2c621e4a235e8451376d6 (diff)
downloadrust-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/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions