]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #70189 - RalfJung:is_signed, r=eddyb
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 21 Mar 2020 04:33:35 +0000 (05:33 +0100)
committerGitHub <noreply@github.com>
Sat, 21 Mar 2020 04:33:35 +0000 (05:33 +0100)
Abi::is_signed: assert that we are a Scalar

A bit more sanity checking, suggested by @eddyb. This makes this method actually "safer" than `TyS::is_signed`, so I made sure Miri consistently uses the `Abi` version.

Though I am not sure if this would have caught the mistake where the layout of a zero-sized enum was asked for its sign.

r? @eddyb

1  2 
src/librustc_mir/interpret/operand.rs
src/librustc_target/abi/mod.rs

Simple merge
Simple merge