about summary refs log tree commit diff
path: root/src/libsyntax/errors/mod.rs
AgeCommit message (Collapse)AuthorLines
2016-05-18Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakisbors-2/+2
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
2016-05-17fix -Z treat-err-as-bugNiko Matsakis-30/+30
2016-05-17Improve a few errors and fix #33366Jonathan Turner-2/+2
2016-05-12Update errors to use new error formatJonathan Turner-4/+4
2016-05-07Add accessor methods to DiagnosticBuilderMurarth-0/+8
2016-05-02avoid double panicNiko Matsakis-1/+2
2016-05-02update unit testsNiko Matsakis-0/+17
2016-05-02change color of warning to YELLOWNiko Matsakis-1/+1
2016-05-02refactor the Emitter traitNiko Matsakis-6/+1
There is now a CoreEmitter that everything desugars to, but without losing any information. Also remove RenderSpan::FileLine. This lets the rustc_driver tests build.
2016-05-02change errors from Yellow to MagentaNiko Matsakis-1/+1
The Yellow text is very hard to read with a white background.
2016-05-02refactor to use new snippet code and modelNiko Matsakis-88/+87
Major changes: - Remove old snippet rendering code and use the new stuff. - Introduce `span_label` method to add a label - Remove EndSpan mode and replace with a fn to get the last character of a span. - Stop using `Option<MultiSpan>` and just use an empty `MultiSpan` - and probably a bunch of other stuff :)
2016-04-27Make some fatal lexer errors recoverablemitaa-0/+2
2016-04-12Remove unused trait importsSeo Sanghyeon-3/+0
2016-03-30Put in `-Z continue-parse-after-error`Felix S. Klock II-0/+9
This works by adding a boolean flag, `continue_after_error`, to `syntax::errors::Handler` that can be imperatively set to `true` or `false` via a new `fn set_continue_after_error`. The flag starts off true (since we generally try to recover from compiler errors, and `Handler` is shared across all phases). Then, during the `phase_1_parse_input`, we consult the setting of the `-Z continue-parse-after-error` debug flag to determine whether we should leave the flag set to `true` or should change it to `false`. ---- (We might consider adding a debugflag to do such aborts in other places where we are currently attempting recovery, such as resolve, but I think the parser is the really important case to handle in the face of #31994 and the parser bugs of varying degrees that were injected by parse error recovery.)
2016-01-28Implement MultiSpan error reportingmitaa-124/+201
This allows to render multiple spans on one line, or to splice multiple replacements into a code suggestion.
2016-01-22The war on abort_if_errorsNick Cameron-2/+5
2016-01-15Rollup merge of #30787 - nikomatsakis:future-incompatible-lint, r=brsonManish Goregaokar-0/+18
There is now more structure to the report, so that you can specify e.g. an RFC/PR/issue number and other explanatory details. Example message: ``` type-parameter-invalid-lint.rs:14:8: 14:9 error: defaults for type parameters are only allowed on type definitions, like `struct` or `enum` type-parameter-invalid-lint.rs:14 fn avg<T=i32>(_: T) {} ^ type-parameter-invalid-lint.rs:14:8: 14:9 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! type-parameter-invalid-lint.rs:14:8: 14:9 note: for more information, see PR 30742 <https://github.com/rust-lang/rust/pull/30724> type-parameter-invalid-lint.rs:11:9: 11:28 note: lint level defined here type-parameter-invalid-lint.rs:11 #![deny(future_incompatible)] ^~~~~~~~~~~~~~~~~~~ error: aborting due to previous error ``` r? @brson I would really like feedback also on the specific messages! Fixes #30746
2016-01-15Implement JSON error emissionNick Cameron-15/+18
[breaking-change] syntax::errors::Handler::new has been renamed to with_tty_emitter Many functions which used to take a syntax::errors::ColorConfig, now take a rustc::session::config::ErrorOutputType. If you previously used ColorConfig::Auto as a default, you should now use ErrorOutputType::default().
2016-01-15Add an --output option for specifying an error emitterNick Cameron-0/+1
2016-01-15Add a JSON error emitterNick Cameron-0/+1
2016-01-12use fileline_ and not full span_ for the followon messagesNiko Matsakis-0/+7
2016-01-12Revamp the "future incompatible" section to clarify the situationNiko Matsakis-0/+11
better
2015-12-30Rebasing and review commentsNick Cameron-20/+14
2015-12-30RefactoringNick Cameron-35/+70
2015-12-30Structured diagnosticsNick Cameron-26/+239
2015-12-17test errorsNick Cameron-58/+0
2015-12-17Add the files I fogot about earlierNick Cameron-0/+396
d'oh