summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/diagnostics
AgeCommit message (Collapse)AuthorLines
2022-10-04Use Predicate ConstraintCategory when normalizingJack Huey-6/+14
(cherry picked from commit e7ca6e1b47ce31ad544cd8f0eb7e5cd47b325e63)
2022-10-04Final bitsJack Huey-1/+4
(cherry picked from commit e09242d5b82953652b5a898257d7c8f249d34bea)
2022-10-04Add ExtraConstraintInfoJack Huey-8/+18
(cherry picked from commit f1767dbb42374646fd5331d4946dc233e68d0ed5)
2022-10-04Add outlives_constraint to BlameConstraintJack Huey-6/+7
(cherry picked from commit ec17be2656fc69e212d9079f79322a68a3cfbc19)
2022-09-16Revert "Better errors for implied static bound"Jack Huey-26/+12
This reverts commit c75817b0a75d4b6b01ee10900ba5d01d4915e6a8.
2022-09-16Revert "Use Predicate ConstraintCategory when normalizing"Jack Huey-14/+6
This reverts commit aae37f87632dd74856d55c0cd45d2c192379c990.
2022-09-13Use Predicate ConstraintCategory when normalizingJack Huey-6/+14
2022-09-13Better errors for implied static boundJack Huey-12/+26
2022-09-13Remove unused body argsJack Huey-9/+6
2022-09-13Use tcx.hir() utils for spans in MIR building.Camille GILLOT-3/+4
This corrects the `span_with_body` in the case of closures, which was incorrectly shortened to the `def_span`.
2022-09-13Only keep one version of ImplicitSelfKind.Camille GILLOT-6/+3
2022-09-10Auto merge of #98559 - jackh726:remove-reempty, r=oli-obkbors-5/+1
Remove ReEmpty r? rust-lang/types
2022-09-09Handle generic parameters.Camille GILLOT-1/+1
2022-09-08Remove ReEmptyJack Huey-5/+1
2022-09-06Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillotbors-1/+1
`BindingAnnotation` refactor * `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`) * `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)` * Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}` One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`. I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
2022-09-05Auto merge of #101261 - TaKO8Ki:separate-receiver-from-arguments-in-hir, ↵bors-12/+7
r=cjgillot Separate the receiver from arguments in HIR Related to #100232 cc `@cjgillot`
2022-09-05use `propagate_through_exprs` instead of `propagate_through_expr`Takayuki Maeda-2/+0
fix `ExprKind` static_assert_size fix hir-stats
2022-09-05Auto merge of #101228 - nnethercote:simplify-hir-PathSegment, r=petrochenkovbors-4/+5
Simplify `hir::PathSegment` r? `@petrochenkov`
2022-09-05refactor: remove unnecessary variablesTakayuki Maeda-1/+2
2022-09-05separate the receiver from arguments in HIRTakayuki Maeda-12/+8
2022-09-05Don't suggest reborrow if usage is inside a closureMichael Goulet-1/+2
2022-09-05Make `hir::PathSegment::hir_id` non-optional.Nicholas Nethercote-4/+5
2022-09-02Refactor and re-use BindingAnnotationCameron Steffen-1/+1
2022-09-01Rollup merge of #101285 - ↵Matthias Krüger-3/+11
TaKO8Ki:do-not-suggest-adding-move-when-closure-is-already-marked-as-move, r=oli-obk Do not suggest adding `move` to closure when `move` is already used Fixes #101227
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+0
by module
2022-09-01Directly use the `instrument` macro instead of its full pathOli Scherer-5/+5
2022-09-01do not suggest adding `move` to closure when `move` is already usedTakayuki Maeda-3/+11
2022-08-29Rollup merge of #101146 - jackh726:borrowck-logging, r=compiler-errorsMatthias Krüger-33/+9
Various changes to logging of borrowck-related code Cleanups found when doing other changes r? `@compiler-errors`
2022-08-29Various changes to logging of borrowck-related codeJack Huey-33/+9
2022-08-29Rollup merge of #99027 - tmiasko:basic-blocks, r=oli-obkMatthias Krüger-4/+4
Replace `Body::basic_blocks()` with field access Since the refactoring in #98930, it is possible to borrow the basic blocks independently from other parts of MIR by accessing the `basic_blocks` field directly. Replace unnecessary `Body::basic_blocks()` method with a direct field access, which has an additional benefit of borrowing the basic blocks only.
2022-08-28Rollup merge of #101002 - estebank:hashmap-idx, r=davidtwcoMatthias Krüger-3/+113
Provide structured suggestion for `hashmap[idx] = val`
2022-08-26Replace `Body::basic_blocks()` with field accessTomasz Miąsko-4/+4
2022-08-26diag-migAndyJado-52/+41
2022-08-25Provide structured suggestion for `hashmap[idx] = val`Esteban Küber-3/+113
2022-08-24Rollup merge of #100940 - ↵Matthias Krüger-0/+3
TaKO8Ki:do-not-suggest-adding-bound-to-opaque-type, r=fee1-dead Do not suggest adding a bound to a opaque type fixes #100442
2022-08-24Rollup merge of #100906 - ChayimFriedman2:map-index-mut, r=davidtwcoMatthias Krüger-2/+17
Suggest alternatives when trying to mutate a `HashMap`/`BTreeMap` via indexing The error can be quite confusing to newcomers. Fixes #100873. I'm not so sure about the message, open to wording suggestions.
2022-08-24do not suggest adding a bound to a opaque typeTakayuki Maeda-1/+5
2022-08-23Suggest alternatives when trying to mutate a `HashMap`/`BTreeMap` via indexingChayim Refael Friedman-2/+17
The error can be quite confusing to newcomers.
2022-08-22make some methods privateTakayuki Maeda-1/+2
2022-08-20Rollup merge of #100186 - compiler-errors:or-as_mut, r=fee1-deadMatthias Krüger-8/+6
Mention `as_mut` alongside `as_ref` in borrowck error message Kinda fixes #99426 but I guess that really might be better staying open to see if we could make it suggest `as_mut` in a structured way. Not sure how to change borrowck to know that info tho.
2022-08-16Make as_ref suggestion a noteMichael Goulet-8/+6
2022-08-15Fix #95079 by adding help and suggestion for missing move in nested closureYan Chen-0/+37
2022-08-14Suggest as_ref or as_mutMichael Goulet-1/+1
2022-08-14TypeError can be CopyMichael Goulet-3/+1
2022-08-10Use &mut Diagnostic instead of &mut DiagnosticBuilder unless neededMichael Goulet-8/+3
2022-08-04Rollup merge of #100095 - jackh726:early-binder, r=lcnrMatthias Krüger-16/+16
More EarlyBinder cleanups Each commit is independent r? types
2022-08-04Rollup merge of #100093 - wcampbell0x2a:unused-parens-for-match-arms, ↵Matthias Krüger-1/+1
r=petrochenkov Enable unused_parens for match arms Fixes: https://github.com/rust-lang/rust/issues/92751 Currently I can't get the `stderr` to work with `./x.py test`, but this should fix the issue. Help would be appreciated!
2022-08-04Enable unused_parens for match armswcampbell-1/+1
2022-08-03fix trailing whitespace in error messageklensy-1/+1
2022-08-02Add bound_predicates_of and bound_explicit_predicates_ofJack Huey-16/+16