You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first error is about the missing argument name in foo's parameter list, but there's another one on the call saying that the function doesn't take any parameters. I guess a dummy item was created to prevent cascading resolve errors, but it seems to create another kind of cascading error.
The text was updated successfully, but these errors were encountered:
Introduce `TyErr` independent from `TyInfer`
Add a `TyErr` type to represent unknown types in places where
parse errors have happened, while still able to build the AST.
Initially only used to represent incorrectly written fn arguments and
avoid "expected X parameters, found Y" errors when called with the
appropriate amount of parameters. We cannot use `TyInfer` for this as
`_` is not allowed as a valid argument type.
Example output:
```rust
error: expected one of `:` or `@`, found `,`
--> file.rs:12:9
|
12 | fn bar(x, y: usize) {}
| ^
error[E0061]: this function takes 2 parameters but 3 parameters were supplied
--> file.rs:19:9
|
12 | fn bar(x, y) {}
| --------------- defined here
...
19 | bar(1, 2, 3);
| ^^^^^^^ expected 2 parameters
```
Fix#34264.
The first error is about the missing argument name in
foo
's parameter list, but there's another one on the call saying that the function doesn't take any parameters. I guess a dummy item was created to prevent cascading resolve errors, but it seems to create another kind of cascading error.The text was updated successfully, but these errors were encountered: