diff options
| author | bors <bors@rust-lang.org> | 2016-09-12 04:38:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-12 04:38:55 -0700 |
| commit | 85592fbe60ee4e6878bb1f11da0243c3a3a440f3 (patch) | |
| tree | 0a4163803d753fd9893e6bf168ce8779f38f4804 /src/test | |
| parent | 00ce2c0ffa93bd13b52037dfd9b70d3fc68c943c (diff) | |
| parent | f1bd90778997865480fa666fbf2eef1b164a0f72 (diff) | |
| download | rust-85592fbe60ee4e6878bb1f11da0243c3a3a440f3.tar.gz rust-85592fbe60ee4e6878bb1f11da0243c3a3a440f3.zip | |
Auto merge of #36406 - arielb1:constant-padding, r=eddyb
use `adt::trans_const` when translating constant closures and tuples The previous way dropped padding on the floor. Fixes #36401 r? @eddyb
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/issue-36401.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-36401.rs b/src/test/run-pass/issue-36401.rs new file mode 100644 index 00000000000..7b08eba9e49 --- /dev/null +++ b/src/test/run-pass/issue-36401.rs @@ -0,0 +1,25 @@ +// Copyright 2016 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(Debug)] +pub enum Event { + Key(u8), + Resize, + Unknown(u16), +} + +static XTERM_SINGLE_BYTES : [(u8, Event); 1] = [(1, Event::Resize)]; + +fn main() { + match XTERM_SINGLE_BYTES[0] { + (1, Event::Resize) => {}, + ref bad => panic!("unexpected {:?}", bad) + } +} |
