]> git.lizzy.rs Git - rust.git/blob - src/test/ui/order-dependent-cast-inference.rs
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
[rust.git] / src / test / ui / order-dependent-cast-inference.rs
1 fn main() {
2     // Tests case where inference fails due to the order in which casts are checked.
3     // Ideally this would compile, see #48270.
4     let x = &"hello";
5     let mut y = 0 as *const _;
6     //~^ ERROR cannot cast to a pointer of an unknown kind
7     y = x as *const _;
8 }