about summary refs log tree commit diff
path: root/src/librustc_errors/diagnostic.rs
AgeCommit message (Collapse)AuthorLines
2019-03-23Tweak unsupported negative trait bounds messageEsteban Küber-1/+1
2019-02-14Rollup merge of #58296 - estebank:hidden-suggestion, r=oli-obkMazdak Farrokhzad-4/+75
Hidden suggestion support Add way to hide suggestion snippet window from cli output to avoid cluttered spans that don't enhance understanding. r? @pietroalbini CC @zackmdavis
2019-02-11Use hidden suggestions for unused imports lintEsteban Küber-2/+28
2019-02-11Add way to completely hide suggestion from cli outputEsteban Küber-0/+21
2019-02-11Expose hidden snippet suggestionsEsteban Küber-0/+23
2019-02-11Add way to hide suggestion snippet window from cli outputEsteban Küber-4/+5
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-02-07librustc_errors => 2018Taiki Endo-6/+6
2019-01-26remove `_with_applicability` from suggestion fnsAndy Russell-88/+26
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-23Keep label on moved spans and point at macro invocation on parse errorEsteban Küber-0/+11
2018-10-31Pass suggestions as impl Iterator instead of Vecljedrz-3/+3
2018-10-10A handful of random string-related improvementsljedrz-4/+4
2018-09-17Whitespace fix again.Vitaly _Vi Shukela-3/+3
2018-09-17Fix style according to review comments.Vitaly _Vi Shukela-4/+4
2018-09-16trailing whitespace fixVitaly _Vi Shukela-1/+1
2018-09-16Deprecate *_suggestion* that are without explicit applicabilityVitaly _Vi Shukela-0/+4
2018-09-16Add multipart_suggestion_with_applicabilityVitaly _Vi Shukela-2/+15
2018-07-26Add `-Z borrowck=migrate` flag, use it to link NLL up to AST-borrowck.Felix S. Klock II-0/+19
2018-07-20proc_macro: don't use DiagnosticBuilder for building up Diagnostics.Eduard-Mihai Burtescu-1/+1
2018-07-14Deny bare trait objects in src/librustc_errorsljedrz-4/+4
Enforce `#![deny(bare_trait_objects)]` in `src/librustc_errors`.
2018-05-28Auto merge of #50724 - zackmdavis:applicability_rush, r=Manishearthbors-0/+17
add suggestion applicabilities to librustc and libsyntax A down payment on #50723. Interested in feedback on whether my `MaybeIncorrect` vs. `MachineApplicable` judgement calls are well-calibrated (and that we have a consensus on what this means). r? @Manishearth cc @killercup @estebank
2018-05-21Improve the diagnostic around impl Trait <-> generic param mismatchOliver Schneider-0/+19
2018-05-20introducing `span_suggestion_short_with_applicability`Zack M. Davis-0/+17
Some would argue that this 40-character method name is ludicrously unwieldy (even ironic), but it's the unique continuation of the precedent set by the other suggestion methods. (And there is some hope that someday we'll just fold `Applicability` into the signature of the "basic" method `span_suggestion`.) This is in support of #50723.
2018-04-25Approximate -> ApplicabilityManish Goregaokar-10/+10
2018-04-24Use enum for approximate suggestionsManish Goregaokar-7/+10
2018-01-29Add approximate suggestions for rustfixManish Goregaokar-0/+37
This adds `span_approximate_suggestion()` that lets you emit a suggestion marked as "approximate" in the JSON output. UI users see no difference. This is for when rustc and clippy wish to emit suggestions which will make sense to the reader (e.g. they may have placeholders like `<type>`) but are not source-applicable, so that rustfix/etc can ignore these. fixes #39254
2018-01-22Only emit expanded diagnostic information onceEsteban Küber-1/+5
2018-01-03Only bump error count when we are sure that the diagnostic is not a repetition.Rafael Fernández López-3/+0
This ensures that if we emit the same diagnostic twice, the error count will match the real number of errors shown to the user. Fixes #42106
2017-11-16Remove left over dead code from suggestion diagnostic refactoringOliver Schneider-4/+3
2017-11-03Refactor internal suggestion APIOliver Schneider-10/+17
2017-11-02Make the difference between lint codes and error codes explicitOliver Schneider-3/+9
2017-10-26Auto merge of #45519 - michaelwoerister:dedup-errors, r=arielb1bors-2/+2
Don't emit the same compiler diagnostic twice. This PR makes the compiler filter out diagnostic messages that have already been emitted during the same compilation session.
2017-10-25librustc_errors: Don't emit the same error message twice.Michael Woerister-2/+2
2017-10-24Update docs for Diagnostic::span_suggestion(s)Oliver Schneider-0/+2
2017-09-29fix comment typo, `CodeSuggestion` path in doc commentZack M. Davis-2/+2
`CodeSuggestion` doesn't live in the `diagnostic` module.
2017-08-28Initial diagnostic API for proc-macros.Sergio Benitez-1/+1
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-19rustc: Remove some dead codeVadim Petrochenkov-12/+0
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-2/+2
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-9/+9
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-2/+2
2017-07-23Auto merge of #43096 - estebank:ascription-help, r=nikomatsakisbors-0/+18
Point at `:` when using it instead of `;` When triggering type ascription in such a way that we can infer a statement end was intended, add a suggestion for the change. Always point out the reason for the expectation of a type is due to type ascription. Fix #42057, #41928.
2017-07-17Add flag to hide code on inline suggestionsEsteban Küber-0/+18
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-07-17Change some helps to suggestionsOliver Schneider-0/+12
2017-06-11Suggest non-ambiguous comparison after castEsteban Küber-0/+4
``` warning: `<` is interpreted as a start of generic arguments for `usize`, not comparison --> $DIR/issue-22644.rs:16:33 | 16 | println!("{}", a as usize < b); | ^ expected one of `!`, `(`, `+`, `,`, `::`, or `>` here | help: if you want to compare the casted value then write | println!("{}", (a as usize) < b); ```
2017-06-04Show trait method signature when impl differsEsteban Küber-0/+8
When the trait's span is available, it is already being used, add a `note` for the cases where the span isn't available: ``` error[E0053]: method `fmt` has an incompatible type for trait --> $DIR/trait_type.rs:17:4 | 17 | fn fmt(&self, x: &str) -> () { } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability | = note: expected type `fn(&MyType, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` found type `fn(&MyType, &str)` error[E0050]: method `fmt` has 1 parameter but the declaration in trait `std::fmt::Display::fmt` has 2 --> $DIR/trait_type.rs:21:11 | 21 | fn fmt(&self) -> () { } | ^^^^^ expected 2 parameters, found 1 | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` error[E0186]: method `fmt` has a `&self` declaration in the trait, but not in the impl --> $DIR/trait_type.rs:25:4 | 25 | fn fmt() -> () { } | ^^^^^^^^^^^^^^^^^^ expected `&self` in impl | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` error[E0046]: not all trait items implemented, missing: `fmt` --> $DIR/trait_type.rs:28:1 | 28 | impl std::fmt::Display for MyType4 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `fmt` in implementation | = note: `fmt` from trait: `fn(&Self, &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error>` ```
2017-05-11Address PR reviewsOliver Schneider-2/+9
2017-05-10Refactor suggestion diagnostic API to allow for multiple suggestionsOliver Schneider-6/+12
2017-05-08Remove need for &format!(...) or &&"" dances in `span_label` callsOliver Schneider-3/+2
2017-04-25Minimize single span suggestions into a noteOliver Schneider-14/+10