From 41a032db9050941e19fec7f3409de00ae175848d Mon Sep 17 00:00:00 2001 From: John Kåre Alsaker Date: Sun, 13 May 2018 15:58:16 +0200 Subject: Fix conversion from Miri Value to ConstValue --- src/test/run-pass/match-larger-const.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/run-pass/match-larger-const.rs (limited to 'src/test') 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 or the MIT license +// , 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 => (), + _ => (), + } +} -- cgit 1.4.1-3-g733a5