diff options
| author | bors <bors@rust-lang.org> | 2016-07-16 13:38:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-16 13:38:51 -0700 |
| commit | b5ad2779ea155f6a1b2b61415bc804dcbb23400c (patch) | |
| tree | ae02d0d6f806f31dcb162e47d516bf4807dae619 /src/test | |
| parent | 60564d072f058f995258578c93cc059f8f5ac17d (diff) | |
| parent | d1486108bc517edf8fb401da587e1fac22ffffb0 (diff) | |
| download | rust-b5ad2779ea155f6a1b2b61415bc804dcbb23400c.tar.gz rust-b5ad2779ea155f6a1b2b61415bc804dcbb23400c.zip | |
Auto merge of #34846 - jonas-schievink:issue34839, r=eddyb
Variant Size Differences: Erase regions before computing type layout Fixes #34839
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/issue-34839.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-34839.rs b/src/test/compile-fail/issue-34839.rs new file mode 100644 index 00000000000..be7e7820020 --- /dev/null +++ b/src/test/compile-fail/issue-34839.rs @@ -0,0 +1,31 @@ +// 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. + +#![feature(rustc_attrs)] +#![allow(dead_code)] + +trait RegularExpression: Sized { + type Text; +} + +struct ExecNoSyncStr<'a>(&'a u8); + +impl<'c> RegularExpression for ExecNoSyncStr<'c> { + type Text = u8; +} + +struct FindCaptures<'t, R>(&'t R::Text) where R: RegularExpression, R::Text: 't; + +enum FindCapturesInner<'r, 't> { + Dynamic(FindCaptures<'t, ExecNoSyncStr<'r>>), +} + +#[rustc_error] +fn main() {} //~ ERROR compilation successful |
