Sign in
rust
/
rust
/
93d56ce32ecd989bbbd161a703cdc1921e338de6
/
.
/
tests
/
ui
/
reflection
/
reflection_methods_in_runtime_code.rs
blob: 4204fb3ad16f41e40e9cf4eaf28209ea1c23090c [
file
]
#![
feature
(
type_info
)]
trait
Trait
{}
fn
main
()
{
// Test the (lack of) usability of comptime fns in runtime code.
std
::
any
::
TypeId
::
of
::<[
u8
;
usize
::
MAX
]>().
trait_info_of
::<
dyn
Trait
>();
//~^ ERROR: comptime fns can only be called at compile time
}