fix: make Type::of supported unsized types
This commit is contained in:
parent
137716908d
commit
b57c249333
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ impl Type {
|
|||
#[unstable(feature = "type_info", issue = "146922")]
|
||||
#[rustc_const_unstable(feature = "type_info", issue = "146922")]
|
||||
// FIXME(reflection): don't require the 'static bound
|
||||
pub const fn of<T: 'static>() -> Self {
|
||||
pub const fn of<T: ?Sized + 'static>() -> Self {
|
||||
const { TypeId::of::<T>().info() }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue