blob: 7d15b8c6392505ccc910698755c77a1c880d0826 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// compile-flags: -Ztrait-solver=next
// check-pass
use std::any::Any;
fn needs_usize(_: &usize) {}
fn main() {
let x: &dyn Any = &1usize;
if let Some(x) = x.downcast_ref::<usize>() {
needs_usize(x);
}
}
|