Auto merge of #50710 - Zoxc:value_to_constvalue, r=oli-obk
Fix conversion from Miri Value to ConstValue This fixes an error compiling the `immeta` 0.3.6 crate. https://github.com/rust-lang/rust/issues/50707 may be fixed too. r? @oli-obk
This commit is contained in:
commit
2f2a11dfc4
2 changed files with 91 additions and 59 deletions
21
src/test/run-pass/match-larger-const.rs
Normal file
21
src/test/run-pass/match-larger-const.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#[derive(Eq, PartialEq)]
|
||||
pub struct Data([u8; 4]);
|
||||
|
||||
const DATA: Data = Data([1, 2, 3, 4]);
|
||||
|
||||
fn main() {
|
||||
match DATA {
|
||||
DATA => (),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue