]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/confuse-field-and-method/issue-2392.stderr
Unify output of "variant not found" errors
[rust.git] / src / test / ui / confuse-field-and-method / issue-2392.stderr
index 351cfef1b53ea0517de30663cd7a9b88ad62926e..f9dfdddad9d469060b340ee17fb85481a2619dde 100644 (file)
@@ -1,4 +1,4 @@
-error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope
   --> $DIR/issue-2392.rs:36:15
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -6,12 +6,13 @@ LL | struct Obj<F> where F: FnOnce() -> u32 {
 ...
 LL |     o_closure.closure();
    |               ^^^^^^^ field, not a method
+   |
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (o_closure.closure)();
    |     ^                 ^
 
-error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope
+error[E0599]: no method named `not_closure` found for struct `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope
   --> $DIR/issue-2392.rs:38:15
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -22,7 +23,7 @@ LL |     o_closure.not_closure();
    |               |
    |               field, not a method
 
-error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
   --> $DIR/issue-2392.rs:42:12
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -30,12 +31,13 @@ LL | struct Obj<F> where F: FnOnce() -> u32 {
 ...
 LL |     o_func.closure();
    |            ^^^^^^^ field, not a method
+   |
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (o_func.closure)();
    |     ^              ^
 
-error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope
+error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
   --> $DIR/issue-2392.rs:45:14
    |
 LL | struct BoxedObj {
@@ -43,12 +45,13 @@ LL | struct BoxedObj {
 ...
 LL |     boxed_fn.boxed_closure();
    |              ^^^^^^^^^^^^^ field, not a method
+   |
 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
    |
 LL |     (boxed_fn.boxed_closure)();
    |     ^                      ^
 
-error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope
+error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
   --> $DIR/issue-2392.rs:48:19
    |
 LL | struct BoxedObj {
@@ -56,12 +59,13 @@ LL | struct BoxedObj {
 ...
 LL |     boxed_closure.boxed_closure();
    |                   ^^^^^^^^^^^^^ field, not a method
+   |
 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
    |
 LL |     (boxed_closure.boxed_closure)();
    |     ^                           ^
 
-error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
   --> $DIR/issue-2392.rs:53:12
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -69,12 +73,13 @@ LL | struct Obj<F> where F: FnOnce() -> u32 {
 ...
 LL |     w.wrap.closure();
    |            ^^^^^^^ field, not a method
+   |
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (w.wrap.closure)();
    |     ^              ^
 
-error[E0599]: no method named `not_closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
+error[E0599]: no method named `not_closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
   --> $DIR/issue-2392.rs:55:12
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -85,7 +90,7 @@ LL |     w.wrap.not_closure();
    |            |
    |            field, not a method
 
-error[E0599]: no method named `closure` found for type `Obj<std::boxed::Box<(dyn std::ops::FnOnce() -> u32 + 'static)>>` in the current scope
+error[E0599]: no method named `closure` found for struct `Obj<std::boxed::Box<(dyn std::ops::FnOnce() -> u32 + 'static)>>` in the current scope
   --> $DIR/issue-2392.rs:58:24
    |
 LL | struct Obj<F> where F: FnOnce() -> u32 {
@@ -93,12 +98,13 @@ LL | struct Obj<F> where F: FnOnce() -> u32 {
 ...
 LL |     check_expression().closure();
    |                        ^^^^^^^ field, not a method
+   |
 help: to call the function stored in `closure`, surround the field access with parentheses
    |
 LL |     (check_expression().closure)();
    |     ^                          ^
 
-error[E0599]: no method named `f1` found for type `FuncContainer` in the current scope
+error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope
   --> $DIR/issue-2392.rs:64:31
    |
 LL | struct FuncContainer {
@@ -106,12 +112,13 @@ LL | struct FuncContainer {
 ...
 LL |             (*self.container).f1(1);
    |                               ^^ field, not a method
+   |
 help: to call the function stored in `f1`, surround the field access with parentheses
    |
 LL |             ((*self.container).f1)(1);
    |             ^                    ^
 
-error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope
+error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope
   --> $DIR/issue-2392.rs:65:31
    |
 LL | struct FuncContainer {
@@ -119,12 +126,13 @@ LL | struct FuncContainer {
 ...
 LL |             (*self.container).f2(1);
    |                               ^^ field, not a method
+   |
 help: to call the function stored in `f2`, surround the field access with parentheses
    |
 LL |             ((*self.container).f2)(1);
    |             ^                    ^
 
-error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope
+error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope
   --> $DIR/issue-2392.rs:66:31
    |
 LL | struct FuncContainer {
@@ -132,6 +140,7 @@ LL | struct FuncContainer {
 ...
 LL |             (*self.container).f3(1);
    |                               ^^ field, not a method
+   |
 help: to call the function stored in `f3`, surround the field access with parentheses
    |
 LL |             ((*self.container).f3)(1);