Use extension trait derive

This commit is contained in:
Michael Goulet
2024-02-13 23:49:39 +00:00
parent 3250e95305
commit 9c25823bb4
29 changed files with 121 additions and 974 deletions

View File

@@ -5,15 +5,8 @@ use rustc_middle::ty::{self, Ty};
use crate::traits::{NormalizeExt, Obligation};
pub trait StructurallyNormalizeExt<'tcx> {
fn structurally_normalize(
&self,
ty: Ty<'tcx>,
fulfill_cx: &mut dyn TraitEngine<'tcx>,
) -> Result<Ty<'tcx>, Vec<FulfillmentError<'tcx>>>;
}
impl<'tcx> StructurallyNormalizeExt<'tcx> for At<'_, 'tcx> {
#[extension]
pub impl<'tcx> StructurallyNormalizeExt<'tcx> for At<'_, 'tcx> {
fn structurally_normalize(
&self,
ty: Ty<'tcx>,