-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as not planned
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
The type_name
intrinsic name implies that the function should only return the name of type, however it returns a fully qualified path of the type.
Try this:
#![feature(core_intrinsics)]
use std::intrinsics::type_name;
fn main(){
let vec: Option<Vec<bool>> = Some(vec![]);
println!("{}", unsafe { type_name::<Option<Vec<bool>>>() });
}
Expected Option<Vec<bool>>
, got std::option::Option<std::vec::Vec<bool>>
.
kennytm
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.