Skip to content

Commit dc45f5f

Browse files
committed
Revert change to one test because of inconsistent output in aarc64
1 parent d357049 commit dc45f5f

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

tests/ui/confuse-field-and-method/issue-2392.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//@ compile-flags: -Zwrite-long-types-to-disk=yes
2-
31
struct FuncContainer {
42
f1: fn(data: u8),
53
f2: extern "C" fn(data: u8),

tests/ui/confuse-field-and-method/issue-2392.stderr

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
error[E0599]: no method named `closure` found for struct `Obj<{[email protected]:37:36}>` in the current scope
2-
--> $DIR/issue-2392.rs:38:15
1+
error[E0599]: no method named `closure` found for struct `Obj<{closure@$DIR/issue-2392.rs:35:36: 35:38}>` in the current scope
2+
--> $DIR/issue-2392.rs:36:15
33
|
44
LL | struct Obj<F> where F: FnOnce() -> u32 {
55
| ------------- method `closure` not found for this struct
66
...
77
LL | o_closure.closure();
88
| ^^^^^^^ field, not a method
99
|
10-
= note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-2392.long-type-$LONG_TYPE_HASH.txt'
11-
= note: consider using `--verbose` to print the full type name to the console
1210
help: to call the closure stored in `closure`, surround the field access with parentheses
1311
|
1412
LL | (o_closure.closure)();
1513
| + +
1614

17-
error[E0599]: no method named `not_closure` found for struct `Obj<{[email protected]:37:36}>` in the current scope
18-
--> $DIR/issue-2392.rs:40:15
15+
error[E0599]: no method named `not_closure` found for struct `Obj<{closure@$DIR/issue-2392.rs:35:36: 35:38}>` in the current scope
16+
--> $DIR/issue-2392.rs:38:15
1917
|
2018
LL | struct Obj<F> where F: FnOnce() -> u32 {
2119
| ------------- method `not_closure` not found for this struct
@@ -24,12 +22,9 @@ LL | o_closure.not_closure();
2422
| ^^^^^^^^^^^-- help: remove the arguments
2523
| |
2624
| field, not a method
27-
|
28-
= note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-2392.long-type-$LONG_TYPE_HASH.txt'
29-
= note: consider using `--verbose` to print the full type name to the console
3025

3126
error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
32-
--> $DIR/issue-2392.rs:44:12
27+
--> $DIR/issue-2392.rs:42:12
3328
|
3429
LL | struct Obj<F> where F: FnOnce() -> u32 {
3530
| ------------- method `closure` not found for this struct
@@ -43,7 +38,7 @@ LL | (o_func.closure)();
4338
| + +
4439

4540
error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
46-
--> $DIR/issue-2392.rs:47:14
41+
--> $DIR/issue-2392.rs:45:14
4742
|
4843
LL | struct BoxedObj {
4944
| --------------- method `boxed_closure` not found for this struct
@@ -57,7 +52,7 @@ LL | (boxed_fn.boxed_closure)();
5752
| + +
5853

5954
error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
60-
--> $DIR/issue-2392.rs:50:19
55+
--> $DIR/issue-2392.rs:48:19
6156
|
6257
LL | struct BoxedObj {
6358
| --------------- method `boxed_closure` not found for this struct
@@ -71,7 +66,7 @@ LL | (boxed_closure.boxed_closure)();
7166
| + +
7267

7368
error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
74-
--> $DIR/issue-2392.rs:55:12
69+
--> $DIR/issue-2392.rs:53:12
7570
|
7671
LL | struct Obj<F> where F: FnOnce() -> u32 {
7772
| ------------- method `closure` not found for this struct
@@ -85,7 +80,7 @@ LL | (w.wrap.closure)();
8580
| + +
8681

8782
error[E0599]: no method named `not_closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
88-
--> $DIR/issue-2392.rs:57:12
83+
--> $DIR/issue-2392.rs:55:12
8984
|
9085
LL | struct Obj<F> where F: FnOnce() -> u32 {
9186
| ------------- method `not_closure` not found for this struct
@@ -96,7 +91,7 @@ LL | w.wrap.not_closure();
9691
| field, not a method
9792

9893
error[E0599]: no method named `closure` found for struct `Obj<Box<(dyn FnOnce() -> u32 + 'static)>>` in the current scope
99-
--> $DIR/issue-2392.rs:60:24
94+
--> $DIR/issue-2392.rs:58:24
10095
|
10196
LL | struct Obj<F> where F: FnOnce() -> u32 {
10297
| ------------- method `closure` not found for this struct
@@ -110,7 +105,7 @@ LL | (check_expression().closure)();
110105
| + +
111106

112107
error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope
113-
--> $DIR/issue-2392.rs:66:31
108+
--> $DIR/issue-2392.rs:64:31
114109
|
115110
LL | struct FuncContainer {
116111
| -------------------- method `f1` not found for this struct
@@ -124,7 +119,7 @@ LL | ((*self.container).f1)(1);
124119
| + +
125120

126121
error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope
127-
--> $DIR/issue-2392.rs:67:31
122+
--> $DIR/issue-2392.rs:65:31
128123
|
129124
LL | struct FuncContainer {
130125
| -------------------- method `f2` not found for this struct
@@ -138,7 +133,7 @@ LL | ((*self.container).f2)(1);
138133
| + +
139134

140135
error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope
141-
--> $DIR/issue-2392.rs:68:31
136+
--> $DIR/issue-2392.rs:66:31
142137
|
143138
LL | struct FuncContainer {
144139
| -------------------- method `f3` not found for this struct

0 commit comments

Comments
 (0)