summary refs log tree commit diff
path: root/src/librustc_errors/diagnostic_builder.rs
AgeCommit message (Collapse)AuthorLines
2017-08-28Initial diagnostic API for proc-macros.Sergio Benitez-0/+13
This commit introduces the ability to create and emit `Diagnostic` structures from proc-macros, allowing for proc-macro authors to emit warning, error, note, and help messages just like the compiler does.
2017-08-25rustc_errors: Add the ability to delay as bugsAlex Crichton-2/+20
This adds a function to `DiagnosticBuilder` to delay the entire diagnostic as a bug to be emitted at a later time. This'll end up getting used in the compiler in the subsequent commits...
2017-08-24rustc: Capture diagnostics from all queriesAlex Crichton-5/+8
This commit alters the `rustc::ty::maps` implementation to ensure that all output diagnostics from the compiler are tracked for the duration of each query. These are then intended to be replayed back the first time a cached value is loaded, and otherwise the cache should operate the same as it does today. Closes #42513
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-7/+0
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-1/+1
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-07-31fix `-Z treat-err-as-bug`Ariel Ben-Yehuda-6/+6
2017-07-17Add flag to hide code on inline suggestionsEsteban Küber-0/+5
Now there's a way to add suggestions that hide the suggested code when presented inline, to avoid weird wording when short code snippets are added at the end.
2017-05-19fix some clippy warnings in librustc_errorsAndre Bogus-2/+2
2017-05-12Rollup merge of #41942 - tommyip:master, r=Mark-SimulacrumMark Simulacrum-1/+4
Fix unexpected panic with the -Z treat-err-as-bug option This fix an issue where the compiler panics even if there is no error when passed with the `-Z treat-err-as-bug` option. Fixes #35886. r? @Mark-Simulacrum
2017-05-12Fix unexpected panic with the -Z treat-err-as-bug optionTommy Ip-1/+4
This fix an issue where the compiler panics even if there is no error when passed with the `-Z treat-err-as-bug` option. Fixes #35886.
2017-05-10Refactor suggestion diagnostic API to allow for multiple suggestionsOliver Schneider-0/+5
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-2/+4
2017-04-25Minimize single span suggestions into a noteOliver Schneider-5/+5
2017-04-11Highlight and simplify mismatched typesEsteban Küber-4/+6
Shorten mismatched types errors by replacing subtypes that are not different with `_`, and highlighting only the subtypes that are different. Given a file ```rust struct X<T1, T2> { x: T1, y: T2, } fn foo() -> X<X<String, String>, String> { X { x: X {x: "".to_string(), y: 2}, y: "".to_string()} } fn bar() -> Option<String> { "".to_string() } ``` provide the following output ```rust error[E0308]: mismatched types --> file.rs:6:5 | 6 | X { x: X {x: "".to_string(), y: 2}, y: "".to_string()} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found {integer} | = note: expected type `X<X<_, std::string::String>, _>` ^^^^^^^^^^^^^^^^^^^ // < highlighted found type `X<X<_, {integer}>, _>` ^^^^^^^^^ // < highlighted error[E0308]: mismatched types --> file.rs:6:5 | 10 | "".to_string() | ^^^^^^^^^^^^^^ expected struct `std::option::Option`, found `std::string::String` | = note: expected type `Option<std::string::String>` ^^^^^^^ ^ // < highlighted found type `std::string::String` ```
2016-11-01pacify the mercilous tidyNiko Matsakis-0/+10
2016-11-01compare-method lintNiko Matsakis-0/+22
2016-11-01separate Diagnostic from DiagnosticBuilderNiko Matsakis-0/+164