diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-03-22 12:21:38 -0400 |
|---|---|---|
| committer | csmoe <35686186+csmoe@users.noreply.github.com> | 2018-03-23 09:22:07 +0800 |
| commit | bad80fe4ba4420bf58b7e11929ef40f458845037 (patch) | |
| tree | b3e8de5cd98ebb8258f2a272b41b489935684f65 | |
| parent | 012262c4f21cd542cd3d550a6defc2c7e2132848 (diff) | |
| download | rust-bad80fe4ba4420bf58b7e11929ef40f458845037.tar.gz rust-bad80fe4ba4420bf58b7e11929ef40f458845037.zip | |
move the defaut object lifetime bound into the trait
This way, we don't have to repeat it.
| -rw-r--r-- | src/librustc/traits/engine.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/traits/engine.rs b/src/librustc/traits/engine.rs index c2d7a0cdd28..8eee6f35ab9 100644 --- a/src/librustc/traits/engine.rs +++ b/src/librustc/traits/engine.rs @@ -15,7 +15,7 @@ use hir::def_id::DefId; use super::{FulfillmentContext, FulfillmentError}; use super::{ObligationCause, PendingPredicateObligation, PredicateObligation}; -pub trait TraitEngine<'tcx> { +pub trait TraitEngine<'tcx>: 'tcx { fn normalize_projection_type<'a, 'gcx>( &mut self, infcx: &InferCtxt<'a, 'gcx, 'tcx>, @@ -52,7 +52,7 @@ pub trait TraitEngine<'tcx> { fn pending_obligations(&self) -> Vec<PendingPredicateObligation<'tcx>>; } -impl<'a, 'gcx, 'tcx> TraitEngine<'tcx> + 'tcx { +impl<'a, 'gcx, 'tcx> dyn TraitEngine<'tcx> { pub fn new(_tcx: TyCtxt<'_, '_, 'tcx>) -> Box<Self> { Box::new(FulfillmentContext::new()) } |
