1
Fork 0

Rollup merge of #134875 - compiler-errors:const-destruct-old-solver, r=lcnr

Implement `const Destruct` in old solver

Self-explanatory. Not totally settled that this is the best structure for built-in trait impls for effect goals in the new solver, but it's almost certainly the simplest.

r? lcnr or re-roll
This commit is contained in:
Matthias Krüger 2025-01-09 06:02:41 +01:00 committed by GitHub
commit bbf6363edf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 222 additions and 133 deletions

View file

@ -1417,8 +1417,8 @@ impl Hash for FieldDef {
impl<'tcx> FieldDef {
/// Returns the type of this field. The resulting type is not normalized. The `arg` is
/// typically obtained via the second field of [`TyKind::Adt`].
pub fn ty(&self, tcx: TyCtxt<'tcx>, arg: GenericArgsRef<'tcx>) -> Ty<'tcx> {
tcx.type_of(self.did).instantiate(tcx, arg)
pub fn ty(&self, tcx: TyCtxt<'tcx>, args: GenericArgsRef<'tcx>) -> Ty<'tcx> {
tcx.type_of(self.did).instantiate(tcx, args)
}
/// Computes the `Ident` of this variant by looking up the `Span`