about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
AgeCommit message (Collapse)AuthorLines
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-13Rollup merge of #106785 - compiler-errors:better-impl-wf-spans, r=estebankYuki Okushi-19/+42
Make blame spans better for impl wfcheck r? types
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-13Rollup merge of #106759 - compiler-errors:revert-105255, r=cjgillotYuki Okushi-1/+15
Revert "Make nested RPITIT inherit the parent opaque's generics." This reverts commit e2d41f4c974f0cc09e5aafb02883f222487610f9, and adjusts the `tests/ui/async-await/in-trait/nested-rpit.rs` test. r? `@cjgillot` fixes #106332, manually verified because it had no minimization :/ reopens #105197 cc #106729
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-18/+34
2023-01-11Rollup merge of #106739 - WaffleLapkin:astconv, r=estebankMichael Goulet-636/+598
Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)` This removes the need for <>><><><<>> dances and makes the code a bit nicer. Not sure if `astconv` is the best name though, maybe someone has a better idea?
2023-01-12Revert "Make nested RPITIT inherit the parent opaque's generics." and adjust ↵Michael Goulet-1/+15
test This reverts commit e2d41f4c974f0cc09e5aafb02883f222487610f9.
2023-01-11review comments: account for genericsEsteban Küber-2/+6
2023-01-11review commentsEsteban Küber-11/+4
2023-01-11When suggesting writing a fully qualified path probe for appropriate typesEsteban Küber-17/+160
Fix #46585.
2023-01-11Move autoderef to rustc_hir_analysisMichael Goulet-1/+239
2023-01-11Make selfless `dyn AstConv` methods into toplevel functionsMaybe Waffle-583/+568
2023-01-11Add `AstConv::astconv` method to remove `<dyn AstConv>::` callsMaybe Waffle-53/+30
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-1/+1
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-09Auto merge of #106637 - fee1-dead-contrib:rollup-ticvmsd, r=fee1-deadbors-10/+16
Rollup of 10 pull requests Successful merges: - #105292 (Change a commit_if_ok call to probe) - #105655 (Remove invalid case for mutable borrow suggestion) - #106047 (Fix ui constant tests for big-endian platforms) - #106061 (Enable Shadow Call Stack for Fuchsia on AArch64) - #106164 (Move `check_region_obligations_and_report_errors` to `TypeErrCtxt`) - #106291 (Fix incorrect suggestion for extra `&` in pattern) - #106389 (Simplify some canonical type alias names) - #106468 (Use FxIndexSet when updating obligation causes in `adjust_fulfillment_errors_for_expr_obligation`) - #106549 (Use fmt named parameters in rustc_borrowck) - #106614 (error-code docs improvements (No. 2)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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-10/+16
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 #101947 - aliemjay:astconv-normalize, r=lcnrbors-31/+26
Don't normalize in AstConv See individual commits. Fixes #101350 Fixes #54940
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
2023-01-08Auto merge of #106235 - compiler-errors:rework-bounds-collection, r=davidtwcobors-94/+111
Rework `Bounds` collection I think it's weird for the `Bounds` struct in astconv to store its predicates *almost* converted into real predicates... so we do this eagerly, instead of lazily.
2023-01-08Mention signature rather than fn pointers when comparing impl/trait methodsMichael Goulet-22/+14
2023-01-08Add type flags support for Ty and Const late-bound regionsMichael Goulet-1/+1
2023-01-07introduce AstConv::probe_adtAli MJ Al-Nasrawy-7/+20
2023-01-07don't normalize in astconvAli MJ Al-Nasrawy-30/+12
We delay projection normalization to further stages in order to register user type annotations before normalization in HIR typeck. There are two consumers of astconv: ItemCtxt and FnCtxt. The former already expects unnormalized types from astconv, see its AstConv trait impl. The latter needs `RawTy` for a cleaner interface. Unfortunately astconv still needs the normalization machinery in order to resolve enum variants that have projections in the self type, e.g. `<<T as Trait>::Assoc>::StructVariant {}`. This is why `AstConv::normalize_ty_2` is necessary.
2023-01-07Auto merge of #106283 - JulianKnodt:enum_err, r=cjgillotbors-10/+19
Add help diag. for `const = Enum` missing braces around `Enum` Previously it was not clear why this errored or if it was even supported, as there was no diagnostic that suggested wrapping it in braces. Thus, add a simple diagnostic that suggests wrapping enum variants in braces. Fixes #105927
2023-01-06Rollup merge of #106533 - ↵Michael Goulet-6/+14
TaKO8Ki:use-smaller-span-for-missing-lifetime/generic-args, r=compiler-errors Use smaller spans for missing lifetime/generic args We can remove ident from suggestions.
2023-01-06use smaller spans for missing lifetime/generic argsTakayuki Maeda-6/+14
fix rustdoc ui test
2023-01-05Correct detection of elided lifetimes in impl-trait.Camille GILLOT-2/+4
2023-01-04Rollup merge of #106403 - compiler-errors:rename-hir-methods, r=cjgillotMichael Goulet-12/+12
Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent` The `hir::Map::get_parent_node` function doesn't return a `Node`, and I think that's quite confusing. Let's rename it to something that sounds more like something that gets the parent hir id => `hir::Map::parent_id`. Same with `find_parent_node` => `opt_parent_id`. Also, combine `hir.get(hir.parent_id(hir_id))` and similar `hir.find(hir.parent_id(hir_id))` function into new functions that actually retrieve the parent node in one call. This last commit is the only one that might need to be looked at closely.
2023-01-04Rollup merge of #106200 - compiler-errors:suggest-impl-trait, r=estebankMatthias Krüger-50/+97
Suggest `impl Fn*` and `impl Future` in `-> _` return suggestions Follow-up to #106172, only the last commit is relevant. Can rebase once that PR is landed for easier review. Suggests `impl Future` and `impl Fn{,Mut,Once}` in `-> _` return suggestions. r? `@estebank`
2023-01-03Rollup merge of #106353 - lukas-code:reduce-red-lines-in-my-ide, r=wesleywiserMichael Goulet-3/+3
Reduce spans for `unsafe impl` errors Because huge spans aren't great for IDEs. Prior art: https://github.com/rust-lang/rust/pull/103749
2023-01-04get_parent and find_parentMichael Goulet-7/+7
2023-01-04rename find_parent_node to opt_parent_idMichael Goulet-1/+1
2023-01-04rename get_parent_node to parent_idMichael Goulet-11/+11
2023-01-04Restore Fn trait noteMichael Goulet-3/+3
2023-01-03Move check_region_obligations_and_report_errors to TypeErrCtxtMichael Goulet-10/+16
2023-01-03Suggest more impl Trait on `-> _`Michael Goulet-47/+94
2023-01-03Add note about wrapping in braceskadmin-10/+19
Previously it was not clear why this errored or if it was even supported, as there was no diagnostic that suggested wrapping it in braces. Thus, add a simple diagnostic that suggests wrapping enum variants in braces.
2023-01-01Implement fix for #67535Troy Neubauer-3/+11
2023-01-01reduce spans for `unsafe impl` errorsLukas Markeffsky-3/+3
2022-12-29Rollup merge of #106221 - Nilstrieb:rptr-more-like-ref-actually, ↵Matthias Krüger-4/+4
r=compiler-errors Rename `Rptr` to `Ref` in AST and HIR The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-28Rework hir Bounds collectionMichael Goulet-94/+111
2022-12-28Rename `Rptr` to `Ref` in AST and HIRNilstrieb-4/+4
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.