Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
c2524bc6899a1a7feebda032dd26f751504e94e5
rust/tests/ui/try-trait/yeet-for-option.rs

12 lines
141 B
Rust
Raw Normal View History

Add `do yeet` expressions to allow experimentation in nightly Using an obviously-placeholder syntax. An RFC would still be needed before this could have any chance at stabilization, and it might be removed at any point. But I'd really like to have it in nightly at least to ensure it works well with try_trait_v2, especially as we refactor the traits.
2022-03-25 23:43:54 -07:00
// run-pass
#![feature(yeet_expr)]
fn always_yeet() -> Option<String> {
do yeet;
}
fn main() {
assert_eq!(always_yeet(), None);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 910ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API