about summary refs log tree commit diff
path: root/compiler/rustc_borrowck
AgeCommit message (Collapse)AuthorLines
2022-09-16Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, ↵Oli Scherer-2/+38
r=estebank"" This reverts commit 4a742a691e7dd2522bad68b86fe2fd5a199d5561.
2022-09-16remap ParamEnv with obligationDeadbeef-1/+0
2022-09-16unconditionally remap to nonconst in borrowckDeadbeef-18/+6
2022-09-16do const trait method bounds check later in rustc_const_evalDeadbeef-0/+19
2022-09-15nitsb-naber-5/+6
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-09-14Auto merge of #101212 - eholk:dyn-star, r=compiler-errorsbors-2/+33
Initial implementation of dyn* This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things: * Introduce `dyn_star` feature flag * Adds parsing for `dyn* Trait` types * Defines `dyn* Trait` as a sized type * Adds support for explicit casts, like `42usize as dyn* Debug` * Including const evaluation of such casts * Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope * Adds codegen for method calls, at least for methods that take `&self` Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits. Joint work with `@nikomatsakis` and `@compiler-errors.` r? `@bjorn3`
2022-09-14address review againb-naber-24/+21
2022-09-13Use Predicate ConstraintCategory when normalizingJack Huey-14/+37
2022-09-13Better errors for implied static boundJack Huey-34/+90
2022-09-13Cleanup retrieve_closure_constraint_infoJack Huey-42/+30
2022-09-13Remove unused body argsJack Huey-31/+10
2022-09-13Use def_span for external requirements.Camille GILLOT-2/+3
2022-09-13Use tcx.hir() utils for spans in MIR building.Camille GILLOT-3/+4
This corrects the `span_with_body` in the case of closures, which was incorrectly shortened to the `def_span`.
2022-09-13Only keep one version of ImplicitSelfKind.Camille GILLOT-6/+3
2022-09-13address reviewb-naber-1/+1
2022-09-13remove visit_const from mir visitorsb-naber-4/+0
2022-09-13renumber regions in mir constants correctlyb-naber-2/+32
2022-09-13use ty::Unevaluated<'tcx, ()> in type systemb-naber-2/+6
2022-09-12Rename some variantsMichael Goulet-5/+3
2022-09-12dyn* through more typechecking and MIREric Holk-2/+35
2022-09-11Avoid `Iterator::last`KaDiWa-2/+1
2022-09-10Auto merge of #98559 - jackh726:remove-reempty, r=oli-obkbors-54/+16
Remove ReEmpty r? rust-lang/types
2022-09-09Handle generic parameters.Camille GILLOT-1/+1
2022-09-08Remove ReEmptyJack Huey-32/+4
2022-09-08In ReverseMapper, don't fallback to ReEmpty, instead ReStaticJack Huey-21/+11
2022-09-08Create VarValue::EmptyJack Huey-1/+1
2022-09-08Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, r=oli-obkDylan DPC-1/+0
Remove unnecessary `PartialOrd` and `Ord`
2022-09-08remove unnecessary `PartialOrd` and `Ord`Takayuki Maeda-1/+0
2022-09-06Check all operands, they may contain indirections in their placeOli Scherer-3/+2
2022-09-06Generalize the Assume intrinsic statement to a general Intrinsic statementOli Scherer-22/+20
2022-09-06Lower the assume intrinsic to a MIR statementOli Scherer-16/+24
2022-09-06Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillotbors-1/+1
`BindingAnnotation` refactor * `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`) * `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)` * Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}` One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`. I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
2022-09-05Auto merge of #101261 - TaKO8Ki:separate-receiver-from-arguments-in-hir, ↵bors-12/+7
r=cjgillot Separate the receiver from arguments in HIR Related to #100232 cc `@cjgillot`
2022-09-05use `propagate_through_exprs` instead of `propagate_through_expr`Takayuki Maeda-2/+0
fix `ExprKind` static_assert_size fix hir-stats
2022-09-05Auto merge of #101228 - nnethercote:simplify-hir-PathSegment, r=petrochenkovbors-4/+5
Simplify `hir::PathSegment` r? `@petrochenkov`
2022-09-05refactor: remove unnecessary variablesTakayuki Maeda-1/+2
2022-09-05separate the receiver from arguments in HIRTakayuki Maeda-12/+8
2022-09-05Look at move place's type when suggesting mutable reborrowMichael Goulet-6/+6
2022-09-05Don't suggest reborrow if usage is inside a closureMichael Goulet-1/+2
2022-09-05Make `hir::PathSegment::hir_id` non-optional.Nicholas Nethercote-4/+5
2022-09-02Refactor and re-use BindingAnnotationCameron Steffen-1/+1
2022-09-01Rollup merge of #101285 - ↵Matthias Krüger-3/+11
TaKO8Ki:do-not-suggest-adding-move-when-closure-is-already-marked-as-move, r=oli-obk Do not suggest adding `move` to closure when `move` is already used Fixes #101227
2022-09-01tracing::instrument cleanupOli Scherer-20/+13
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+0
by module
2022-09-01Directly use the `instrument` macro instead of its full pathOli Scherer-5/+5
2022-09-01do not suggest adding `move` to closure when `move` is already usedTakayuki Maeda-3/+11
2022-08-30Auto merge of #100812 - Nilstrieb:revert-let-chains-nightly, r=Mark-Simulacrumbors-0/+1
Revert let_chains stabilization This is the revert against master, the beta revert was already done in #100538. Bumps the stage0 compiler which already has it reverted.
2022-08-29Rollup merge of #101146 - jackh726:borrowck-logging, r=compiler-errorsMatthias Krüger-67/+29
Various changes to logging of borrowck-related code Cleanups found when doing other changes r? `@compiler-errors`
2022-08-29Revert let_chains stabilizationNilstrieb-0/+1
This reverts commit 326646074940222d602f3683d0559088690830f4. This is the revert against master, the beta revert was already done in #100538.