Files
rust/tests/ui/feature-gates/feature-gate-yeet_expr-in-cfg.rs

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

20 lines
315 B
Rust
Raw Normal View History

//@ edition: 2021
pub fn demo() -> Option<i32> {
2025-03-29 17:24:03 +00:00
#[cfg(false)]
{
do yeet //~ ERROR `do yeet` expression is experimental
}
Some(1)
}
2025-03-29 17:24:03 +00:00
#[cfg(false)]
pub fn alternative() -> Result<(), String> {
do yeet "hello"; //~ ERROR `do yeet` expression is experimental
}
fn main() {
demo();
}