Files
rust/tests/ui/unsafe-fields-parse.rs
Luca Versari 9022bb2d6f Implement the unsafe-fields RFC.
Co-Authored-By: Jacob Pratt <jacob@jhpratt.dev>
2024-11-21 19:32:07 +01:00

11 lines
271 B
Rust

//@ compile-flags: --crate-type=lib
#![allow(incomplete_features)]
#![feature(unsafe_fields)]
// Parse errors even *with* unsafe_fields, which would make the compiler early-exit otherwise.
enum A {
TupleLike(unsafe u32), //~ ERROR
}
struct B(unsafe u32); //~ ERROR