Skip to content

Commit

Permalink
Auto merge of #2078 - RalfJung:rustup, r=RalfJung
Browse files Browse the repository at this point in the history
rustup

rust-lang/rust#93313 somehow made it so that this does not have to be mutable any more...
  • Loading branch information
bors committed Apr 20, 2022
2 parents ba24c31 + 432015d commit edd4858
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
27af5175497936ea3413bef5816e7c0172514b9c
51ea9bb29b07d76c5a7167d054b54f4eb7f5b44e
15 changes: 9 additions & 6 deletions tests/compile-fail/never_transmute_void.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
#![feature(never_type)]
#![allow(unused, invalid_value)]

enum Void {}
mod m {
enum VoidI {}
pub struct Void(VoidI);

fn f(v: Void) -> ! {
match v {} //~ ERROR entering unreachable code
pub fn f(v: Void) -> ! {
match v.0 {} //~ ERROR entering unreachable code
}
}

fn main() {
let v: Void = unsafe {
std::mem::transmute::<(), Void>(())
let v = unsafe {
std::mem::transmute::<(), m::Void>(())
};
f(v); //~ inside `main`
m::f(v); //~ inside `main`
}
2 changes: 1 addition & 1 deletion tests/run-pass/async-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn never() -> Never {
}

async fn includes_never(crash: bool, x: u32) -> u32 {
let mut result = async { x * x }.await;
let result = async { x * x }.await;
if !crash {
return result;
}
Expand Down

0 comments on commit edd4858

Please sign in to comment.