]> git.lizzy.rs Git - rust.git/blob - src/test/ui/order-dependent-cast-inference.rs
Rollup merge of #101388 - compiler-errors:issue-101376, r=fee1-dead
[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 }