@@ -24,15 +24,16 @@ pub(super) fn instantiate_constituent_tys_for_auto_trait<'tcx>(
2424 | ty:: Never
2525 | ty:: Char => Ok ( vec ! [ ] ) ,
2626
27- ty:: Placeholder ( ..)
28- | ty:: Dynamic ( ..)
27+ ty:: Dynamic ( ..)
2928 | ty:: Param ( ..)
3029 | ty:: Foreign ( ..)
3130 | ty:: Alias ( ty:: Projection , ..)
32- | ty:: Bound ( ..)
33- | ty:: Infer ( ty:: TyVar ( _) ) => Err ( NoSolution ) ,
31+ | ty:: Placeholder ( ..) => Err ( NoSolution ) ,
3432
35- ty:: Infer ( ty:: FreshTy ( _) | ty:: FreshIntTy ( _) | ty:: FreshFloatTy ( _) ) => bug ! ( ) ,
33+ ty:: Bound ( ..)
34+ | ty:: Infer ( ty:: TyVar ( _) | ty:: FreshTy ( _) | ty:: FreshIntTy ( _) | ty:: FreshFloatTy ( _) ) => {
35+ bug ! ( "unexpected type `{ty}`" )
36+ }
3637
3738 ty:: RawPtr ( ty:: TypeAndMut { ty : element_ty, .. } ) | ty:: Ref ( _, element_ty, _) => {
3839 Ok ( vec ! [ element_ty] )
@@ -99,11 +100,12 @@ pub(super) fn instantiate_constituent_tys_for_sized_trait<'tcx>(
99100 | ty:: Foreign ( ..)
100101 | ty:: Alias ( ..)
101102 | ty:: Param ( _)
102- | ty:: Infer ( ty :: TyVar ( _ ) ) => Err ( NoSolution ) ,
103+ | ty:: Placeholder ( .. ) => Err ( NoSolution ) ,
103104
104- ty:: Placeholder ( ..)
105- | ty:: Bound ( ..)
106- | ty:: Infer ( ty:: FreshTy ( _) | ty:: FreshIntTy ( _) | ty:: FreshFloatTy ( _) ) => bug ! ( ) ,
105+ ty:: Bound ( ..)
106+ | ty:: Infer ( ty:: TyVar ( _) | ty:: FreshTy ( _) | ty:: FreshIntTy ( _) | ty:: FreshFloatTy ( _) ) => {
107+ bug ! ( "unexpected type `{ty}`" )
108+ }
107109
108110 ty:: Tuple ( tys) => Ok ( tys. to_vec ( ) ) ,
109111
@@ -148,11 +150,12 @@ pub(super) fn instantiate_constituent_tys_for_copy_clone_trait<'tcx>(
148150 | ty:: Adt ( _, _)
149151 | ty:: Alias ( _, _)
150152 | ty:: Param ( _)
151- | ty:: Infer ( ty :: TyVar ( _ ) ) => Err ( NoSolution ) ,
153+ | ty:: Placeholder ( .. ) => Err ( NoSolution ) ,
152154
153- ty:: Placeholder ( ..)
154- | ty:: Bound ( ..)
155- | ty:: Infer ( ty:: FreshTy ( _) | ty:: FreshIntTy ( _) | ty:: FreshFloatTy ( _) ) => bug ! ( ) ,
155+ ty:: Bound ( ..)
156+ | ty:: Infer ( ty:: TyVar ( _) | ty:: FreshTy ( _) | ty:: FreshIntTy ( _) | ty:: FreshFloatTy ( _) ) => {
157+ bug ! ( "unexpected type `{ty}`" )
158+ }
156159
157160 ty:: Tuple ( tys) => Ok ( tys. to_vec ( ) ) ,
158161
@@ -215,9 +218,13 @@ pub(crate) fn extract_tupled_inputs_and_output_from_callable<'tcx>(
215218 | ty:: Tuple ( _)
216219 | ty:: Alias ( _, _)
217220 | ty:: Param ( _)
218- | ty:: Placeholder ( _)
219- | ty:: Bound ( _, _)
220- | ty:: Infer ( _)
221+ | ty:: Placeholder ( ..)
222+ | ty:: Infer ( ty:: IntVar ( _) | ty:: FloatVar ( _) )
221223 | ty:: Error ( _) => Err ( NoSolution ) ,
224+
225+ ty:: Bound ( ..)
226+ | ty:: Infer ( ty:: TyVar ( _) | ty:: FreshTy ( _) | ty:: FreshIntTy ( _) | ty:: FreshFloatTy ( _) ) => {
227+ bug ! ( "unexpected type `{self_ty}`" )
228+ }
222229 }
223230}
0 commit comments