about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check
AgeCommit message (Collapse)AuthorLines
2023-01-31Rollup merge of #107467 - WaffleLapkin:uneq, r=oli-obkGuillaume Gomez-48/+55
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-13/+13
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-48/+55
2023-01-30Use `expect_{use,fn}` in a couple of placesMaybe Waffle-1/+1
2023-01-29Auto merge of #106253 - nbdd0121:upcast, r=compiler-errorsbors-1/+1
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-28Rename `is_object_safe` to `check_is_object_safe` to hint side effectsGary Guo-1/+1
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-10/+16
2023-01-27Compute generator saved locals on MIR.Camille GILLOT-3/+36
2023-01-26fix up subst_identity vs skip_binder; add some FIXMEs as identified in reviewKyle Matsuda-3/+3
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-16/+21
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-16/+16
2023-01-23fix: use LocalDefId instead of HirId in trait resVincenzo Palazzo-74/+84
use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-01-21Label closure captures/generator locals that make opaque types recursiveMichael Goulet-6/+53
2023-01-20Add and use expect methods to hir.Maybe Waffle-12/+12
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-174/+133
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-4/+4
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-16/+16
Remove double spaces after dots in comments Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-16/+16
2023-01-17Review suggestionsMaybe Waffle-16/+14
2023-01-17`rustc_hir_analysis`: remove `ref` patternsMaybe Waffle-39/+36
2023-01-17`rustc_hir_analysis`: some general code improvementsMaybe Waffle-88/+74
2023-01-17Don't call closures immediately, use `try{}` blocksMaybe Waffle-45/+23
2023-01-16Add missing normalization for union fields typesGuillaume Gomez-1/+1
2023-01-15Remove bound_{explicit,}_item_boundsMichael Goulet-5/+4
2023-01-15Make InstantiatedPredicates impl IntoIteratorMichael Goulet-11/+9
2023-01-15instantiate_own doesn't need to return a pair of vectorsMichael Goulet-12/+13
2023-01-14fix various subst_identity vs skip_binderKyle Matsuda-1/+1
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-6/+5
bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14change usages of impl_trait_ref to bound_impl_trait_refKyle Matsuda-7/+10
2023-01-14change const_param_default query to return EarlyBinder; remove ↵Kyle Matsuda-2/+2
bound_const_param_default query; add EarlyBinder to const_param_default in metadata
2023-01-14change usages of const_param_default query to bound_const_param_defaultKyle Matsuda-2/+2
2023-01-13Rollup merge of #106465 - compiler-errors:bump-IMPLIED_BOUNDS_ENTAILMENT, r=lcnrMatthias Krüger-12/+148
Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow https://github.com/rust-lang/rust/pull/105575#issuecomment-1357201969 > and then later in the same cycle increase the lint to `deny` and change it to `FutureCompatReportNow` in this nightly cycle. r? ```@lcnr``` when they're back from holiday :smile:
2023-01-13Add logic to make IMPLIED_BOUNDS_ENTAILMENT easier to understandMichael Goulet-12/+148
2023-01-12Only point at impl self ty in WF if trait predicate shares self tyMichael Goulet-2/+9
2023-01-12Point at impl self type for impl wf obligationsMichael Goulet-1/+1
2023-01-12Point at HIR types when impl trait ref doesn't normalizeMichael Goulet-1/+5
2023-01-11Move autoderef to rustc_hir_analysisMichael Goulet-1/+2
2023-01-10Rollup merge of #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obkYuki Okushi-18/+2
No need to take opaques in `check_type_bounds` `InferCtxt` already has its defining use anchor set to err r? ``@oli-obk``
2023-01-09Assert defining anchor is set in take_opaque_typesMichael Goulet-1/+1
2023-01-09No need to take opaques in check_type_boundsMichael Goulet-17/+1
2023-01-09Rollup merge of #106164 - compiler-errors:check-region-tweak, r=oli-obkfee1-dead-7/+10
Move `check_region_obligations_and_report_errors` to `TypeErrCtxt` Makes sense for this function to live with its sibling `resolve_regions_and_report_errors`, around which it's basically just a wrapper.
2023-01-09Auto merge of #106582 - compiler-errors:better-spans-on-bad-tys, r=lcnrbors-40/+25
Improve spans of non-WF implied bound types Fixes #60980
2023-01-08Rollup merge of #106131 - compiler-errors:not-ptrs, r=davidtwcoMichael Goulet-22/+14
Mention "signature" rather than "fn pointer" when impl/trait methods are incompatible Fixes #80929 Fixes #67296
2023-01-08Normalize assumed_wf_types after wfchecking is complete, for better spansMichael Goulet-3/+4
2023-01-08Improve spans of non-WF implied bound typesMichael Goulet-37/+21