Files
rust/tests/ui/coercion/non-primitive-cast-135412.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
237 B
Rust
Raw Normal View History

2025-04-23 15:58:50 +05:00
//@ run-rustfix
use std::sync::Arc;
fn main() {
let _ = 7u32 as Option<_>;
//~^ ERROR non-primitive cast: `u32` as `Option<_>`
let _ = "String" as Arc<str>;
//~^ ERROR non-primitive cast: `&'static str` as `Arc<str>`
}