fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0599]: no method named `bar` found for fn item `fn() -> Foo {foo}` in the current scope 2 --> $DIR/call-on-missing.rs:12:9 3 | 4LL | foo.bar(); 5 | ^^^ method not found in `fn() -> Foo {foo}` 6 | 7help: use parentheses to call this function 8 | 9LL | foo().bar(); 10 | ++ 11 12error[E0609]: no field `i` on type `fn() -> Foo {foo}` 13 --> $DIR/call-on-missing.rs:16:9 14 | 15LL | foo.i; 16 | ^ 17 | 18help: use parentheses to call this function 19 | 20LL | foo().i; 21 | ++ 22 23error[E0599]: no method named `bar` found for struct `Box<dyn Fn() -> Foo>` in the current scope 24 --> $DIR/call-on-missing.rs:22:14 25 | 26LL | callable.bar(); 27 | ^^^ method not found in `Box<dyn Fn() -> Foo>` 28 | 29help: use parentheses to call this trait object 30 | 31LL | callable().bar(); 32 | ++ 33 34error[E0609]: no field `i` on type `Box<dyn Fn() -> Foo>` 35 --> $DIR/call-on-missing.rs:26:14 36 | 37LL | callable.i; 38 | ^ unknown field 39 | 40help: use parentheses to call this trait object 41 | 42LL | callable().i; 43 | ++ 44 45error[E0599]: no method named `bar` found for type parameter `T` in the current scope 46 --> $DIR/call-on-missing.rs:32:7 47 | 48LL | fn type_param<T: Fn() -> Foo>(t: T) { 49 | - method `bar` not found for this type parameter 50LL | t.bar(); 51 | ^^^ method not found in `T` 52 | 53help: use parentheses to call this type parameter 54 | 55LL | t().bar(); 56 | ++ 57 58error[E0609]: no field `i` on type `T` 59 --> $DIR/call-on-missing.rs:36:7 60 | 61LL | fn type_param<T: Fn() -> Foo>(t: T) { 62 | - type parameter 'T' declared here 63... 64LL | t.i; 65 | ^ 66 | 67help: use parentheses to call this type parameter 68 | 69LL | t().i; 70 | ++ 71 72error: aborting due to 6 previous errors 73 74Some errors have detailed explanations: E0599, E0609. 75For more information about an error, try `rustc --explain E0599`.