-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix #419 (check all whitelisted examples) #433
Conversation
I didn't do anything about `print.rs`, this is a pure bugfix
(rust_highfive has picked a reviewer for you, use r? to override) |
The failure is due to Also, hello again, sorry I've been away for so long 😄 |
Nice |
kicked off a new build, let's see how it goes |
@@ -1,16 +1,16 @@ | |||
fn main() { | |||
// Iterators can be collected into vectors | |||
let collected_iterator: Vec<int> = range(0i, 10).collect(); | |||
println!("Collected range(0, 10) into: {}", collected_iterator); | |||
let collected_iterator: Vec<i32> = range(0, 10).collect(); |
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.
Could do (0..10).collect()
instead of range(0, 10)
. I'm not sure if the parentheses will need to stay for long or not. They're needed currently though.
Honestly, I think we should pull these "whitelisted" examples out, and remake them as "what you should do", not what you shouldn't. Any thoughts? |
I would deal with it on a case by case basis but in general I would agree. I don't like an example failing when I first look at it. I like the error cases being labeled as such and the fixes being specified though. So commented out errors I like. Skipped tests make out of date problems too. Kinda bad. |
@mdinger I'm currently attempting to gut the whitelist; however, I've come up against a problem. |
Kinda reminds me of rust-lang/rust-playpen#32 but it isn't about getting cargo to work in playpen. Just getting flags working. You could do this but I don't think it's a good idea. Way out of the way for a simple example. It does work though. // Ban `std` so we can import it manually for demonstration
#![no_std]
// Need to import `println!` also
#[macro_use (println)]
extern crate std;
// Need some tool for an example
use std::vec::Vec;
fn main() {
let mut v = Vec::new();
v.push(3);
v.push(4);
println!("{:?}", v);
} Oh, I know how you could test this. Upgrade I don't know how easy that would be. |
What do you mean? On Wed, Jan 28, 2015 at 10:17 PM, mdinger notifications@github.com wrote:
"Calling all. This is our last cry before our eternal silence." |
I think you could use some shell scripting where my comment is to do it. I'd have to play with it for a while before I could get any real syntax layed down for it. The makefile
[EDIT] You'd need to create a |
I think I have a better way than this. Testing it out now |
@GBGamer Look at mdinger@3a0f174 This adds one of the whitelisted examples to the This doesn't scale well for all the examples because you have to list them all explicitly. It would work well to replace some of the whitelisted examples though because there are only a few. |
I looked into what it would take to completely switch over to
This would be tedious for rbe's 100 examples.
That's all I can think of currently. |
@steveklabnik, your thoughts? Should we continue with this?
|
I just got off of like 14 hours of flights and have a talk to present about on Sunday, so I haven't been able to review at all, sorry :/ (also, technically i'm on vacation this week) |
If you can rewrite a few specific examples better with cargo support then I think it's a good idea to do them that way. Until So, I think global change decisions should wait until the compact syntax exists. |
I filed #439 to continue this discussion as it's a little off topic here. This PR should be landable fairly easily. |
Fix #419 (check all whitelisted examples)
Yes, I'm comfortable landing this in the meantime. Thank you. |
I didn't do anything about
print.rs
, this is a pure bugfix