summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/astconv
AgeCommit message (Collapse)AuthorLines
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-20/+20
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-19Encode whether foreign opaques are TAITs or notMichael Goulet-1/+1
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-11/+11
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-11/+11
2023-01-17Self review suggestionsMaybe Waffle-3/+3
- add back accidentally removed new lines - try to deref in patterns, rather than in expressions (maybe this was the reason of perf regression?...)
2023-01-17`rustc_hir_analysis`: remove `ref` patternsMaybe Waffle-21/+21
2023-01-15Rollup merge of #106072 - eopb:dyn-derive, r=estebankMatthias Krüger-1/+7
fix: misleading "add dyn keyword before derive macro" suggestion Fixes #106071
2023-01-14fix: misleading add `dyn` to derive macro suggestionEthan Brierley-1/+7
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-3/+3
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-2/+2
2023-01-14change const_param_default query to return EarlyBinder; remove ↵Kyle Matsuda-3/+1
bound_const_param_default query; add EarlyBinder to const_param_default in metadata
2023-01-13Rollup merge of #106585 - estebank:issue-46585, r=compiler-errorsMatthias Krüger-17/+157
When suggesting writing a fully qualified path probe for appropriate types Address the more common part of #46585.
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-11Make selfless `dyn AstConv` methods into toplevel functionsMaybe Waffle-583/+568
2023-01-11Add `AstConv::astconv` method to remove `<dyn AstConv>::` callsMaybe Waffle-0/+7
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-1/+1
2023-01-09Auto merge of #101947 - aliemjay:astconv-normalize, r=lcnrbors-28/+23
Don't normalize in AstConv See individual commits. Fixes #101350 Fixes #54940
2023-01-08Auto merge of #106235 - compiler-errors:rework-bounds-collection, r=davidtwcobors-28/+65
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-07introduce AstConv::probe_adtAli MJ Al-Nasrawy-7/+15
2023-01-07don't normalize in astconvAli MJ Al-Nasrawy-25/+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-04get_parent and find_parentMichael Goulet-1/+1
2023-01-04rename get_parent_node to parent_idMichael Goulet-1/+1
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.
2022-12-28Rework hir Bounds collectionMichael Goulet-28/+65
2022-12-28Rename `Rptr` to `Ref` in AST and HIRNilstrieb-1/+1
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-25fix some typosKaDiWa-1/+1
2022-12-19Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorinobors-9/+5
Address some `EarlyBinder` nits
2022-12-18use &str / String literals instead of format!()Matthias Krüger-1/+1
2022-12-14Remove TraitRef::newOli Scherer-2/+2
2022-12-14Guard `AliasTy` creation against passing the wrong number of substsOli Scherer-1/+1
2022-12-13Combine projection and opaque into aliasMichael Goulet-1/+1
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-1/+1
2022-12-13ProjectionTy.item_def_id -> ProjectionTy.def_idMichael Goulet-5/+2
2022-12-13EarlyBinder nitsMichael Goulet-9/+5
2022-12-05normalize inherent associated types after substitutionLeón Orell Valerian Liehr-0/+1
2022-12-05Auto merge of #104920 - compiler-errors:avoid-infcx-build, r=jackh726bors-4/+1
Avoid some `InferCtxt::build` calls Either because we're inside of an `InferCtxt` already, or because we're not in a place where we'd ever see inference vars. r? types
2022-12-04Avoid InferCtxt::build in generic_arg_mismatch_errMichael Goulet-4/+1
2022-12-03Properly substitute inherent associated types.Camille GILLOT-4/+9
2022-11-28Simplify more FnCtxt normalizationMichael Goulet-1/+1
2022-11-28FnCtxt normalization stuffMichael Goulet-0/+3
2022-11-27Rollup merge of #104976 - WaffleLapkin:move_comments, r=cjgillotMatthias Krüger-2/+2
Prefer doc comments over `//`-comments in compiler Doc comments are generally nicer: they show up in the documentation, they are shown in IDEs when you hover other mentions of items, etc. Thus it makes sense to use them instead of `//`-comments.
2022-11-27Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errorsbors-5/+6
Separate lifetime ident from lifetime resolution in HIR Drive-by: change how suggested generic args are computed. Fixes https://github.com/rust-lang/rust/issues/103815 I recommend reviewing commit-by-commit.
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-2/+2
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-2/+2
2022-11-23Separate lifetime ident from resolution in HIR.Camille GILLOT-5/+6
2022-11-21Auto merge of #104673 - matthiaskrgr:rollup-85f65ov, r=matthiaskrgrbors-1/+1
Rollup of 9 pull requests Successful merges: - #104420 (Fix doc example for `wrapping_abs`) - #104499 (rustdoc JSON: Use `Function` everywhere and remove `Method`) - #104500 (`rustc_ast`: remove `ref` patterns) - #104511 (Mark functions created for `raw-dylib` on x86 with DllImport storage class) - #104595 (Add `PolyExistentialPredicate` type alias) - #104605 (deduplicate constant evaluation in cranelift backend) - #104628 (Revert "Update CI to use Android NDK r25b") - #104662 (Streamline deriving on packed structs.) - #104667 (Revert formatting changes of a test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup