forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#63259 - JohnTitor:add-tests-for-some-issues…
…, r=Centril Add tests for some issues Closes rust-lang#29265 Closes rust-lang#37433 Closes rust-lang#49544 r? @Centril
- Loading branch information
Showing
6 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#![feature(asm)] | ||
|
||
fn main() { | ||
unsafe { | ||
asm!("" :: "r"("")); | ||
//~^ ERROR: invalid value for constraint in inline assembly | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:5:24 | ||
| | ||
LL | asm!("" :: "r"("")); | ||
| ^^ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |