@@ -688,7 +688,7 @@ fn ast_path_to_trait_ref<'a,'tcx>(
688
688
-> Rc < ty:: TraitRef < ' tcx > >
689
689
{
690
690
debug ! ( "ast_path_to_trait_ref {:?}" , trait_segment) ;
691
- let trait_def = match this. get_trait_def ( path . span , trait_def_id) {
691
+ let trait_def = match this. get_trait_def ( span, trait_def_id) {
692
692
Ok ( trait_def) => trait_def,
693
693
Err ( ErrorReported ) => {
694
694
// No convenient way to recover from a cycle here. Just bail. Sorry!
@@ -873,17 +873,19 @@ fn ast_path_to_ty<'tcx>(
873
873
-> Ty < ' tcx >
874
874
{
875
875
let tcx = this. tcx ( ) ;
876
- let substs = match this. get_item_type_scheme ( path . span , did) {
876
+ let ( generics , decl_ty ) = match this. get_item_type_scheme ( span, did) {
877
877
Ok ( ty:: TypeScheme { generics, ty : decl_ty } ) => {
878
- ast_path_substs_for_ty ( this, rscope,
879
- span, param_mode,
880
- & generics, item_segment)
878
+ ( generics, decl_ty)
881
879
}
882
880
Err ( ErrorReported ) => {
883
- return TypeAndSubsts { substs : Substs :: empty ( ) , ty : tcx. types . err } ;
881
+ return tcx. types . err ;
884
882
}
885
883
} ;
886
884
885
+ let substs = ast_path_substs_for_ty ( this, rscope,
886
+ span, param_mode,
887
+ & generics, item_segment) ;
888
+
887
889
// FIXME(#12938): This is a hack until we have full support for DST.
888
890
if Some ( did) == this. tcx ( ) . lang_items . owned_box ( ) {
889
891
assert_eq ! ( substs. types. len( TypeSpace ) , 1 ) ;
@@ -1020,7 +1022,7 @@ fn associated_path_def_to_ty<'tcx>(this: &AstConv<'tcx>,
1020
1022
1021
1023
// FIXME(#20300) -- search where clauses, not bounds
1022
1024
let bounds =
1023
- this. get_type_parameter_bounds ( ast_ty . span , ty_param_ndoe_id )
1025
+ this. get_type_parameter_bounds ( span, ty_param_node_id )
1024
1026
. unwrap_or ( Vec :: new ( ) ) ;
1025
1027
1026
1028
let mut suitable_bounds: Vec < _ > =
0 commit comments