about summary refs log tree commit diff
path: root/compiler/rustc_middle
AgeCommit message (Collapse)AuthorLines
2023-01-15instantiate_own doesn't need to return a pair of vectorsMichael Goulet-9/+18
2023-01-15Auto merge of #106742 - compiler-errors:new-solver-make-it-not-ice, r=lcnrbors-2/+88
Implement some FIXME methods in the new trait solver Implement just enough of the solver's response logic to make it not ICE. Also, fix a bug with `no_bound_vars` call failing due to canonical bound vars. r? `@lcnr`
2023-01-15Rollup merge of #106863 - anden3:compiler-double-spaces, r=NilstriebMatthias Krüger-1/+1
Remove various double spaces in compiler source comments. Was asked to do it by `@Nilstrieb`
2023-01-14Fix some missed double spaces.André Vennberg-1/+1
2023-01-14Use associated items of `char` instead of freestanding items in `core::char`Lukas Markeffsky-1/+0
2023-01-14fix various subst_identity vs skip_binderKyle Matsuda-2/+4
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-19/+8
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/+12
2023-01-14change const_param_default query to return EarlyBinder; remove ↵Kyle Matsuda-8/+4
bound_const_param_default query; add EarlyBinder to const_param_default in metadata
2023-01-14add EarlyBinder::subst_identity; impl ParameterizedOverTcx (needed for ↵Kyle Matsuda-0/+20
rustc_metadata) and Value for EarlyBinder
2023-01-13Unify Opaque/Projection handling in region outlives codeMichael Goulet-4/+3
2023-01-13Auto merge of #106776 - oli-obk:om_nom_nom_nom_nom, r=cjgillotbors-35/+16
Feed a bunch of queries instead of tracking fields on TyCtxt r? `@cjgillot` pulled out of https://github.com/rust-lang/rust/pull/105462
2023-01-13Rollup merge of #106754 - compiler-errors:ty-infer-method-is-confusing, r=lcnrYuki Okushi-2/+2
Rename `Ty::is_ty_infer` -> `Ty::is_ty_or_numeric_infer` Makes sure people are aware that they may have a type variable *or* an int/float variable. r? `@oli-obk` https://github.com/rust-lang/rust/pull/106322#issuecomment-1376913539 but I could instead implement your solution, let me know. (This will conflict with #106322 for now, ignore that :smile:)
2023-01-13Auto merge of #106004 - fee1-dead-contrib:const-closures, r=oli-obkbors-4/+10
Const closures cc https://github.com/rust-lang/rust/issues/106003
2023-01-12is_ty_infer -> is_ty_or_numeric_inferMichael Goulet-2/+2
2023-01-12HACK: Handle escaping bound vars from the canonical queryMichael Goulet-2/+88
2023-01-12Feed the `features_query` instead of grabbing it from the session lazilyOli Scherer-2/+1
2023-01-12Remove `output_filenames` field from TyCtxt and feed the query insteadOli Scherer-8/+3
2023-01-12Remove `untracked_crate` field and instead pass it along with the resolver.Oli Scherer-8/+5
2023-01-12Feed `crate_name` queryOli Scherer-12/+5
2023-01-12Feed `resolutions` query instead of it being a thin wrapper around an ↵Oli Scherer-6/+3
untracked field
2023-01-12Auto merge of #106760 - compiler-errors:rollup-0bogyco, r=compiler-errorsbors-3/+18
Rollup of 8 pull requests Successful merges: - #103236 (doc: rewrite doc for signed int::{carrying_add,borrowing_sub}) - #103800 (Stabilize `::{core,std}::pin::pin!`) - #106097 (Migrate mir_build diagnostics 2 of 3) - #106170 (Move autoderef to `rustc_hir_analysis`) - #106323 (Stabilize f16c_target_feature) - #106360 (Tweak E0277 `&`-removal suggestions) - #106524 (Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch) - #106739 (Remove `<dyn AstConv<'tcx>>::fun(c, ...)` calls in favour of `c.astconv().fun(...)`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-11Rollup merge of #106524 - compiler-errors:constructor-note, r=cjgillotMichael Goulet-3/+11
Label `struct/enum constructor` instead of `fn item`, mention that it should be called on type mismatch Fixes #106516
2023-01-12Rollup merge of #106596 - estebank:verbose-e0271, r=compiler-errorsMatthias Krüger-3/+15
Hide more of long types in E0271 Fix #40186.
2023-01-12RPITITs are not suggestableMichael Goulet-5/+12
2023-01-12fix fmt and blessDeadbeef-1/+3
2023-01-12attempt to make a minimal example workDeadbeef-4/+8
2023-01-11Migrate deconstruct_pat.rsmejrs-0/+7
2023-01-11Hide more of long types in E0271Esteban Küber-3/+15
Fix #40186.
2023-01-11Reuse ErrorGuaranteed during relationMichael Goulet-2/+4
2023-01-11Be more specific about constructor `FnDef`s in type mismatchMichael Goulet-3/+11
2023-01-11Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errorsnils-6/+41
Polymorphization cleanup Split out of #106233 Use a newtype instead of a bitset directly. This makes the code way easier to read and easier to adapt for future changes.
2023-01-11Do not filter substs in `remap_generic_params_to_declaration_params`.Camille GILLOT-26/+1
The relevant filtering should have been performed by borrowck.
2023-01-11Rollup merge of #106669 - ozkanonur:helper-function-for-lint-level, r=NilstriebYuki Okushi-10/+1
create helper function for `rustc_lint_defs::Level` and remove it's duplicated code Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-01-10create helper function for `rustc_lint_defs::Level` and remove it's ↵ozkanonur-10/+1
duplicated code r=ozkanonur Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-01-09Auto merge of #106637 - fee1-dead-contrib:rollup-ticvmsd, r=fee1-deadbors-4/+2
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-09Use newtype for unused generic parametersNilstrieb-6/+41
2023-01-09Rollup merge of #106389 - compiler-errors:no-canonicalized, r=lcnrfee1-dead-4/+2
Simplify some canonical type alias names * delete the `Canonicalized<'tcx>` type alias in favor for `Canonical<'tcx>` * `CanonicalizedQueryResponse` -> `CanonicalQueryResponse` I don't particularly care about the latter, but it should be consistent. We could alternatively delete the first alias and rename the struct to `Canonicalized`, and then keep the name of `CanonicalizedQueryResponse` untouched.
2023-01-09Auto merge of #101947 - aliemjay:astconv-normalize, r=lcnrbors-8/+5
Don't normalize in AstConv See individual commits. Fixes #101350 Fixes #54940
2023-01-08Add type flags support for Ty and Const late-bound regionsMichael Goulet-3/+23
2023-01-07make ascribe_user_type a TypeOpAli MJ Al-Nasrawy-8/+5
Projection types in user annotations may contain inference variables. This makes the normalization depend on the unification with the actual type and thus requires a separate TypeOp to track the obligations. Otherwise simply calling `TypeChecker::normalize` would ICE with "unexpected ambiguity"
2023-01-06Rollup merge of #106287 - Nilstrieb:its-bugging-me-how-we-dont-have-docs, ↵Matthias Krüger-2/+19
r=jyn514 Add some docs to `bug`, `span_bug` and `delay_span_bug` cc `@mejrs` as you wanted me to do this, does this look good and understandable?
2023-01-04Rollup merge of #106403 - compiler-errors:rename-hir-methods, r=cjgillotMichael Goulet-18/+26
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-04review comment: Deduplicate dyn ty_and_layout_field codeMichael Goulet-36/+19
2023-01-04Mirror metadata changes in layout sanity checkMichael Goulet-7/+45
2023-01-04get_parent and find_parentMichael Goulet-6/+14
2023-01-04rename find_parent_node to opt_parent_idMichael Goulet-3/+3
2023-01-04rename get_parent_node to parent_idMichael Goulet-15/+15
2023-01-03Rollup merge of #105681 - tshepang:doc-mir-visit, r=NilstriebMatthias Krüger-4/+4
some fixes/improvements to mir::visit module
2023-01-03Simplify some canonical type alias namesMichael Goulet-4/+2