Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for some issues #63259

Merged
merged 4 commits into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/test/ui/issues/auxiliary/issue-29265.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![crate_type = "lib"]

pub struct SomeType {
pub some_member: usize,
}

pub static SOME_VALUE: SomeType = SomeType {
some_member: 1,
};
7 changes: 7 additions & 0 deletions src/test/ui/issues/auxiliary/issue-49544.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#![crate_type = "lib"]

pub fn foo() -> Vec<String> {
std::env::args()
.skip(1)
.collect()
}
10 changes: 10 additions & 0 deletions src/test/ui/issues/issue-29265.rs
Original file line number Diff line number Diff line change
@@ -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];
}
10 changes: 10 additions & 0 deletions src/test/ui/issues/issue-37433.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// ignore-emscripten no asm! support

#![feature(asm)]

fn main() {
unsafe {
asm!("" :: "r"(""));
//~^ ERROR: invalid value for constraint in inline assembly
}
}
8 changes: 8 additions & 0 deletions src/test/ui/issues/issue-37433.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error[E0669]: invalid value for constraint in inline assembly
--> $DIR/issue-37433.rs:7:24
|
LL | asm!("" :: "r"(""));
| ^^

error: aborting due to previous error

9 changes: 9 additions & 0 deletions src/test/ui/issues/issue-49544.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// aux-build:issue-49544.rs
// check-pass

extern crate issue_49544;
use issue_49544::foo;

fn main() {
let _ = foo();
}