Skip to content

Commit 6479ec1

Browse files
committed
---
yaml --- r: 276223 b: refs/heads/master c: f080b13 h: refs/heads/master i: 276221: c8a72f5 276219: 697ad80 276215: 2b59d20 276207: 104ebb1 276191: a5acace 276159: d633782 276095: bed1301 275967: 88cb670
1 parent 5881d64 commit 6479ec1

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 10737a5a45ed9a1d9ae73b996fae893da1d62512
2+
refs/heads/master: f080b13c6beaa409c2bb643dd997a73ce0e75b89
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/test/compile-fail/const-eval-overflow-4b.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#![allow(unused_imports)]
1717

18-
use std::fmt;
1918
use std::{i8, i16, i32, i64, isize};
2019
use std::{u8, u16, u32, u64, usize};
2120

@@ -26,10 +25,15 @@ const A_I8_T
2625
//~| found `u8` [E0250]
2726
= [0; (i8::MAX as usize) + 1];
2827

29-
fn main() {
30-
foo(&A_I8_T[..]);
31-
}
3228

33-
fn foo<T:fmt::Debug>(x: T) {
34-
println!("{:?}", x);
35-
}
29+
const A_CHAR_USIZE
30+
: [u32; 5u8 as char as usize]
31+
= [0; 5];
32+
33+
34+
const A_BAD_CHAR_USIZE
35+
: [u32; 5i8 as char as usize]
36+
//~^ ERROR only `u8` can be cast as `char`, not `i8`
37+
= [0; 5];
38+
39+
fn main() {}

trunk/src/test/run-pass/const-err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//

0 commit comments

Comments
 (0)