about summary refs log tree commit diff
path: root/src/librustc_errors
AgeCommit message (Collapse)AuthorLines
2020-04-28Rollup merge of #71489 - spastorino:fix-treat-err-as-bug-handling, r=eddybDylan DPC-1/+4
Fix off by one in treat err as bug `-Ztreat-err-as-bug` doesn't work properly with delay_span_bug. r? @eddyb
2020-04-27Fix off by one error for delay_span_bugSantiago Pastorino-1/+4
delay_span_bug bumps error_count after checking treat_err_as_bug
2020-04-24Replace filter_map().next() calls with find_map()Josh Stone-13/+10
These are semantically the same, but `find_map()` is more concise.
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-1/+1
2020-04-12fix issue 69130David Renshaw-1/+4
2020-04-11rustc: Add a warning count upon completionRoccoDev-3/+24
2020-04-07Use assoc integer constants in librustc_*Linus Färnstrand-5/+5
2020-04-06Rollup merge of #70519 - estebank:constraints-before-args-spans, r=CentrilMazdak Farrokhzad-0/+14
Tweak output of type params and constraints in the wrong order r? @Centril @varkor
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-22/+16
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-1/+1
2020-03-29Suggest correct order for arguments when encountering early constraintsEsteban Küber-0/+14
When encountering constraints before type arguments or lifetimes, suggest the correct order.
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-2/+2
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
2020-03-23Rollup merge of #70199 - ↵Mazdak Farrokhzad-4/+4
pnkfelix:issue-68808-dont-turn-dummy-spans-into-invalid-lines, r=estebank Revised span-to-lines conversion to produce an empty vec on DUMMY_SP. This required revising some of the client code to stop relying on the returned set of lines being non-empty. Fix #68808
2020-03-22remove redundant closures (clippy::redundant_closure)Matthias Krüger-1/+1
2020-03-20Revised span-to-lines conversion to produce an empty vec on DUMMY_SP.Felix S. Klock II-4/+4
This required revising some of the client code to stop relying on the returned set of lines being non-empty.
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-1/+1
2020-03-10rustc_errors: Use ensure_source_file_source_present where necessary.Ana-Maria Mihalache-1/+15
2020-03-10Store `TokenStream` in `rmeta::MacroDef`.Mazdak Farrokhzad-8/+8
This removes a hack from `load_macro_untracked` in which parsing is used.
2020-03-04Use single-char patter on {ends,starts}_with and remove clone on copy type.Matthias Krüger-1/+1
These were introduced since I last fixed most of these occurences. (clippy::clone_on_copy, clippy::single_char_pattern)
2020-03-04Don't use "if let" bindings to only check a value and not actually bind ↵Matthias Krüger-1/+1
anything. For example: `if let Some(_) = foo() {}` can be reduced to `if foo().is_some() {}` (clippy::redundant_pattern_matching)
2020-03-03Rollup merge of #69628 - ↵Yuki Okushi-6/+5
nnethercote:fix-DiagnosticBuilder-into_diagnostic-leak, r=Centril Fix a leak in `DiagnosticBuilder::into_diagnostic`. Fixes #69600. r? @Centril
2020-03-03Rollup merge of #69619 - matthiaskrgr:misc, r=eddybYuki Okushi-3/+2
more cleanups * use starts_with() instead of chars().next() == Some(x) * use subsec_micros() instead of subsec_nanos() / 1000 * use for (idx, item) in iter.enumerate() instead of manually counting loop iterations with variables * use values() or keys() respectively when iterating only over keys or values of maps.
2020-03-02Rollup merge of #69623 - Centril:fix-69396-tmp, r=petrochenkovDylan DPC-14/+4
stash API: remove panic to fix ICE. Implements the temporary solution suggested in https://github.com/rust-lang/rust/pull/69537#issuecomment-593143975. Fixes https://github.com/rust-lang/rust/issues/69396. r? @petrochenkov
2020-03-02Fix a leak in `DiagnosticBuilder::into_diagnostic`.Nicholas Nethercote-6/+5
Fixes #69600.
2020-03-02stash API: remove panic to fix ICE.Mazdak Farrokhzad-14/+4
2020-03-01use for (idx, item) in iter.enumerate() instead of manually counting loop ↵Matthias Krüger-3/+2
iterations by variables
2020-02-29added `try_find_description` to distinguish no desc from invalid codeJake Vossen-9/+29
2020-02-29Auto merge of #69570 - Dylan-DPC:rollup-d6boczt, r=Dylan-DPCbors-5/+5
Rollup of 6 pull requests Successful merges: - #69477 (docs: add mention of async blocks in move keyword docs) - #69504 (Use assert_ne in hash tests) - #69546 (use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.) - #69551 (use is_empty() instead of len() == x to determine if structs are empty.) - #69563 (Fix no_std detection for target triples) - #69567 (use .to_string() instead of format!() macro to create strings) Failed merges: r? @ghost
2020-02-29Auto merge of #69227 - Marwes:buffer_stderr, r=varkorbors-3/+5
perf: Buffer stderr when writing json errors/warnings Since `stderr` is unbuffered, writing out json messages actually take up about ~10%/0.1s of the runtime of the `inflate` benchmark as it generates a fair number of warnings. cc #64413
2020-02-29Rollup merge of #69567 - matthiaskrgr:useless_fmt, r=nagisaDylan DPC-3/+3
use .to_string() instead of format!() macro to create strings handles what is left after https://github.com/rust-lang/rust/pull/69541
2020-02-29use .to_string() instead of format!() macro to create stringsMatthias Krüger-3/+3
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-2/+2
2020-02-22Rename CodeMap to SourceMap follow upMaxim Zholobak-20/+20
2020-02-17Ensure diagnostics are printed in the correct orderMarkus Westerlind-2/+4
Even when buffered. Ideally we would flush only when the emitter is done, but that requires larger changes. This gives most of the benefit of buffering in any case.
2020-02-17perf: Buffer stderr when writing json errors/warningsMarkus Westerlind-1/+1
Since `stderr` is unbuffered, writing out json messages actually take up about ~10%/0.1s of the runtime of the `inflate` benchmark. cc #64413
2020-02-11Auto merge of #69062 - Dylan-DPC:rollup-7wpjpqu, r=Dylan-DPCbors-2/+0
Rollup of 8 pull requests Successful merges: - #66498 (Remove unused feature gates) - #68816 (Tweak borrow error on `FnMut` when `Fn` is expected) - #68824 (Enable Control Flow Guard in rustbuild) - #69022 (traits: preallocate 2 Vecs of known initial size) - #69031 (Use `dyn Trait` more in tests) - #69044 (Don't run coherence twice for future-compat lints) - #69047 (Don't rustfmt check the vendor directory.) - #69055 (Clean up E0307 explanation) Failed merges: r? @ghost
2020-02-11Rollup merge of #66498 - bjorn3:less_feature_flags, r=Dylan-DPCDylan DPC-2/+0
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
2020-02-11Run RustFmtjumbatm-1/+5
2020-02-11Invert control in struct_lint_level.jumbatm-1/+3
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-02-09Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasperbors-1/+15
Initial implementation of `#![feature(move_ref_pattern)]` Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary. Closes #45600. Tracking issue: #68354. r? @matthewjasper
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-18/+35
2020-02-06rustc_errors: hide "in this macro invocation" when redundant, more explicitly.Eduard-Mihai Burtescu-28/+37
2020-02-06rustc_errors: deduplicate the -Zmacro-backtrace suggestion message.Eduard-Mihai Burtescu-12/+5
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-40/+26
2020-02-06rustc_errors: split macro backtrace rendering from <*macros> hacks.Eduard-Mihai Burtescu-59/+97
2020-02-04Remove unused feature gates from librustc_errorsbjorn3-2/+0
2020-02-02introduce `#![feature(move_ref_pattern)]`Mazdak Farrokhzad-1/+15
2020-01-30Rollup merge of #68626 - Zoxc:termize, r=estebankDylan DPC-2/+2
Use termize instead of term_size `termize` is a fork of `term_size` which uses `winapi` 0.3 instead of 0.2. This is a step towards removing the `winapi` 0.2 dependency. r? @Mark-Simulacrum
2020-01-29Use termize instead of term_sizeJohn Kåre Alsaker-2/+2
2020-01-28Correct ICE caused by macros generating invalid spans.Michael Burge-1/+8