2019-04-15 00:09:03 +00:00
|
|
|
error: struct literals are not allowed here
|
|
|
|
--> $DIR/E0423.rs:12:32
|
2018-06-05 01:47:47 +00:00
|
|
|
|
|
|
|
|
LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
|
2019-04-15 00:09:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2019-05-02 22:53:09 +00:00
|
|
|
help: surround the struct literal with parentheses
|
2019-03-13 02:27:10 +00:00
|
|
|
|
|
2019-04-15 00:09:03 +00:00
|
|
|
LL | if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); }
|
2021-06-22 02:07:19 +00:00
|
|
|
| + +
|
2018-06-05 01:47:47 +00:00
|
|
|
|
|
|
|
error: expected expression, found `==`
|
2019-04-15 00:09:03 +00:00
|
|
|
--> $DIR/E0423.rs:14:13
|
2018-06-05 01:47:47 +00:00
|
|
|
|
|
|
|
|
LL | if T {} == T {} { println!("Ok"); }
|
|
|
|
| ^^ expected expression
|
|
|
|
|
2019-04-15 00:09:03 +00:00
|
|
|
error: struct literals are not allowed here
|
|
|
|
--> $DIR/E0423.rs:20:14
|
2018-06-05 01:47:47 +00:00
|
|
|
|
|
|
|
|
LL | for _ in std::ops::Range { start: 0, end: 10 } {}
|
2019-04-15 00:09:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2019-05-02 22:53:09 +00:00
|
|
|
help: surround the struct literal with parentheses
|
2019-03-13 02:27:10 +00:00
|
|
|
|
|
2019-04-15 00:09:03 +00:00
|
|
|
LL | for _ in (std::ops::Range { start: 0, end: 10 }) {}
|
2021-06-22 02:07:19 +00:00
|
|
|
| + +
|
2018-06-05 01:47:47 +00:00
|
|
|
|
2022-10-05 05:35:34 +00:00
|
|
|
error[E0423]: expected value, found struct `T`
|
|
|
|
--> $DIR/E0423.rs:14:8
|
|
|
|
|
|
|
|
|
LL | if T {} == T {} { println!("Ok"); }
|
|
|
|
| ^ not a value
|
|
|
|
|
|
|
|
|
help: surround the struct literal with parentheses
|
|
|
|
|
|
|
|
|
LL | if (T {}) == T {} { println!("Ok"); }
|
|
|
|
| + +
|
|
|
|
|
2019-10-15 00:20:50 +00:00
|
|
|
error[E0423]: expected function, tuple struct or tuple variant, found struct `Foo`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/E0423.rs:4:13
|
2018-02-08 03:35:35 +00:00
|
|
|
|
|
2020-03-21 14:03:58 +00:00
|
|
|
LL | struct Foo { a: bool };
|
|
|
|
| ---------------------- `Foo` defined here
|
2022-06-08 18:07:59 +00:00
|
|
|
LL |
|
2020-03-21 14:03:58 +00:00
|
|
|
LL | let f = Foo();
|
2020-07-10 00:42:07 +00:00
|
|
|
| ^^^^^
|
2020-08-10 03:29:39 +00:00
|
|
|
...
|
|
|
|
LL | fn foo() {
|
|
|
|
| -------- similarly named function `foo` defined here
|
2020-07-10 00:42:07 +00:00
|
|
|
|
|
|
|
|
help: use struct literal syntax instead
|
|
|
|
|
|
|
|
|
LL | let f = Foo { a: val };
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~~~~~~~~~~
|
2020-08-10 03:29:39 +00:00
|
|
|
help: a function with a similar name exists
|
|
|
|
|
|
|
|
|
LL | let f = foo();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~
|
2018-06-05 01:47:47 +00:00
|
|
|
|
2019-04-15 00:09:03 +00:00
|
|
|
error: aborting due to 5 previous errors
|
2018-02-08 03:35:35 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0423`.
|