summary refs log tree commit diff
path: root/src/librustc_errors/diagnostic_builder.rs
AgeCommit message (Collapse)AuthorLines
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