Skip to content

Commit bad80fe

Browse files
nikomatsakiscsmoe
authored andcommitted
move the defaut object lifetime bound into the trait
This way, we don't have to repeat it.
1 parent 012262c commit bad80fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/traits/engine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use hir::def_id::DefId;
1515
use super::{FulfillmentContext, FulfillmentError};
1616
use super::{ObligationCause, PendingPredicateObligation, PredicateObligation};
1717

18-
pub trait TraitEngine<'tcx> {
18+
pub trait TraitEngine<'tcx>: 'tcx {
1919
fn normalize_projection_type<'a, 'gcx>(
2020
&mut self,
2121
infcx: &InferCtxt<'a, 'gcx, 'tcx>,
@@ -52,7 +52,7 @@ pub trait TraitEngine<'tcx> {
5252
fn pending_obligations(&self) -> Vec<PendingPredicateObligation<'tcx>>;
5353
}
5454

55-
impl<'a, 'gcx, 'tcx> TraitEngine<'tcx> + 'tcx {
55+
impl<'a, 'gcx, 'tcx> dyn TraitEngine<'tcx> {
5656
pub fn new(_tcx: TyCtxt<'_, '_, 'tcx>) -> Box<Self> {
5757
Box::new(FulfillmentContext::new())
5858
}

0 commit comments

Comments
 (0)