about summary refs log tree commit diff
path: root/src/librustc_errors
AgeCommit message (Collapse)AuthorLines
2018-07-30rustc: Disallow machine applicability in foreign macrosAlex Crichton-19/+64
Recent changes to lints disallowed lints from being emitted against code located in foreign macros, except for future-incompatible lints. For a future incompatible lint, however, the automatic suggestions may not be applicable! This commit updates this code path to force all applicability suggestions made to foreign macros to never be `MachineApplicable`. This should avoid rustfix actually attempting fixing these suggestions, causing non-compiling code to be produced. Closes rust-lang/cargo#5799
2018-07-29Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakisbors-9/+4
Misc cleanups
2018-07-28Rollup merge of #52781 - ljedrz:avoid_vec_arguments, r=nikomatsakiskennytm-5/+5
Use a slice where a vector is not necessary
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-2/+0
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm
2018-07-27Use slices where a vector is not necessaryljedrz-5/+5
2018-07-27Remove unnecessary `.collect()`Shotaro Yamada-6/+3
2018-07-27Use str::repeatShotaro Yamada-3/+1
2018-07-27Auto merge of #52681 - pnkfelix:z-borrowck-migrate, r=nikomatsakisbors-19/+19
Add `-Z borrowck=migrate` This adds `-Z borrowck=migrate`, which represents the way we want to migrate to NLL under Rust versions to come. It also hooks this new mode into `--edition 2018`, which means we're officially turning NLL on in the 2018 edition. The basic idea of `-Z borrowck=migrate` that there are cases where NLL is fixing old soundness bugs in the borrow-checker, but in order to avoid just breaking code by immediately rejecting the programs that hit those soundness bugs, we instead use the following strategy: If your code is accepted by NLL, then we accept it. If your code is rejected by both NLL and the old AST-borrowck, then we reject it. If your code is rejected by NLL but accepted by the old AST-borrowck, then we emit the new NLL errors as **warnings**. These warnings will be turned into hard errors in the future, and they say so in these diagnostics. Fix #46908
2018-07-26Add `-Z borrowck=migrate` flag, use it to link NLL up to AST-borrowck.Felix S. Klock II-19/+19
2018-07-25Improve readability in a few sortsljedrz-5/+3
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-23Buffer errors in MIR borrow checkSantiago Pastorino-0/+12
(pnkfelix updated to address tidy, and to change the buffer from `Vec<DiagnosticBuilder<'errs>>` to a `Vec<Diagnostic>` in order to avoid painful lifetime maintenance.)
2018-07-23Auto merge of #52568 - oli-obk:span_bug_error, r=varkorbors-7/+27
Fix loop label resolution around constants And make `delay_span_bug` a little more helpful r? @varkor fixes #52442 fixes #52443
2018-07-21Auto merge of #51485 - estebank:dehighlight-secondary-msgs, r=GuillaumeGomezbors-4/+11
Remove highlighting from secondary messages Deemphasize the secondary messages so that all other highlights stand out more. <img width="684" alt="" src="https://user-images.githubusercontent.com/1606434/41261199-7b4fe96e-6d8f-11e8-8619-04d170617df2.png">
2018-07-21Sequence-field should have plural nameOliver Schneider-4/+4
2018-07-20Make sure the compiler actually panics on `delay_span_bug`Oliver Schneider-7/+27
Even if that is just happening because of `abort_if_errors`
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-17/+20
Enforce `#![deny(bare_trait_objects)]` in `src/librustc_errors`.
2018-06-30Fortify dummy span checkingVadim Petrochenkov-8/+8
2018-06-11Remove highlighting from secondary messagesEsteban Küber-4/+11
Deemphasize the secondary messages so that all other highlights stand out more.
2018-06-03Also prevent overflow in debug buildsOliver Schneider-1/+1
2018-05-31Make short-error format GNU compatibleGuillaume Gomez-1/+1
2018-05-28Auto merge of #50724 - zackmdavis:applicability_rush, r=Manishearthbors-0/+23
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-24Account for negative offsets in suggestionsEsteban Küber-15/+20
When suggesting code that has a shorter span than the current code, account for this by keeping the offset as a signed value.
2018-05-24Underline multiple suggested replacements in the same lineEsteban Küber-18/+47
Follow up to #50943. Fix #50977.
2018-05-21Improve the diagnostic around impl Trait <-> generic param mismatchOliver Schneider-0/+24
2018-05-20introducing `span_suggestion_short_with_applicability`Zack M. Davis-0/+23
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-05-09use fmt::Result where applicableAndre Bogus-2/+2
2018-04-25Approximate -> ApplicabilityManish Goregaokar-17/+17
2018-04-24Use enum for approximate suggestionsManish Goregaokar-10/+24
2018-04-17Make Handler more thread-safeJohn Kåre Alsaker-21/+26
2018-04-16Auto merge of #49130 - smmalis37:range, r=alexcrichtonbors-2/+2
Move Range*::contains to a single default impl on RangeBounds Per the ongoing discussion in #32311. This is my first PR to Rust (woo!), so I don't know if this requires an amendment to the original range_contains RFC, or not, or if we can just do a psuedo-RFC here. While this may no longer follow the explicit decision made in that RFC, I believe this better follows its spirit by adding the new contains method to all Ranges. It also allows users to be generic over all ranges and use this method without writing it themselves (my personal desired use case). This also somewhat answers the unanswered question about Wrapping ranges in the above issue by instead just punting it to the question of what those types should return for start() & end(), or if they should implement RangeArgument at all. Those types could also implement their own contains method without implementing this trait, in which case the question remains the same. This does add a new contains method to types that already implemented RangeArgument but not contains. These types are RangeFull, (Bound<T>, Bound<T>), (Bound<&'a T>, Bound<&'a T>). No tests have been added for these types yet. No inherent method has been added either. r? @alexcrichton
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-04-07Update based on RangeBounds trait being moved to libcore.Steven Malis-2/+2
2018-04-07Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakisbors-2/+0
Bump the bootstrap compiler to 1.26.0 beta Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-04-06Print query stack on ICEsJohn Kåre Alsaker-0/+5
2018-04-05Auto merge of #49045 - Zoxc:tls, r=michaelwoeristerbors-17/+8
Make queries thread safe This makes queries thread safe by removing the query stack and making queries point to their parents. Queries write to the query map when starting and cycles are detected by checking if there's already an entry in the query map. This makes cycle detection O(1) instead of O(n), where `n` is the size of the query stack. This is mostly corresponds to the method I described [here](https://internals.rust-lang.org/t/parallelizing-rustc-using-rayon/6606). cc @rust-lang/compiler r? @michaelwoerister
2018-04-05Bump the bootstrap compiler to 1.26.0 betaAlex Crichton-2/+0
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-03-26Stabilize i128_typeMark Mansi-1/+1
2018-03-26Stabilize conservative_impl_traitTaylor Cramer-1/+1
2018-03-25Rollup merge of #49046 - Zoxc:error-summary, r=michaelwoeristerkennytm-16/+18
Always print `aborting due to n previous error(s)` r? @michaelwoerister
2018-03-24Make queries thread safe. Remove the query stack and make queries point to ↵John Kåre Alsaker-17/+8
their parents instead.
2018-03-16Always print `aborting due to n previous error(s)` and only print it once ↵John Kåre Alsaker-16/+18
for multi-threaded code
2018-03-15Require the code mapper to be thread-safeJohn Kåre Alsaker-11/+12
2018-03-14test for putting back check on jsonGuillaume Gomez-59/+84
2018-03-07rustc: Migrate to `termcolor` crate from `term`Alex Crichton-161/+129
This crate moves the compiler's error reporting to using the `termcolor` crate from crates.io. Previously rustc used a super-old version of the `term` crate in-tree which is basically unmaintained at this point, but Cargo has been using `termcolor` for some time now and tools like `rg` are using `termcolor` as well, so it seems like a good strategy to take! Note that the `term` crate remains in-tree for libtest. Changing libtest will be a bit tricky due to how the build works, but we can always tackle that later. cc #45728
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-11/+11
2018-02-26Fix rebaseVadim Petrochenkov-2/+3
2018-02-26Anonymize remaining line numbers at line startsVadim Petrochenkov-9/+12
2018-02-26Support flag `-Z ui-testing` for tweaking diagnostic output for UI testsVadim Petrochenkov-3/+21