about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
AgeCommit message (Collapse)AuthorLines
2023-02-16Rename some region-specific stuffMichael Goulet-127/+138
2023-02-16be nice and don't sliceMatthias Krüger-2/+2
These are already slices, no need to slice them again
2023-02-15Rollup merge of #108010 - compiler-errors:can_eq-returns-bool, r=lcnrMatthias Krüger-3/+2
Make `InferCtxt::can_eq` and `InferCtxt::can_sub` return booleans Nobody matches on the result, nor does the result return anything useful...
2023-02-15Copy `ty::AssocItem` all other the placeMaybe Waffle-54/+54
2023-02-15Auto merge of #108006 - cjgillot:def-impl, r=oli-obkbors-200/+143
Avoid accessing HIR when it can be avoided Experiment to see if it helps some incremental cases. Will be rebased once https://github.com/rust-lang/rust/pull/107942 gets merged. r? `@ghost`
2023-02-15Add specialized variants of `mk_region`.Nicholas Nethercote-58/+49
Much like there are specialized variants of `mk_ty`. This will enable some optimization in the next commit. Also rename the existing `re_error*` functions as `mk_re_error*`, for consistency.
2023-02-14Auto merge of #108056 - matthiaskrgr:rollup-oa6bxvh, r=matthiaskrgrbors-5/+7
Rollup of 9 pull requests Successful merges: - #107573 (Update the minimum external LLVM to 14) - #107626 (Fix `x fix` on the standard library itself) - #107673 (update ICU4X to 1.1.0) - #107733 (Store metrics from `metrics.json` to CI PGO timer) - #108007 (Use `is_str` instead of string kind comparison) - #108033 (add an unstable `#[rustc_coinductive]` attribute) - #108039 (Refactor refcounted structural_impls via functors) - #108040 (Use derive attributes for uninteresting traversals) - #108044 (interpret: rename Pointer::from_addr → from_addr_invalid) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-14Move query out of path.Camille GILLOT-2/+7
2023-02-14Even less HIR.Camille GILLOT-33/+28
2023-02-14Fetch less HIR in signature check.Camille GILLOT-111/+72
2023-02-14Do not fetch HIR for inherent impls.Camille GILLOT-56/+36
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-16/+18
2023-02-14add a `#[rustc_coinductive]` attributelcnr-5/+7
2023-02-14s/eval_usize/eval_target_usize/ for clarityOli Scherer-1/+1
2023-02-13Rollup merge of #107942 - compiler-errors:tighter-inherent-impl-bad-spans, ↵Matthias Krüger-16/+17
r=Nilstrieb Tighter spans for bad inherent `impl` self types Self-explanatory
2023-02-13Make can_eq and can_sub return booleansMichael Goulet-3/+2
2023-02-13Tighter spans for bad inherent impl typesMichael Goulet-16/+17
2023-02-13Rename folder traits' `tcx` method to `interner`Alan Egerton-7/+7
2023-02-13Make folding traits generic over the InternerAlan Egerton-4/+4
2023-02-13Make visiting traits generic over the InternerAlan Egerton-8/+8
2023-02-13Workaround issue #107747Alan Egerton-1/+3
Only required until fix #107803 is merged into stage0 compiler, expected when beta 1.69.0 is released on 2023-03-09, then this commit can be reverted.
2023-02-13Alias folding/visiting traits instead of re-exportAlan Egerton-12/+12
2023-02-13Reduce direct `mk_ty` usage.Nicholas Nethercote-6/+5
We use more specific `mk_*` functions in most places, might as well use them as much as possible.
2023-02-11Auto merge of #107507 - BoxyUwU:deferred_projection_equality, r=lcnrbors-0/+3
Implement `deferred_projection_equality` for erica solver Somewhat of a revival of #96912. When relating projections now emit an `AliasEq` obligation instead of attempting to determine equality of projections that may not be as normalized as possible (i.e. because of lazy norm, or just containing inference variables that prevent us from resolving an impl). Only do this when the new solver is enabled
2023-02-10add `AliasEq` to `PredicateKind`Boxy-0/+3
2023-02-09Use `ErrorGuaranteed` more in `ReError`Esteban Küber-5/+5
2023-02-09Change to `ReError(ErrorGuaranteed)`Esteban Küber-14/+6
2023-02-09review commentsEsteban Küber-1/+1
2023-02-09Introduce `ReError`Esteban Küber-11/+9
CC #69314
2023-02-09Auto merge of #106938 - GuillaumeGomez:normalize-projection-field-ty, r=oli-obkbors-1/+1
Add missing normalization for union fields types Overshadows https://github.com/rust-lang/rust/pull/106808. From the experiment https://github.com/rust-lang/rust/pull/103985. In short, it allows to use projections as a type for union's fields. cc `@compiler-errors` r? `@oli-obk`
2023-02-07Replacing bound vars is actually instantiating a binderMichael Goulet-2/+2
2023-02-06Modify existing bounds if they existEdward Shen-0/+1
2023-02-03Make const/fn return params more suggestableMichael Goulet-59/+32
2023-02-03Autotrait bounds on dyn-safe trait methodsDavid Tolnay-0/+22
2023-02-03Disallow impl autotrait for trait objectDavid Tolnay-40/+161
2023-01-31Rollup merge of #107486 - compiler-errors:bound-ty-keep-name, r=oli-obkGuillaume Gomez-1/+1
Track bound types like bound regions When we instantiate bound types into placeholder types, we throw away the names for some reason. These names are particularly useful for error reporting once we have `for<T>` binders. r? types
2023-01-31Rollup merge of #107467 - WaffleLapkin:uneq, r=oli-obkGuillaume Gomez-52/+58
Improve enum checks Some light refactoring.
2023-01-31Auto merge of #106399 - estebank:type-err-span-label, r=nagisabors-0/+1
Modify primary span label for E0308 Looking at the reactions to https://hachyderm.io/`@ekuber/109622160673605438,` a lot of people seem to have trouble understanding the current output, where the primary span label on type errors talks about the specific types that diverged, but these can be deeply nested type parameters. Because of that we could see "expected i32, found u32" in the label while the note said "expected Vec<i32>, found Vec<u32>". This understandably confuses people. I believe that once people learn to read these errors it starts to make more sense, but this PR changes the output to be more in line with what people might expect, without sacrificing terseness. Fix #68220.
2023-01-30Track bound types like bound regionsMichael Goulet-1/+1
2023-01-30review commentsEsteban Küber-4/+2
2023-01-30Modify primary span label for E0308Esteban Küber-1/+4
The previous output was unintuitive to users.
2023-01-30Rollup merge of #107125 - ↵Matthias Krüger-22/+18
WaffleLapkin:expect_an_item_in_your_hir_by_the_next_morning, r=Nilstrieb Add and use expect methods to hir. [The future has come](https://github.com/rust-lang/rust/pull/106090/files#r1070062462). r? `@Nilstrieb` tbh I'm not even sure if it's worth it
2023-01-30Replace enum `==`s with `match`es where it makes senseMaybe Waffle-52/+58
2023-01-30Use `expect_{use,fn}` in a couple of placesMaybe Waffle-2/+2
2023-01-29Auto merge of #106253 - nbdd0121:upcast, r=compiler-errorsbors-2/+2
Skip possible where_clause_object_safety lints when checking `multiple_supertrait_upcastable` Fix #106247 To achieve this, I lifted the `WhereClauseReferencesSelf` out from `object_safety_violations` and move it into `is_object_safe` (which is changed to a new query). cc `@dtolnay` r? `@compiler-errors`
2023-01-28Auto merge of #107206 - cjgillot:no-h2l-map, r=WaffleLapkinbors-38/+50
Remove HirId -> LocalDefId map from HIR. Having this map in HIR prevents the creating of new definitions after HIR has been built. Thankfully, we do not need it. Based on https://github.com/rust-lang/rust/pull/103902
2023-01-28Rename `is_object_safe` to `check_is_object_safe` to hint side effectsGary Guo-2/+2
2023-01-28Replace `object_safety_violations().is_empty()` calls with `is_object_safe`Gary Guo-1/+1
2023-01-28Remove `HirId -> LocalDefId` map from HIR.Camille GILLOT-37/+49
2023-01-28Take a LocalDefId in hir::Visitor::visit_fn.Camille GILLOT-1/+1