diff options
| author | bors <bors@rust-lang.org> | 2018-05-16 21:01:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-16 21:01:31 +0000 |
| commit | 2f2a11dfc436fc0f401b595f22ed043c46dbebe7 (patch) | |
| tree | d22171e4a637913a739fdfac01df1fe3f341d3b4 /src/test | |
| parent | e1151c9819cca90e511f60757297629177272d16 (diff) | |
| parent | 41a032db9050941e19fec7f3409de00ae175848d (diff) | |
| download | rust-2f2a11dfc436fc0f401b595f22ed043c46dbebe7.tar.gz rust-2f2a11dfc436fc0f401b595f22ed043c46dbebe7.zip | |
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
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/match-larger-const.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/run-pass/match-larger-const.rs b/src/test/run-pass/match-larger-const.rs new file mode 100644 index 00000000000..8cb4d92c21c --- /dev/null +++ b/src/test/run-pass/match-larger-const.rs @@ -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 => (), + _ => (), + } +} |
