diff options
| author | bors <bors@rust-lang.org> | 2016-06-19 22:18:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-19 22:18:52 -0700 |
| commit | 25f349db3e3d3ab65589c206fc3a73a077ddde19 (patch) | |
| tree | fbcfcd5c6bf11adf0bc8e8d246f078f28cb5fce7 | |
| parent | fa4cf7b26076a7134a9f000911c0b3d3642876bd (diff) | |
| parent | 317ed8418436305c5582da5099b1a99e3b3841b6 (diff) | |
| download | rust-25f349db3e3d3ab65589c206fc3a73a077ddde19.tar.gz rust-25f349db3e3d3ab65589c206fc3a73a077ddde19.zip | |
Auto merge of #34348 - dsprenkels:issue-34194-test, r=alexcrichton
Add regression test for #34194 This pull request adds a regression test for #34194. Closes #34194.
| -rw-r--r-- | src/test/compile-fail/issue-34194.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-34194.rs b/src/test/compile-fail/issue-34194.rs new file mode 100644 index 00000000000..dd607ebad62 --- /dev/null +++ b/src/test/compile-fail/issue-34194.rs @@ -0,0 +1,21 @@ +// 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. + +#![allow(dead_code)] + +struct A { + a: &'static (), +} + +static B: &'static A = &A { a: &() }; +static C: &'static A = &B; +//~^ ERROR cannot refer to other statics by value + +fn main() {} |
