]> git.lizzy.rs Git - rust.git/blob - tests/ui/order-dependent-cast-inference.rs
Rollup merge of #106784 - lyming2007:issue-106695-fix, r=WaffleLapkin
[rust.git] / tests / 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 }