Skip to content

Commit 61ab2ea

Browse files
committed
response for review comments
1 parent 1ee345a commit 61ab2ea

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

src/librustc/middle/trans/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -720,12 +720,12 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
720720
}
721721

722722
pub fn max_obj_size(&self) -> u64 {
723-
1<<31 /* FIXME: select based on architecture */
723+
1<<31 /* FIXME #18069: select based on architecture */
724724
}
725725

726726
pub fn report_overbig_object(&self, obj: ty::t) -> ! {
727727
self.sess().fatal(
728-
format!("Objects of type `{}` are too big for the current ABI",
728+
format!("the type `{}` is too big for the current architecture",
729729
obj.repr(self.tcx())).as_slice())
730730
}
731731
}

src/librustc/middle/trans/controlflow.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ pub fn trans_fail<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
499499
let loc = bcx.sess().codemap().lookup_char_pos(sp.lo);
500500
let filename = token::intern_and_get_ident(loc.file.name.as_slice());
501501
let filename = C_str_slice(ccx, filename);
502-
let line = C_int(ccx, loc.line as i64);
502+
let line = C_uint(ccx, loc.line);
503503
let expr_file_line_const = C_struct(ccx, &[v_str, filename, line], false);
504504
let expr_file_line = consts::const_addr_of(ccx, expr_file_line_const, ast::MutImmutable);
505505
let args = vec!(expr_file_line);
@@ -526,7 +526,7 @@ pub fn trans_fail_bounds_check<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
526526

527527
// Invoke the lang item
528528
let filename = C_str_slice(ccx, filename);
529-
let line = C_int(ccx, loc.line as i64);
529+
let line = C_uint(ccx, loc.line);
530530
let file_line_const = C_struct(ccx, &[filename, line], false);
531531
let file_line = consts::const_addr_of(ccx, file_line_const, ast::MutImmutable);
532532
let args = vec!(file_line, index, len);

src/librustc/middle/trans/type_of.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ use std::num::CheckedMul;
2828

2929
// LLVM doesn't like objects that are too big. Issue #17913
3030
fn ensure_array_fits_in_address_space(ccx: &CrateContext,
31-
llet: Type,
32-
size: machine::llsize,
33-
scapegoat: ty::t) {
31+
llet: Type,
32+
size: machine::llsize,
33+
scapegoat: ty::t) {
3434
let esz = machine::llsize_of_alloc(ccx, llet);
3535
match esz.checked_mul(&size) {
3636
Some(n) if n < ccx.max_obj_size() => {}

src/test/compile-fail/simple-oversized-array.rs renamed to src/test/compile-fail/huge-array-simple.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: too big for the current ABI
11+
// error-pattern: too big for the current
1212

1313
fn main() {
1414
let fat : [u8, ..1<<61] = [0, ..1<<61];

src/test/compile-fail/oversized-struct.rs renamed to src/test/compile-fail/huge-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: are too big for the current ABI
11+
// error-pattern: too big for the current
1212

1313
struct S32<T> {
1414
v0: T,

0 commit comments

Comments
 (0)