-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support stable rustc #107
Support stable rustc #107
Conversation
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.
I like the idea! Being able to run on stable is quite nice, and the implementation is nice and "opt-in", just how I like it, so thanks :-)
Please look at my comments, I think they should be manageable and then we could merge this.
src/lib.rs
Outdated
@@ -272,6 +275,8 @@ pub fn make_test_closure(config: &Config, testpaths: &TestPaths) -> test::TestFn | |||
let config = config.clone(); | |||
let testpaths = testpaths.clone(); | |||
test::DynTestFn(Box::new(move || { | |||
#[cfg(feature = "norustc")] | |||
let config = config.clone(); // FIXME: why is this needed? |
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.
Maybe some of the NLL changes in rustc nightly obviates the need to clone config
? Or we're looking at a bug in rustc nightly? config
has type &Config
, so it should be freely copyable across threads, right? It could also be a that's been fixed in nightly, but hasn't made its way to stable?
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.
It could be related to test::DynTestFn
takes an Box<FnMut() + Send>
instead of Box<FnBox() + Send>
. (Because FnBox
isn't stable)
Cargo.toml
Outdated
@@ -23,6 +23,7 @@ tempdir = { version = "0.3", optional = true } | |||
serde = "1.0" | |||
serde_json = "1.0" | |||
serde_derive = "1.0" | |||
rustc-test = { git = "https://github.com/messense/rustc-test.git", branch = "update", optional = true} |
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.
What's in this crate? Could you add it to crates.io
?
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.
It's a fork of servo/rustc-test with updates from rustc. It should be upstreamed to servo/rustc-test.
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.
I have opened a PR in rustc-test here: servo/rustc-test#8
How does the |
To move this forward, I have released the updated version of |
I don't have enough words to express my happiness about this PR! |
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.
@oli-obk I should not be so slow then :-)
@messense Sorry for the absence, had a week off. I think this looks good to go.
@SergioBenitez Any comments on this?
@@ -8,3 +8,6 @@ authors = ["Thomas Jespersen <laumann.thomas@gmail.com>"] | |||
[dev-dependencies.compiletest_rs] | |||
path = ".." | |||
features = ["tmp"] | |||
|
|||
[features] | |||
stable = ["compiletest_rs/stable"] |
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.
Oh, this is how to reference features from dependencies?
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.
See the reference here: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section
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.
Thanks for the pointer!
tail.rotate_left(data.len()); | ||
// FIXME: Remove this when rotate_left is stable in 1.26 |
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.
Nice! This is much more clear, thank you.
Hmm, I checked this out and did:
Am I doing something wrong? I'm on rustc 1.25.0 |
Of course, I have to do |
0.3.10 is out! |
No description provided.