rust/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs
Urgau 0c3f5cce89 Further cleanup cfgs in the UI test suite
This commit does three things:
 1. replaces (the last remaining) never true cfgs by the FALSE cfg
 2. fix derive-helper-configured.rs (typo in directive)
 3. and comment some current unused #[cfg_attr] (missing revisions)
2024-04-09 23:58:18 +02:00

20 lines
331 B
Rust

//@ compile-flags: --edition 2021
pub fn demo() -> Option<i32> {
#[cfg(FALSE)]
{
do yeet //~ ERROR `do yeet` expression is experimental
}
Some(1)
}
#[cfg(FALSE)]
pub fn alternative() -> Result<(), String> {
do yeet "hello"; //~ ERROR `do yeet` expression is experimental
}
fn main() {
demo();
}