about summary refs log tree commit diff
path: root/src/librustc_errors/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-09-23stash_diagnostic: ICE in a different wayMazdak Farrokhzad-9/+18
2019-09-23Introduce a diagnostic stashing API.Mazdak Farrokhzad-12/+72
2019-09-23Auto merge of #64272 - Mark-Simulacrum:parallel-handler, r=estebankbors-164/+225
Refactor librustc_errors::Handler API This should be reviewed by-commit. The last commit moves all fields into an inner struct behind a single lock; this is done to prevent possible deadlocks in a multi-threaded compiler, as well as inconsistent state observation.
2019-09-17Protect error handler fields with single lockMark Rousskov-132/+204
This avoids concurrency-related bugs when locks are acquired for too short a time and similar cases.
2019-09-17Remove unused methods from HandlerMark Rousskov-6/+0
2019-09-17Remove Handler::{emit, emit_with_code}Mark Rousskov-31/+28
2019-09-17Remove Handler::cancelMark Rousskov-4/+0
2019-09-17Privatize DiagnosticBuilder constructorsMark Rousskov-3/+2
2019-09-17Take Diagnostic in Handler::emit_diagnosticMark Rousskov-6/+8
2019-09-17Replace DiagnosticBuilder with Diagnostic when emitting errorMark Rousskov-1/+2
2019-09-16Fix failure note `to_str` implementationAfnan Enayet-1/+1
* Serialize the level to something a little more useful for a failure note struct * Update tests accordingly
2019-09-08Dedent macro definitionV1shvesh-3/+3
2019-09-08Remove extra trailing newlineV1shvesh-1/+0
2019-09-08Add pluralise macroV1shvesh-0/+8
Adress issue #64238. Create a macro to be used for pluralisation check throughout rustc codebase.
2019-08-21Add terminal_width debugging flagEsteban Küber-1/+1
2019-08-15syntax_pos: `NO_EXPANSION`/`SyntaxContext::empty()` -> `SyntaxContext::root()`Vadim Petrochenkov-3/+2
For consistency with `ExpnId::root`. Also introduce a helper `Span::with_root_ctxt` for creating spans with `SyntaxContext::root()` context
2019-08-14remove unused Level::PhaseFatalAleksey Kladov-5/+2
2019-07-28Auto merge of #63090 - Centril:rollup-xnjwm2h, r=Centrilbors-1/+2
Rollup of 8 pull requests Successful merges: - #61856 (Lint attributes on function arguments) - #62360 (Document that ManuallyDrop::drop should not called more than once) - #62392 (Update minifier-rs version) - #62871 (Explicit error message for async recursion.) - #62995 (Avoid ICE when suggestion span is at Eof) - #63053 (SystemTime docs: recommend Instant for elapsed time) - #63081 (tidy: Cleanup the directory whitelist) - #63088 (Remove anonymous_parameters from unrelated test) Failed merges: r? @ghost
2019-07-28Rollup merge of #62995 - estebank:issue-62973, r=varkorMazdak Farrokhzad-1/+2
Avoid ICE when suggestion span is at Eof Fix #62973.
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-1/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-25Avoid ICE when suggestion span is at EofEsteban Küber-1/+2
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-3/+0
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-1/+0
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-03Remove needless lifetimesJeremy Stucki-42/+42
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-22Count all errors for `track_errors`Matthew Jasper-3/+13
2019-06-22Prefer to use `has_errors` to `err_count`Matthew Jasper-4/+3
2019-06-11Auto merge of #61741 - Centril:rollup-fgro5kz, r=Centrilbors-0/+5
Rollup of 11 pull requests Successful merges: - #61518 (Add loops to doc list of things not stable in const fn) - #61526 (move some tests into subfolders) - #61550 (Windows 10 SDK is also required now.) - #61606 (Remove some legacy proc macro flavors) - #61652 (Mention slice patterns in array) - #61686 (librustc_errors: Add some more documentation) - #61698 (typeck: Fix const generic in repeat param ICE.) - #61707 (Azure: retry failed awscli installs) - #61715 (make sure make_ascii_lowercase actually leaves upper-case non-ASCII characters alone) - #61724 (core: use memcmp optimization for 128 bit integer slices) - #61726 (Use `for_each` in `Iterator::partition`) Failed merges: r? @ghost
2019-06-11Add deny(unused_lifetimes) to all the crates that have deny(internal).Eduard-Mihai Burtescu-0/+1
2019-06-10Address review commentsPhilipp Hansch-1/+2
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-06-10librustc_errors: Add some more documentationPhilipp Hansch-0/+4
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-05librustc_errors: Rename AnnotateRs -> AnnotateSnippetPhilipp Hansch-1/+1
The proper name of the library is `annotate-snippet`, not `annotate-rs`, this commit should get rid of any confusing `AnnotateRs` names. 1. Renames `annotate_rs_emitter.rs` to `annotate_snippet_emitter_writer.rs` so that the difference between the `Emitter` trait and the implementers is more clear. 2. Renames `AnnotateRsEmitterWriter` to `AnnotateSnippetEmitterWriter` 3. Renames `HumanReadableErrorType::AnnotateRs` to `HumanReadableErrorType::AnnotateSnippet`
2019-06-04Add new diagnostic writer using annotate-snippet libraryPhilipp Hansch-0/+1
This adds a new diagnostic writer `AnnotateRsEmitterWriter` that uses the [`annotate-snippet`][as] library to print out the human readable diagnostics. The goal is to eventually switch over to using the library instead of maintaining our own diagnostics output. This commit does *not* add all the required features to the new diagnostics writer. It is only meant as a starting point so that other people can contribute as well. [as]: https://github.com/rust-lang/annotate-snippets-rs
2019-05-21Make -Zemit-artifact-notifications also emit the artifact typeJeremy Fitzhardinge-2/+2
This is easier for tooling to handle than trying to reverse-engineer it from the filename extension.
2019-05-07rustc: rename -Z emit-directives to -Z emit-artifact-notifications and ↵Eduard-Mihai Burtescu-12/+6
simplify the output.
2019-04-30In JSON output, emit a directive after metadata is generated.Nicholas Nethercote-6/+16
To implement pipelining, Cargo needs to know when metadata generation is finished. This commit adds code to do that. Unfortunately, metadata file writing currently occurs very late during compilation, so pipelining won't produce a speed-up. Moving metadata file writing earlier will be a follow-up. The change involves splitting the existing `Emitter::emit` method in two: `Emitter::emit_diagnostic` and `Emitter::emit_directive`. The JSON directives look like this: ``` {"directive":"metadata file written: liba.rmeta"} ``` The functionality is behind the `-Z emit-directives` option, and also requires `--error-format=json`.
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-10/+14
2019-04-17Promote regular comments to rustdoc commentsAlexey Shmalko-6/+6
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-03-30Remove redundant importsFabian Drinck-1/+1
2019-03-12Stabilize Range*::contains.Steven Malis-1/+0
2019-03-07fix bad logicEsteban Küber-2/+1
2019-03-07Keep current behavior while accepting error countEsteban Küber-8/+18
2019-03-06Make `-Z treat-err-as-bug` take a number of errors to be emittedEsteban Küber-9/+18
`-Z treat-err-as-bug=0` will cause `rustc` to panic after the first error is reported. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 3 errors have been reported.
2019-02-14Rollup merge of #58296 - estebank:hidden-suggestion, r=oli-obkMazdak Farrokhzad-1/+25
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-1/+1
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-11Add way to completely hide suggestion from cli outputEsteban Küber-2/+4