mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Rename test for issue 21058
This commit is contained in:
parent
419924d878
commit
1bec124ab8
@ -18,24 +18,24 @@ macro_rules! check {
|
||||
};
|
||||
}
|
||||
|
||||
/// Tests that [`std::any::type_name`] supports unsized types.
|
||||
#[test]
|
||||
fn issue_21058() {
|
||||
// type_name should support unsized types
|
||||
fn type_name_unsized() {
|
||||
check!([u8], "[u8]");
|
||||
check!(str, "str");
|
||||
check!(dyn Send, "dyn core::marker::Send");
|
||||
check!(NT, "issue_21058::NT");
|
||||
check!(DST, "issue_21058::DST");
|
||||
check!(NT, "type_name_unsized::NT");
|
||||
check!(DST, "type_name_unsized::DST");
|
||||
check!(&i32, "&i32");
|
||||
check!(&'static i32, "&i32");
|
||||
check!((i32, u32), "(i32, u32)");
|
||||
check!(val: foo(), "issue_21058::Foo");
|
||||
check!(val: Foo::new, "issue_21058::Foo::new");
|
||||
check!(val: foo(), "type_name_unsized::Foo");
|
||||
check!(val: Foo::new, "type_name_unsized::Foo::new");
|
||||
check!(val:
|
||||
<Foo as Debug>::fmt,
|
||||
"<issue_21058::Foo as core::fmt::Debug>::fmt"
|
||||
"<type_name_unsized::Foo as core::fmt::Debug>::fmt"
|
||||
);
|
||||
check!(val: || {}, "issue_21058::issue_21058::{{closure}}");
|
||||
check!(val: || {}, "type_name_unsized::type_name_unsized::{{closure}}");
|
||||
bar::<i32>();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user