Skip to content

Commit 0dc5734

Browse files
committed
---
yaml --- r: 213998 b: refs/heads/master c: 0230a53 h: refs/heads/master v: v3
1 parent 75abb8d commit 0dc5734

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9932870833a3d2c13431c0454a4a91bf54a0e5ab
2+
refs/heads/master: 0230a530ce54102325537dc63dcabc45f5935771
33
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/test/compile-fail/issue-2392.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,35 @@ fn check_expression() -> Obj<Box<FnBox() -> u32>> {
3434

3535
fn main() {
3636
// test variations of function
37+
3738
let o_closure = Obj { closure: || 42, not_closure: 42 };
3839
o_closure.closure(); //~ ERROR no method named `closure` found
39-
//~^ NOTE use `(o_closure.closure)(...)` if you meant to call the function stored in the `closure` field
40+
//~^ NOTE use `(o_closure.closure)(...)` if you meant to call the function stored
4041

4142
o_closure.not_closure(); //~ ERROR no method named `not_closure` found
4243
//~^ NOTE did you mean to write `o_closure.not_closure`?
4344

4445
let o_func = Obj { closure: func, not_closure: 5 };
4546
o_func.closure(); //~ ERROR no method named `closure` found
46-
//~^ NOTE use `(o_func.closure)(...)` if you meant to call the function stored in the `closure` field
47+
//~^ NOTE use `(o_func.closure)(...)` if you meant to call the function stored
4748

4849
let boxed_fn = BoxedObj { boxed_closure: Box::new(func) };
4950
boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found
50-
//~^ NOTE use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field
51+
//~^ NOTE use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored
5152

5253
let boxed_closure = BoxedObj { boxed_closure: Box::new(|| 42_u32) as Box<FnBox() -> u32> };
5354
boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found
54-
//~^ NOTE use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field
55+
//~^ NOTE use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored
5556

5657
// test expression writing in the notes
58+
5759
let w = Wrapper { wrap: o_func };
5860
w.wrap.closure();//~ ERROR no method named `closure` found
59-
//~^ NOTE use `(w.wrap.closure)(...)` if you meant to call the function stored in the `closure` field
61+
//~^ NOTE use `(w.wrap.closure)(...)` if you meant to call the function stored
62+
6063
w.wrap.not_closure();//~ ERROR no method named `not_closure` found
6164
//~^ NOTE did you mean to write `w.wrap.not_closure`?
6265

6366
check_expression().closure();//~ ERROR no method named `closure` found
64-
//~^ NOTE use `(check_expression().closure)(...)` if you meant to call the function stored in the `closure` field
67+
//~^ NOTE use `(check_expression().closure)(...)` if you meant to call the function stored
6568
}

0 commit comments

Comments
 (0)