File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ use metadata::csearch;
4646use middle;
4747use middle:: cast;
4848use middle:: check_const;
49- use middle:: const_eval:: { self , ConstVal } ;
49+ use middle:: const_eval:: { self , ConstVal , ErrKind } ;
5050use middle:: def:: { self , DefMap , ExportMap } ;
5151use middle:: dependency_format;
5252use middle:: fast_reject;
@@ -6182,11 +6182,13 @@ impl<'tcx> ctxt<'tcx> {
61826182 ..
61836183 } ) if segments. len ( ) == 1 =>
61846184 format ! ( "found variable" ) ,
6185- _ => format ! ( "{}" , err. description( ) ) ,
6185+ _ => match err. kind {
6186+ ErrKind :: MiscCatchAll => format ! ( "but found {}" , err. description( ) ) ,
6187+ _ => format ! ( "but {}" , err. description( ) )
6188+ }
61866189 } ;
61876190 span_err ! ( self . sess, count_expr. span, E0307 ,
6188- "{}, expected constant integer for repeat count" ,
6189- err_msg) ;
6191+ "expected constant integer for repeat count, {}" , err_msg) ;
61906192 }
61916193 }
61926194 0
You can’t perform that action at this time.
0 commit comments