rust/src/libsyntax
Esteban Küber b83352e44c 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
```
2017-04-02 09:45:57 -07:00
..
diagnostics Use Symbol instead of InternedString in the AST, HIR, and various other places. 2016-11-21 09:00:55 +00:00
ext Improve Path spans. 2017-03-30 05:44:56 +00:00
parse Introduce TyErr independent from TyInfer 2017-04-02 09:45:57 -07:00
print Introduce TyErr independent from TyInfer 2017-04-02 09:45:57 -07:00
util Refactor out ast::ItemKind::MacroDef. 2017-03-10 08:08:32 -08:00
abi.rs Add support for x86-interrupt calling convention 2017-03-02 19:01:15 +01:00
ast.rs Introduce TyErr independent from TyInfer 2017-04-02 09:45:57 -07:00
attr.rs Improve Path spans. 2017-03-30 05:44:56 +00:00
Cargo.toml Remove internal liblog 2017-03-23 11:28:00 -07:00
codemap.rs Refactor how spans are combined in the parser. 2017-03-29 11:17:59 +00:00
config.rs Liberalize attributes. 2017-03-14 04:39:21 +00:00
diagnostic_list.rs Add long error explanations 2017-02-21 15:52:14 +01:00
entry.rs Cleanup InternedString. 2016-11-21 09:00:56 +00:00
feature_gate.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
fold.rs Introduce TyErr independent from TyInfer 2017-04-02 09:45:57 -07:00
json.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
lib.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
ptr.rs Documentation for default types modified 2016-09-11 22:58:01 +05:30
show_span.rs annotate stricter lifetimes on LateLintPass methods to allow them to forward to a Visitor 2016-12-06 11:28:51 +01:00
std_inject.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
str.rs syntax: Copy unstable str::char_at into libsyntax 2015-04-21 10:23:53 -07:00
test.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
test_snippet.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
tokenstream.rs Merge ExpnId and SyntaxContext. 2017-03-29 00:41:10 +00:00
visit.rs Introduce TyErr independent from TyInfer 2017-04-02 09:45:57 -07:00