-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Change the example on rust-lang.org #3407
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
Comments
Something showing off pattern matching would be cool. |
Here's what I proposed on IRC that met with a favorable response:
You should probably take out the comments though (especially without syntax highlighting). And of course you can replace |
Thanks @bstrie, that's pretty good! With a small tweak to the kind rules to admit static region pointers and slices to the
I think that reads pretty well, flexes a fair number of interesting features. |
Looks good, but how about changing:
to:
|
Nice. I suggest to rename "Rng", though. |
@Lenny222 |
|
This is done. |
Actually no, Niko's pointed out that the new code example won't be valid post-demoding. See rust-lang/prev.rust-lang.org#1 |
This code sample doesn't compile for me with a rustc built from master. I get:
|
Yeah, the changes to enable it are still trickling into master from incoming. I'll bump master. |
Still doesn't compile, requires more work on kinds and * on the name, num arguments. Or changing again. |
Because of #3586, I think it makes sense to think of an example that forgoes |
I updated the example to make it build, but agree we should get the |
Now i threw in a |
This would work seamlessly using |
Oh, but maybe by-value self types don't work yet... |
This seems done enough to close now. Reopen if you change your mind :) |
silence build failures of futures-rs until https://github.com/rust-la…
The current example is too cute - the
times
method is not well loved. Let's come up with another one. Maybe something that shows more of the language.The text was updated successfully, but these errors were encountered: