@@ -17,7 +17,6 @@ use rustc::ty::subst::{Kind, Subst, UserSubsts, UserSelfTy};
1717use rustc:: ty:: {
1818 FnSig , Lift , ParamEnv , ParamEnvAnd , PolyFnSig , Predicate , Ty , TyCtxt , TypeFoldable , Variance ,
1919} ;
20- use rustc_data_structures:: sync:: Lrc ;
2120use std:: fmt;
2221use syntax_pos:: DUMMY_SP ;
2322
@@ -38,7 +37,7 @@ crate fn provide(p: &mut Providers<'_>) {
3837fn type_op_ascribe_user_type < ' tcx > (
3938 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
4039 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , AscribeUserType < ' tcx > > > ,
41- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > > , NoSolution > {
40+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > , NoSolution > {
4241 tcx. infer_ctxt ( )
4342 . enter_canonical_trait_query ( & canonicalized, |infcx, fulfill_cx, key| {
4443 let (
@@ -170,7 +169,7 @@ impl AscribeUserTypeCx<'me, 'gcx, 'tcx> {
170169fn type_op_eq < ' tcx > (
171170 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
172171 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Eq < ' tcx > > > ,
173- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > > , NoSolution > {
172+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > , NoSolution > {
174173 tcx. infer_ctxt ( )
175174 . enter_canonical_trait_query ( & canonicalized, |infcx, fulfill_cx, key| {
176175 let ( param_env, Eq { a, b } ) = key. into_parts ( ) ;
@@ -200,39 +199,39 @@ where
200199fn type_op_normalize_ty (
201200 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
202201 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < Ty < ' tcx > > > > ,
203- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , Ty < ' tcx > > > > , NoSolution > {
202+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , Ty < ' tcx > > > , NoSolution > {
204203 tcx. infer_ctxt ( )
205204 . enter_canonical_trait_query ( & canonicalized, type_op_normalize)
206205}
207206
208207fn type_op_normalize_predicate (
209208 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
210209 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < Predicate < ' tcx > > > > ,
211- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , Predicate < ' tcx > > > > , NoSolution > {
210+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , Predicate < ' tcx > > > , NoSolution > {
212211 tcx. infer_ctxt ( )
213212 . enter_canonical_trait_query ( & canonicalized, type_op_normalize)
214213}
215214
216215fn type_op_normalize_fn_sig (
217216 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
218217 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < FnSig < ' tcx > > > > ,
219- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , FnSig < ' tcx > > > > , NoSolution > {
218+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , FnSig < ' tcx > > > , NoSolution > {
220219 tcx. infer_ctxt ( )
221220 . enter_canonical_trait_query ( & canonicalized, type_op_normalize)
222221}
223222
224223fn type_op_normalize_poly_fn_sig (
225224 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
226225 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Normalize < PolyFnSig < ' tcx > > > > ,
227- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , PolyFnSig < ' tcx > > > > , NoSolution > {
226+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , PolyFnSig < ' tcx > > > , NoSolution > {
228227 tcx. infer_ctxt ( )
229228 . enter_canonical_trait_query ( & canonicalized, type_op_normalize)
230229}
231230
232231fn type_op_subtype < ' tcx > (
233232 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
234233 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , Subtype < ' tcx > > > ,
235- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > > , NoSolution > {
234+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > , NoSolution > {
236235 tcx. infer_ctxt ( )
237236 . enter_canonical_trait_query ( & canonicalized, |infcx, fulfill_cx, key| {
238237 let ( param_env, Subtype { sub, sup } ) = key. into_parts ( ) ;
@@ -246,7 +245,7 @@ fn type_op_subtype<'tcx>(
246245fn type_op_prove_predicate < ' tcx > (
247246 tcx : TyCtxt < ' _ , ' tcx , ' tcx > ,
248247 canonicalized : Canonical < ' tcx , ParamEnvAnd < ' tcx , ProvePredicate < ' tcx > > > ,
249- ) -> Result < Lrc < Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > > , NoSolution > {
248+ ) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , ( ) > > , NoSolution > {
250249 tcx. infer_ctxt ( )
251250 . enter_canonical_trait_query ( & canonicalized, |infcx, fulfill_cx, key| {
252251 let ( param_env, ProvePredicate { predicate } ) = key. into_parts ( ) ;
0 commit comments