about summary refs log tree commit diff
path: root/src/librustc_errors
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-5554/+0
2020-08-18Rollup merge of #75389 - RalfJung:span_label, r=davidtwcoYuki Okushi-12/+17
attempt to improve span_label docs I was still confused by the `span_label` docs, so I did some more digging. However, this needs careful checking as I have no idea if any of this is correct.
2020-08-17attempt to improve span_label docsRalf Jung-12/+17
2020-08-15replaced log with tracingGurpreet Singh-4/+4
2020-08-14Rework `rustc_serialize`Matthew Jasper-19/+23
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-05Show backtrace numbers in backtrace whenever more than one is involvedAaron Hill-2/+2
Previously, we only displayed 'frame' numbers in a macro backtrace when more than two frames were involved. This commit should help make backtrace more readable, since these kinds of messages can quickly get confusing.
2020-07-31Move from `log` to `tracing`Oliver Scherer-1/+1
2020-07-16apply bootstrap cfgsMark Rousskov-1/+0
2020-07-09Rollup merge of #74079 - nnethercote:session-globals, r=nikomatsakisManish Goregaokar-4/+4
Eliminate confusing "globals" terminology. There are some structures that are called "globals", but are they global to a compilation session, and not truly global. I have always found this highly confusing, so this commit renames them as "session globals" and adds a comment explaining things. Also, the commit fixes an unnecessary nesting of `set()` calls `src/librustc_errors/json/tests.rs` r? @Aaron1011
2020-07-09Eliminate confusing "globals" terminology.Nicholas Nethercote-4/+4
There are some structures that are called "globals", but are they global to a compilation session, and not truly global. I have always found this highly confusing, so this commit renames them as "session globals" and adds a comment explaining things. Also, the commit fixes an unnecessary nesting of `set()` calls `src/librustc_errors/json/tests.rs`
2020-07-08Fix librustc_errors unit tests.Eric Huss-0/+1
2020-06-30Stabilize `#[track_caller]`.Adam Perry-1/+1
Does not yet make its constness stable, though. Use of `Location::caller` in const contexts is still gated by `#![feature(const_caller_location)]`.
2020-06-27Rollup merge of #73763 - davidtwco:terminal-width-json-emitter, r=estebankManish Goregaokar-1/+14
errors: use `-Z terminal-width` in JSON emitter This PR makes the JSON emitter use `-Z terminal-width` in the "rendered" field of the JSON output. r? @estebank
2020-06-26errors: use `-Z terminal-width` in JSON emitterDavid Wood-1/+14
This commit makes the JSON emitter use `-Z terminal-width` in the "rendered" field of the JSON output. Signed-off-by: David Wood <david@davidtw.co>
2020-06-25emitter: column width defaults to 140David Wood-3/+7
This commit modifies the column width computation in the emitter when `termize::dimensions` returns `None` so that it uses the default value of 140 (which is used in UI testing currently) instead of `usize::MAX` which just ends up causing overflows in later computations. This is hard to test but appears to produce the same output as using saturating functions instead. Signed-off-by: David Wood <david@davidtw.co>
2020-06-15track caller for delay_span_bugmark-0/+4
2020-06-15Rollup merge of #72740 - estebank:recursive-indirection, r=matthewjasperRalf Jung-0/+36
On recursive ADT, provide indirection structured suggestion
2020-06-11Rollup merge of #73169 - Amanieu:asm-warnings, r=petrochenkovDylan DPC-0/+5
Handle assembler warnings properly Previously all inline asm diagnostics were treated as errors, but LLVM sometimes emits warnings and notes as well. Fixes #73160 r? @petrochenkov
2020-06-10On recursive ADT, provide indirection structured suggestionEsteban Küber-0/+36
2020-06-09Fix more clippy warningsMatthias Krüger-6/+2
Fixes more of: clippy::unused_unit clippy::op_ref clippy::useless_format clippy::needless_return clippy::useless_conversion clippy::bind_instead_of_map clippy::into_iter_on_ref clippy::redundant_clone clippy::nonminimal_bool clippy::redundant_closure clippy::option_as_ref_deref clippy::len_zero clippy::iter_cloned_collect clippy::filter_next
2020-06-09Handle assembler warnings properlyAmanieu d'Antras-0/+5
2020-06-08Rollup merge of #72026 - botika:master, r=estebankRalf Jung-124/+93
Update annotate-snippets-rs to 0.8.0 #59346 I made major changes to this library. In the previous version we worked with owned while in the current one with borrowed. I have adapted it without changing the behavior. I have modified the coverage since the previous one did not return correctly the index of the character in the line.
2020-06-02Make things build againVadim Petrochenkov-1/+1
2020-05-27Fix spacing of expected/found notes without a labelEsteban Küber-3/+12
2020-05-16Fix make sure out primary file comes firstJuan Aguilar Santillana-2/+13
2020-05-08Update annotate-snippets-rs to 0.8.0Juan Aguilar Santillana-124/+82
2020-05-04Simplify the error Registry methods a littleJosh Stone-6/+3
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