Skip to content

Commit 432015d

Browse files
committed
rustup
1 parent ba24c31 commit 432015d

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
27af5175497936ea3413bef5816e7c0172514b9c
1+
51ea9bb29b07d76c5a7167d054b54f4eb7f5b44e

tests/compile-fail/never_transmute_void.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
#![feature(never_type)]
55
#![allow(unused, invalid_value)]
66

7-
enum Void {}
7+
mod m {
8+
enum VoidI {}
9+
pub struct Void(VoidI);
810

9-
fn f(v: Void) -> ! {
10-
match v {} //~ ERROR entering unreachable code
11+
pub fn f(v: Void) -> ! {
12+
match v.0 {} //~ ERROR entering unreachable code
13+
}
1114
}
1215

1316
fn main() {
14-
let v: Void = unsafe {
15-
std::mem::transmute::<(), Void>(())
17+
let v = unsafe {
18+
std::mem::transmute::<(), m::Void>(())
1619
};
17-
f(v); //~ inside `main`
20+
m::f(v); //~ inside `main`
1821
}

tests/run-pass/async-fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn never() -> Never {
2929
}
3030

3131
async fn includes_never(crash: bool, x: u32) -> u32 {
32-
let mut result = async { x * x }.await;
32+
let result = async { x * x }.await;
3333
if !crash {
3434
return result;
3535
}

0 commit comments

Comments
 (0)