about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2017-03-28 18:56:29 -0700
committerEsteban Küber <esteban@kuber.com.ar>2017-04-02 09:45:57 -0700
commitb83352e44c36e81db7f00eb60e78ff3828c51c9e (patch)
tree339ddfe91475b309f1bb9631aab159bb829927ec /src/test/debuginfo/enum-thinlto.rs
parent5e122f59ba23494d460466cca53c71646d99c767 (diff)
downloadrust-b83352e44c36e81db7f00eb60e78ff3828c51c9e.tar.gz
rust-b83352e44c36e81db7f00eb60e78ff3828c51c9e.zip
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
```
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions