-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Move some tests out of tests/ui #140551
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
Merged
Merged
Move some tests out of tests/ui #140551
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
2 changes: 0 additions & 2 deletions
2
tests/ui/auxiliary/issue-13560-1.rs → ...ibutes/no_link/auxiliary/empty-crate-1.rs
This file contains hidden or 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 |
---|---|---|
@@ -1,3 +1 @@ | ||
//@ no-prefer-dynamic | ||
|
||
#![crate_type = "dylib"] |
File renamed without changes.
This file contains hidden or 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,6 @@ | ||
//@ no-prefer-dynamic | ||
|
||
#![crate_type = "rlib"] | ||
|
||
#[macro_use] #[no_link] extern crate empty_crate_1 as t1; | ||
#[macro_use] extern crate empty_crate_2 as t2; |
17 changes: 17 additions & 0 deletions
17
tests/ui/attributes/no_link/multiple-crates-and-no_link.rs
This file contains hidden or 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,17 @@ | ||
//! Regression test for #13560. Previously, it was possible to | ||
//! trigger an assert in crate numbering if a series of crates | ||
//! being loaded included a "syntax-only" extern crate. | ||
//! But it appears we don't mess with crate numbering for | ||
//! `#[no_link]` crates anymore, so this test doesn't seem | ||
//! to test anything now. | ||
|
||
//@ run-pass | ||
//@ needs-crate-type: dylib | ||
//@ aux-build:empty-crate-1.rs | ||
//@ aux-build:empty-crate-2.rs | ||
//@ aux-build:no_link-crate.rs | ||
|
||
extern crate empty_crate_2 as t2; | ||
extern crate no_link_crate as t3; | ||
|
||
fn main() {} |
This file contains hidden or 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,19 @@ | ||
//! Unfortunately the development of `#[phase]` and `#[no_link]` | ||
//! predates Zulip, and thus has been lost in the sands of time. | ||
//! Understanding the true nature of this test has been left as | ||
//! an exercise for the reader. | ||
//! | ||
//! But we guess from the git history that originally this | ||
//! test was supposed to check that we error if we can't find | ||
//! an extern crate annotated with `#[phase(syntax)]`, | ||
//! see `macro-crate-unknown-crate.rs` in | ||
//! <https://github.com/rust-lang/rust/pull/11151>. Later, we changed | ||
//! `#[phase]` to `#![feature(plugin)]` and added a `#[no_link]`. | ||
//! | ||
//! I suppose that this now tests that we still error if we can't | ||
//! find a `#[no_link]` extern crate? | ||
|
||
#[no_link] | ||
extern crate doesnt_exist; //~ ERROR can't find crate | ||
|
||
fn main() {} |
2 changes: 1 addition & 1 deletion
2
tests/ui/no-link-unknown-crate.stderr → ...utes/no_link/no-link-unknown-crate.stderr
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,12 @@ | ||
//! Dpn't ice on using an inlined function from another crate | ||
//! See <https://github.com/rust-lang/rust/issues/18502> and | ||
//! <https://github.com/rust-lang/rust/issues/18501> | ||
|
||
//@ run-pass | ||
//@ aux-build:inline-cross-crate.rs | ||
|
||
extern crate inline_cross_crate as fmt; | ||
|
||
fn main() { | ||
::fmt::baz(); | ||
} |
22 changes: 22 additions & 0 deletions
22
tests/ui/cross-crate/llvm-miscompile-MarkValue-MaybeLive.rs
This file contains hidden or 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,22 @@ | ||
//! Regression test for <https://github.com/rust-lang/rust/issues/76387> | ||
//! Tests that LLVM doesn't miscompile this | ||
//! See upstream fix: <https://reviews.llvm.org/D88529>. | ||
|
||
//@ compile-flags: -C opt-level=3 | ||
//@ aux-build: llvm-miscompile-MarkValue-MaybeLive.rs | ||
//@ run-pass | ||
|
||
extern crate llvm_miscompile_MarkValue_MaybeLive; | ||
|
||
use llvm_miscompile_MarkValue_MaybeLive::FatPtr; | ||
|
||
fn print(data: &[u8]) { | ||
println!("{:#?}", data); | ||
} | ||
|
||
fn main() { | ||
let ptr = FatPtr::new(20); | ||
let data = unsafe { std::slice::from_raw_parts(ptr.as_ptr(), ptr.len()) }; | ||
|
||
print(data); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
tests/ui/non-fmt-panic.fixed → tests/ui/macros/non-fmt-panic.fixed
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark: I think we'll leave this as an exercise to the person modifying
#[no_link]
-the-attribute...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not rub it in ;)