-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rewrite suspicious-library
, resolve-rename
and incr-prev-body-beyond-eof
run-make
tests in rmake.rs
format
#125683
Merged
Merged
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 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 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 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 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,27 @@ | ||
// After modifying the span of a function, if the length of | ||
// the span remained the same but the end line number became different, | ||
// this would cause an internal compiler error (ICE), fixed in #76256. | ||
|
||
// This test compiles main.rs twice, first with end line 16 and | ||
// then with end line 12. If compilation is successful, the end line | ||
// was hashed by rustc in addition to the span length, and the fix still | ||
// works. | ||
|
||
//@ ignore-none | ||
// reason: no-std is not supported | ||
|
||
//@ ignore-nvptx64-nvidia-cuda | ||
// FIXME: can't find crate for `std` | ||
|
||
use run_make_support::{rustc, tmp_dir}; | ||
use std::fs; | ||
|
||
fn main() { | ||
// FIXME(Oneirical): Use run_make_support::fs_wrapper here. | ||
fs::create_dir(tmp_dir().join("src")).unwrap(); | ||
fs::create_dir(tmp_dir().join("incr")).unwrap(); | ||
fs::copy("a.rs", tmp_dir().join("src/main.rs")).unwrap(); | ||
rustc().incremental(tmp_dir().join("incr")).input(tmp_dir().join("src/main.rs")).run(); | ||
fs::copy("b.rs", tmp_dir().join("src/main.rs")).unwrap(); | ||
rustc().incremental(tmp_dir().join("incr")).input(tmp_dir().join("src/main.rs")).run(); | ||
} |
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
// If a library is compiled with -C extra-filename, the rust compiler | ||
// will take this into account when searching for libraries. However, | ||
// if that library is then renamed, the rust compiler should fall back | ||
// to its regular library location logic and not immediately fail to find | ||
// the renamed library. | ||
// See https://github.com/rust-lang/rust/pull/49253 | ||
|
||
use run_make_support::{rustc, tmp_dir}; | ||
use std::fs; | ||
fn main() { | ||
rustc().extra_filename("-hash").input("foo.rs").run(); | ||
rustc().input("bar.rs").run(); | ||
fs::rename(tmp_dir().join("libfoo-hash.rlib"), tmp_dir().join("libfoo-another-hash.rlib")) | ||
.unwrap(); | ||
rustc().input("baz.rs").run(); | ||
} |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
// This test creates some fake dynamic libraries with nothing inside, | ||
// and checks if rustc avoids them and successfully compiles as a result. | ||
|
||
//@ ignore-cross-compile | ||
|
||
use run_make_support::{dynamic_lib, rustc}; | ||
use std::fs::File; | ||
|
||
fn main() { | ||
rustc().input("foo.rs").arg("-Cprefer-dynamic").run(); | ||
File::create(dynamic_lib("foo-something-special")).unwrap(); | ||
File::create(dynamic_lib("foo-something-special2")).unwrap(); | ||
rustc().input("bar.rs").run(); | ||
} |
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.
Let's keep the ignore directives: