We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f7d817 commit fac9722Copy full SHA for fac9722
compiler/rustc_middle/src/ty/context.rs
@@ -2817,6 +2817,7 @@ impl<'tcx> TyCtxt<'tcx> {
2817
self.mk_substs(iter::once(self_ty.into()).chain(rest))
2818
}
2819
2820
+ #[inline(always)]
2821
pub fn mk_trait_ref(
2822
self,
2823
trait_def_id: DefId,
compiler/rustc_middle/src/ty/sty.rs
@@ -807,10 +807,12 @@ pub struct TraitRef<'tcx> {
807
808
809
impl<'tcx> TraitRef<'tcx> {
810
811
pub fn new(def_id: DefId, substs: SubstsRef<'tcx>) -> TraitRef<'tcx> {
812
TraitRef { def_id, substs }
813
814
815
816
pub fn with_self_type(self, tcx: TyCtxt<'tcx>, self_ty: Ty<'tcx>) -> Self {
817
tcx.mk_trait_ref(
818
self.def_id,
0 commit comments