about summary refs log tree commit diff
path: root/src/librustc_errors
AgeCommit message (Collapse)AuthorLines
2019-02-14Rollup merge of #58296 - estebank:hidden-suggestion, r=oli-obkMazdak Farrokhzad-37/+221
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-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-7/+7
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-11Use hidden suggestions for unused imports lintEsteban Küber-3/+49
2019-02-11Add way to completely hide suggestion from cli outputEsteban Küber-3/+47
2019-02-11Never inline HideCodeAlways suggestionsEsteban Küber-1/+4
2019-02-11Expose hidden snippet suggestionsEsteban Küber-0/+43
2019-02-11Add way to hide suggestion snippet window from cli outputEsteban Küber-36/+84
2019-02-10rustc: doc commentsAlexander Regueiro-7/+7
2019-02-10Revert removed #![feature(nll)]Taiki Endo-0/+1
2019-02-09Auto merge of #57944 - estebank:unclosed-delim-the-quickening, r=oli-obkbors-2/+2
Deduplicate mismatched delimiter errors Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently. Second attempt at #54029, follow up to #53949. Fix #31528.
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-07Deduplicate mismatched delimiter errorsEsteban Küber-2/+2
Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently.
2019-02-07librustc_errors => 2018Taiki Endo-45/+37
2019-01-26remove `_with_applicability` from suggestion fnsAndy Russell-156/+57
2019-01-26document `Applicability`Andy Russell-2/+18
2019-01-20Remove unnecessary dummy span checksEsteban Küber-1/+1
The emitter already verifies wether a given span note or span label can be emitted to the output. If it can't, because it is a dummy span, it will be either elided for labels or emitted as an unspanned note/help when applicable.
2019-01-19Rollup merge of #57699 - euclio:applicability-ify, r=petrochenkovMazdak Farrokhzad-34/+56
add applicability to remaining suggestions Fixes #50723. I noticed that the suggestion methods on `DiagnosticBuilder` weren't actually deprecated due to #57679. This PR deprecates them properly and fixes the remaining usages. There's also a PR for clippy at rust-lang/rust-clippy#3667.
2019-01-18Fix suggestions given mulitple bad lifetimesDan Robertson-4/+5
When given multiple lifetimes prior to type parameters in generic parameters, do not ICE and print the correct suggestion.
2019-01-17properly deprecate suggestion methodsAndy Russell-34/+56
2018-12-29Replace LockCell with atomic typesJohn Kåre Alsaker-8/+6
2018-12-25Remove licensesMark Rousskov-80/+0
2018-12-12Bump to 1.33.0Alex Crichton-1/+1
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-07Rollup merge of #56516 - frewsxcv:frewsxcv-eq, r=Mark-Simulacrumkennytm-3/+3
Replace usages of `..i + 1` ranges with `..=i`. Before this change we were using old computer code techniques. After this change we use the new and improved computer code techniques.
2018-12-04adds DocTest filename variant, refactors doctest_offset out of source_map, ↵Matthew Russo-4/+5
fixes remaining test failures
2018-12-04Replace usages of `..i + 1` ranges with `..=i`.Corey Farwell-3/+3
2018-11-23Keep label on moved spans and point at macro invocation on parse errorEsteban Küber-0/+11
2018-11-08rustc: Request ansi colors if stderr isn't a ttyAlex Crichton-1/+7
Currently Cargo will always capture the output of rustc meaning that rustc is never hooked up to a tty. To retain colors Cargo uses the `fwdansi` crate to ensure that ansi color codes are translated to windows terminal methods (and ansi codes otherwise just go their natural route on Unix). Cargo passes `--color always` to rustc to ensure that using a pipe doesn't trick it into not emitting colors at all. It turns out, however, that `--color always` ends up still accidentally using the native shell api on native windows shells. The fix here is to instead pass `AlwaysAnsi` to `termcolor` instead of `Always`, ensuring that when `--color always` is passed to rustc and its output isn't a terminal, we're always generating ansi colors regardless of the platform. Closes #55769
2018-10-31Pass suggestions as impl Iterator instead of Vecljedrz-4/+4
2018-10-29Rename other occs of (Code/File)Map to Source(Map/File) #51574David Lavati-29/+29
2018-10-20Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasperbors-1/+1
Prefer unwrap_or_else to unwrap_or in case of function calls/allocations The contents of `unwrap_or` are evaluated eagerly, so it's not a good pick in case of function calls and allocations. This PR also changes a few `unwrap_or`s with `unwrap_or_default`. An added bonus is that in some cases this change also reveals if the object it's called on is an `Option` or a `Result` (based on whether the closure takes an argument).
2018-10-19Free some memory instead of just dropping elementsOliver Scherer-1/+2
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-4/+4
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-4/+4
2018-10-19Prefer unwrap_or_else to unwrap_or in case of function calls/allocationsljedrz-1/+1
2018-10-10A handful of random string-related improvementsljedrz-4/+4
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-20Auto merge of #54241 - vi:suggest_with_applicability, r=estebankbors-23/+72
Remove usages of span_suggestion without Applicability Use `Applicability::Unspecified` for all of them instead. Shall deprecations for the non-`_with_applicability` functions be added? Shall clippy be addressed somehow? r? @estebank
2018-09-18Log when buffering a diagnostic.David Wood-0/+6
This is useful in debugging when and where errors are emitted in logs.
2018-09-17Whitespace fix again.Vitaly _Vi Shukela-3/+3
2018-09-17Better trick for allowing trailing comma at forward!Vitaly _Vi Shukela-10/+13
2018-09-17Add -Z dont-buffer-diagnostics, a way to force NLL to immediately emit its ↵Felix S. Klock II-2/+23
diagnostics. This is mainly intended for `rustc` developers who want to see a diagnostic in its original context in the control flow. Two uses cases for that are: * `-Z treat-err-as-bug` which then allows extraction of a stack-trace to the origin of the error (a case that is so important that we make that flag imply this one, effectively). * `RUST_LOG=... rustc`, in which case it is often useful to see the logging statements that occurred immediately prior to the point where the diagnostic was signalled. Drive-by: Added some documentation pointing future devs at HandlerFlags, and documented the fields of `HandlerFlags` itself.
2018-09-17Change diagnostic_builder's forward! macro to enforce trailing argument commaVitaly _Vi Shukela-27/+27
2018-09-17Fix style according to review comments.Vitaly _Vi Shukela-7/+8
2018-09-16trailing whitespace fixVitaly _Vi Shukela-1/+1
2018-09-16Deprecate *_suggestion* that are without explicit applicabilityVitaly _Vi Shukela-0/+15
2018-09-16Add multipart_suggestion_with_applicabilityVitaly _Vi Shukela-2/+32
2018-09-14Rollup merge of #54024 - alexcrichton:compile-to-wasm, r=petrochenkovkennytm-1/+1
Fix compiling some rustc crates to wasm I was dabbling recently seeing what it would take to compile `rustfmt` to the `wasm32-unknown-unknown` target and it turns out not much effort is needed! Currently `rustfmt` depends on a few rustc crates published to crates.io, so this commit touches up those crates to compile for wasm themselves. Notably: * The `rustc_data_structures` crate's `flock` implementation is stubbed out to unconditionally return errors on unsupported platforms. * The `rustc_errors` crate is extended to not do any locking for all non-windows platforms. In both of these cases if we port the compiler to new platforms the functionality isn't critical but will be discovered over time as it comes up, so this hopefully doesn't make it too too hard to compile to new platforms!
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-07Fix compiling some rustc crates to wasmAlex Crichton-1/+1
I was dabbling recently seeing what it would take to compile `rustfmt` to the `wasm32-unknown-unknown` target and it turns out not much effort is needed! Currently `rustfmt` depends on a few rustc crates published to crates.io, so this commit touches up those crates to compile for wasm themselves. Notably: * The `rustc_data_structures` crate's `flock` implementation is stubbed out to unconditionally return errors on unsupported platforms. * The `rustc_errors` crate is extended to not do any locking for all non-windows platforms. In both of these cases if we port the compiler to new platforms the functionality isn't critical but will be discovered over time as it comes up, so this hopefully doesn't make it too too hard to compile to new platforms!
2018-09-04Breaking change upgradesMark Rousskov-1/+2