Skip to content

Commit

Permalink
Add test for issue-29265
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Aug 4, 2019
1 parent 2c13edc commit 416caa1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/issues/auxiliary/issue-29265.rs
@@ -0,0 +1,9 @@
#![crate_type = "lib"]

pub struct SomeType {
pub some_member: usize,
}

pub static SOME_VALUE: SomeType = SomeType {
some_member: 1,
};
10 changes: 10 additions & 0 deletions src/test/ui/issues/issue-29265.rs
@@ -0,0 +1,10 @@
// aux-build:issue-29265.rs
// check-pass

extern crate issue_29265 as lib;

static _UNUSED: &'static lib::SomeType = &lib::SOME_VALUE;

fn main() {
vec![0u8; lib::SOME_VALUE.some_member];
}

0 comments on commit 416caa1

Please sign in to comment.