Files
rust/tests/ui/unsafe/move-out-of-non-copy.rs

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

16 lines
348 B
Rust
Raw Normal View History

2025-05-23 09:44:22 +00:00
//@ compile-flags: -Zvalidate-mir
// Regression test for <https://github.com/rust-lang/rust/issues/141394>.
#![feature(unsafe_binders)]
#![allow(incomplete_features)]
use std::unsafe_binder::unwrap_binder;
fn id<T>(x: unsafe<> T) -> T {
//~^ ERROR the trait bound `T: Copy` is not satisfied
unsafe { unwrap_binder!(x) }
}
fn main() {}