1 use rustc_middle
::ty
::TyCtxt
;
3 use super::TraitEngine
;
4 use super::{ChalkFulfillmentContext, FulfillmentContext}
;
6 pub trait TraitEngineExt
<'tcx
> {
7 fn new(tcx
: TyCtxt
<'tcx
>) -> Box
<Self>;
10 impl<'tcx
> TraitEngineExt
<'tcx
> for dyn TraitEngine
<'tcx
> {
11 fn new(tcx
: TyCtxt
<'tcx
>) -> Box
<Self> {
12 if tcx
.sess
.opts
.debugging_opts
.chalk
{
13 Box
::new(ChalkFulfillmentContext
::new())
15 Box
::new(FulfillmentContext
::new())