Auto merge of #29215 - fhahn:issue-28157-bad-semicolon, r=alexcrichton

PR for #28157. At the moment, `rustc` emits a warning when a bare semicolon is encountered (could also be a fail, but I think this is a backwards incompatible change).

Also I am not sure where the best place for a test for that warning would be. Seems run-pass tests do not check warnings.
This commit is contained in:
bors
2015-10-24 18:37:09 +00:00
8 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -1019,7 +1019,7 @@ fn wtf8buf_into_string_lossy() {
fn wtf8buf_from_iterator() {
fn f(values: &[u32]) -> Wtf8Buf {
values.iter().map(|&c| CodePoint::from_u32(c).unwrap()).collect::<Wtf8Buf>()
};
}
assert_eq!(f(&[0x61, 0xE9, 0x20, 0x1F4A9]).bytes, b"a\xC3\xA9 \xF0\x9F\x92\xA9");
assert_eq!(f(&[0xD83D, 0xDCA9]).bytes, b"\xF0\x9F\x92\xA9"); // Magic!
@@ -1038,7 +1038,7 @@ fn c(value: &u32) -> CodePoint { CodePoint::from_u32(*value).unwrap() }
let mut string = initial.iter().map(c).collect::<Wtf8Buf>();
string.extend(extended.iter().map(c));
string
};
}
assert_eq!(e(&[0x61, 0xE9], &[0x20, 0x1F4A9]).bytes,
b"a\xC3\xA9 \xF0\x9F\x92\xA9");