@@ -598,9 +598,9 @@ mod collect {
598
598
if ty:: type_has_dynamic_size ( cx. tcx , tt) {
599
599
alt ty_mode {
600
600
mo_val. {
601
- cx. tcx . sess . span_fatal ( a. ty . span ,
602
- "Dynamically sized arguments \
603
- must be passed by alias") ;
601
+ cx. tcx . sess . span_err ( a. ty . span ,
602
+ "Dynamically sized arguments \
603
+ must be passed by alias") ;
604
604
}
605
605
_ { }
606
606
}
@@ -1776,7 +1776,7 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
1776
1776
let errmsg =
1777
1777
"binary operation " + binopstr +
1778
1778
" cannot be applied to type `" + t_str + "`";
1779
- fcx. ccx. tcx. sess. span_fatal ( span, errmsg) ;
1779
+ fcx. ccx. tcx. sess. span_err ( span, errmsg) ;
1780
1780
}
1781
1781
}
1782
1782
@@ -1845,18 +1845,18 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
1845
1845
ast:: not. {
1846
1846
if !type_is_integral( fcx, oper. span, oper_t) &&
1847
1847
structure_of( fcx, oper. span, oper_t) != ty:: ty_bool {
1848
- tcx. sess. span_fatal ( expr. span,
1849
- #fmt( "mismatched types: expected bool \
1850
- or integer but found %s",
1851
- ty_to_str( tcx, oper_t) ) ) ;
1848
+ tcx. sess. span_err ( expr. span,
1849
+ #fmt( "mismatched types: expected bool \
1850
+ or integer but found %s",
1851
+ ty_to_str( tcx, oper_t) ) ) ;
1852
1852
}
1853
1853
}
1854
1854
ast:: neg. {
1855
1855
oper_t = structurally_resolved_type( fcx, oper. span, oper_t) ;
1856
1856
if !( ty:: type_is_integral( tcx, oper_t) ||
1857
1857
ty:: type_is_fp( tcx, oper_t) ) {
1858
- tcx. sess. span_fatal ( expr. span, "applying unary minus to \
1859
- non-numeric type " + ty_to_str( tcx, oper_t) ) ;
1858
+ tcx. sess. span_err ( expr. span, "applying unary minus to \
1859
+ non-numeric type " + ty_to_str( tcx, oper_t) ) ;
1860
1860
}
1861
1861
}
1862
1862
}
@@ -1898,8 +1898,8 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
1898
1898
none. {
1899
1899
let nil = ty:: mk_nil( tcx) ;
1900
1900
if !are_compatible( fcx, fcx. ret_ty, nil) {
1901
- tcx. sess. span_fatal ( expr. span,
1902
- "ret; in function returning non-nil" ) ;
1901
+ tcx. sess. span_err ( expr. span,
1902
+ "ret; in function returning non-nil" ) ;
1903
1903
}
1904
1904
}
1905
1905
some( e) {
@@ -1911,14 +1911,14 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
1911
1911
ast:: expr_put( expr_opt) {
1912
1912
require_impure( tcx. sess, fcx. purity, expr. span) ;
1913
1913
if ( fcx. proto != ast:: proto_iter) {
1914
- tcx. sess. span_fatal ( expr. span, "put in non-iterator" ) ;
1914
+ tcx. sess. span_err ( expr. span, "put in non-iterator" ) ;
1915
1915
}
1916
1916
alt expr_opt {
1917
1917
none. {
1918
1918
let nil = ty:: mk_nil( tcx) ;
1919
1919
if !are_compatible( fcx, fcx. ret_ty, nil) {
1920
- tcx. sess. span_fatal ( expr. span,
1921
- "put; in iterator yielding non-nil" ) ;
1920
+ tcx. sess. span_err ( expr. span,
1921
+ "put; in iterator yielding non-nil" ) ;
1922
1922
}
1923
1923
}
1924
1924
some( e) {
@@ -2172,10 +2172,10 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
2172
2172
2173
2173
if !( type_is_scalar ( fcx, expr. span , expr_ty ( tcx, e) ) &&
2174
2174
type_is_scalar ( fcx, expr. span , t_1) ) {
2175
- tcx. sess . span_fatal ( expr. span ,
2176
- "non-scalar cast: " +
2177
- ty_to_str ( tcx, expr_ty ( tcx, e) )
2178
- + " as " + ty_to_str ( tcx, t_1) ) ;
2175
+ tcx. sess . span_err ( expr. span ,
2176
+ "non-scalar cast: " +
2177
+ ty_to_str ( tcx, expr_ty ( tcx, e) )
2178
+ + " as " + ty_to_str ( tcx, t_1) ) ;
2179
2179
}
2180
2180
write:: ty_only_fixup ( fcx, id, t_1) ;
2181
2181
}
@@ -2293,10 +2293,10 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
2293
2293
bot |= check_expr ( fcx, idx) ;
2294
2294
let idx_t = expr_ty ( tcx, idx) ;
2295
2295
if !type_is_integral ( fcx, idx. span , idx_t) {
2296
- tcx. sess . span_fatal ( idx. span ,
2297
- "mismatched types: expected \
2298
- integer but found "
2299
- + ty_to_str ( tcx, idx_t) ) ;
2296
+ tcx. sess . span_err ( idx. span ,
2297
+ "mismatched types: expected \
2298
+ integer but found "
2299
+ + ty_to_str ( tcx, idx_t) ) ;
2300
2300
}
2301
2301
alt structure_of ( fcx, expr. span , base_t) {
2302
2302
ty:: ty_vec ( mt) { write:: ty_only_fixup ( fcx, id, mt. ty ) ; }
@@ -2600,8 +2600,8 @@ fn check_fn(ccx: &@crate_ctxt, f: &ast::_fn, id: &ast::node_id,
2600
2600
// This just checks that the declared type is bool, and trusts
2601
2601
// that that's the actual return type.
2602
2602
if !ty:: type_is_bool ( ccx. tcx , fcx. ret_ty ) {
2603
- ccx. tcx . sess . span_fatal ( body. span ,
2604
- "Non-boolean return type in pred" ) ;
2603
+ ccx. tcx . sess . span_err ( body. span ,
2604
+ "Non-boolean return type in pred" ) ;
2605
2605
}
2606
2606
}
2607
2607
_ { }
0 commit comments