summaryrefslogtreecommitdiffstats
path: root/tests/ui/expr/malformed_closure
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/expr/malformed_closure/missing_braces_around_block.fixed (renamed from src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed)0
-rw-r--r--tests/ui/expr/malformed_closure/missing_braces_around_block.rs (renamed from src/test/ui/expr/malformed_closure/missing_braces_around_block.rs)0
-rw-r--r--tests/ui/expr/malformed_closure/missing_braces_around_block.stderr (renamed from src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr)0
-rw-r--r--tests/ui/expr/malformed_closure/ruby_style_closure.rs (renamed from src/test/ui/expr/malformed_closure/ruby_style_closure.rs)1
-rw-r--r--tests/ui/expr/malformed_closure/ruby_style_closure.stderr9
5 files changed, 9 insertions, 1 deletions
diff --git a/src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed
index c50b9a12b..c50b9a12b 100644
--- a/src/test/ui/expr/malformed_closure/missing_braces_around_block.fixed
+++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.fixed
diff --git a/src/test/ui/expr/malformed_closure/missing_braces_around_block.rs b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs
index 58c81f3a6..58c81f3a6 100644
--- a/src/test/ui/expr/malformed_closure/missing_braces_around_block.rs
+++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.rs
diff --git a/src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr b/tests/ui/expr/malformed_closure/missing_braces_around_block.stderr
index dac9a8cfc..dac9a8cfc 100644
--- a/src/test/ui/expr/malformed_closure/missing_braces_around_block.stderr
+++ b/tests/ui/expr/malformed_closure/missing_braces_around_block.stderr
diff --git a/src/test/ui/expr/malformed_closure/ruby_style_closure.rs b/tests/ui/expr/malformed_closure/ruby_style_closure.rs
index e4341e196..fdec072b8 100644
--- a/src/test/ui/expr/malformed_closure/ruby_style_closure.rs
+++ b/tests/ui/expr/malformed_closure/ruby_style_closure.rs
@@ -8,7 +8,6 @@
fn main() {
let p = Some(45).and_then({
- //~^ expected a `FnOnce<({integer},)>` closure, found `Option<_>`
|x| println!("doubling {}", x);
Some(x * 2)
//~^ ERROR: cannot find value `x` in this scope
diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure.stderr b/tests/ui/expr/malformed_closure/ruby_style_closure.stderr
new file mode 100644
index 000000000..e8b34121b
--- /dev/null
+++ b/tests/ui/expr/malformed_closure/ruby_style_closure.stderr
@@ -0,0 +1,9 @@
+error[E0425]: cannot find value `x` in this scope
+ --> $DIR/ruby_style_closure.rs:12:14
+ |
+LL | Some(x * 2)
+ | ^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.