about summary refs log tree commit diff
path: root/src/test/compile-fail/struct-no-fields.rs
AgeCommit message (Collapse)AuthorLines
2015-02-06Move compile-fail tests that are rejected by the parser to parse-failFlorian Hahn-14/+0
2014-02-08Fixed error starting with uppercasemr.Shu-1/+1
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
2014-02-04Make cfail test error messages more preciseAlex Crichton-1/+1
Closes #3192
2013-08-09Add parse-error recovery for erroneous `struct_id { }` form.Felix S. Klock II-1/+1
There are 4 different new tests, to check some different scenarios for what the parse context is at the time of recovery, becasue our compile-fail infrastructure does not appear to handle verifying error-recovery situations. Differentiate between unit-like struct definition item and unit-like struct construction in the error message. ---- More generally, outlines a more generic strategy for parse error recovery: By committing to an expression/statement at set points in the parser, we can then do some look-ahead to catch common mistakes and skip over them. One detail about this strategy is that you want to avoid emitting the "helpful" message unless the input is reasonably close to the case of interest. (E.g. do not warn about a potential unit struct for an input of the form `let hmm = do foo { } { };`) To accomplish this, I added (partial) last_token tracking; used for `commit_stmt` support. The check_for_erroneous_unit_struct_expecting fn returns bool to signal whether it "made progress"; currently unused; this is meant for use to compose several such recovery checks together in a loop.
2013-05-09back-ticksLenny222-1/+1
2013-03-27libsyntax: error on struct Foo {}.Luqman Aden-0/+14