summaryrefslogtreecommitdiffstats
path: root/tests/ui/feature-gates/feature-gate-yeet_expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/feature-gates/feature-gate-yeet_expr.rs')
-rw-r--r--tests/ui/feature-gates/feature-gate-yeet_expr.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/feature-gates/feature-gate-yeet_expr.rs b/tests/ui/feature-gates/feature-gate-yeet_expr.rs
new file mode 100644
index 000000000..978a84cf6
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-yeet_expr.rs
@@ -0,0 +1,9 @@
+// compile-flags: --edition 2018
+
+pub fn demo() -> Option<i32> {
+ do yeet //~ ERROR `do yeet` expression is experimental
+}
+
+pub fn main() -> Result<(), String> {
+ do yeet "hello"; //~ ERROR `do yeet` expression is experimental
+}