-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 16 pull requests #36126
Merged
Merged
Rollup of 16 pull requests #36126
Conversation
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
Feedback on PR rust-lang#35701 seems to be positive, so this does the same thing for `RangeTo` and `RangeToInclusive`.
Doing otherwise would break traits like `ToString`.
They're the same thing but it's better to keep the terminology consistent.
I can think of a few things we may want to accomplish with the documentation of the `Fn`, `FnMut`, and `FnOnce` traits: - the relationship between these traits and the closures that implement them - examples of non-closure implementations - the relationship between these traits and Rust's ownership semantics add module-level documentation for `Fn*` traits Describe how `Fn*` traits, closure types, and ownership semantics are linked, and provide examples of higher-level functions that take `Fn*`s. more examples for `Fn*` traits create correct (though not yet elegant) examples for `FnMut` and `FnOnce` add trait links to module-level documentation third time's a charm! argument -> capture for trait documentation This wording will need to be supported with better examples for capturing eventually. correct `FnOnce` example I also fixed some of the trait wording here to make the concept of capturing clearer; though that still needs more work. replace `x + x` with `x * 2` for `fn double`
r? @steveklabnik add examples that lift `<<` and `>>` to a trivial struct replace `Scalar` structs with struct tuples add `fn main` wrappers to enable Rust Playground "Run" button
The affected API apparently had changed with commit d59accf.
This pull request is based on the discussion in PR rust-lang#35927. Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable. Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple. Make `BooleanVector` a struct tuple. Derive `PartialEq` for `BooleanVector` instead of implementing it. Adds a `fn main` wrapper so that the example can integrate with Rust Playground. simplified bitand expression add a comment explaining what "rhs" means
This can be confusing for newcomers, especially due to the argument name "this".
Updates rust-lang#35515. Part of rust-lang#35233. r? @jonathandturner
- Fixes rust-lang#35269 - Part of rust-lang#35233 r? @jonathandturner
- Fixes rust-lang#35270 - Part of rust-lang#35233 r? @jonathandturner
- Fixes rust-lang#35275 - Part of rust-lang#35233 r? @jonathandturner
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ p=1 |
📌 Commit 2217fc5 has been approved by |
bors
added a commit
that referenced
this pull request
Aug 30, 2016
💔 Test failed - auto-mac-64-opt-rustbuild |
Failure was linkchecker for #35759. |
Doc: explain why Box/Rc/Arc methods do not take self This can be confusing for newcomers, especially due to the argument name `this` that is used for Rc and Arc.
…ple-error, r=steveklabnik show how iterating over `RangeTo` and `RangeToInclusive` fails Feedback on PR rust-lang#35701 seems to be positive, so this does the same thing for `RangeTo` and `RangeToInclusive`.
…steveklabnik improve documentation for `Fn*` traits This PR is not yet a serious attempt at contribution. Rather, I'm opening this for discussion. I can think of a few things we may want to accomplish with the documentation of the `Fn`, `FnMut`, and `FnOnce` traits: - the relationship between these traits and the closures that implement them - examples of non-closure implementations - the relationship between these traits and Rust's ownership semantics
Clarify/fix formatting docs concerning fmt::Result/fmt::Error 1. `fmt::Result` != `io::Result<()>` 2. Formatters should only propagate errors, not return their own. Confusion on reddit: https://www.reddit.com/r/rust/comments/4yorxr/is_implt_tostring_for_t_where_t_display_sized_a/
…klabnik add evocative examples for `Shl` and `Shr` r? @steveklabnik
Fix documentation in cell mod The implementation of Rc type in this doc is outdated.
…steveklabnik Updated code sample in chapter on syntax extensions. The affected API apparently had changed with commit d59accf. --- Further more I had to add ```toml [lib] name = "roman_numerals" crate-type = ["dylib"] ``` to `Cargo.toml` as I otherwise got this compiler error (despite `#![crate_type="dylib"]`): [E0457]: plugin `roman_numerals` only found in rlib format, but must be available in dylib format Might be worth adding a note about that?
Rename {int,uint} methods to {isize,usize}. None
…=GuillaumeGomez improve `BitAnd` trait documentation This pull request is based on the discussion in PR rust-lang#35927. Add a module-level note that `&&` and `||` are short-circuiting operators and not overloadable. Add a simple `Scalar` example that lifts the `&` operator to a trivial struct tuple. Make `BooleanVector` a struct tuple. Derive `PartialEq` for `BooleanVector` instead of implementing it. Adds a `fn main` wrapper so that the example can integrate with Rust Playground.
…le, r=GuillaumeGomez add a simple example for `thread::current()` r? @GuillaumeGomez
update error E0451 to new format Fixes rust-lang#35928 as part of rust-lang#35233. r? @jonathandturner
…jonathandturner Update E0194 to new error format Fixes rust-lang#35280 to update E0194 to support new error message format. Part of rust-lang#35233. A separate Github issue rust-lang#36057 tracks the bonus portion of the original ticket. r? @jonathandturner
… r=jonathandturner Update E0463 error message to new format Fixes rust-lang#35934 as part of rust-lang#35233 r? @jonathandturner
…thandturner Update E0260 to new error format Updates rust-lang#35515. Part of rust-lang#35233. r? @jonathandturner
Update E0089 to new error format Fixes rust-lang#35227. Part of rust-lang#35233. r? @jonathandturner
…rner Update Error format for E0164, E0165, E0184 Part of rust-lang#35233 r? @jonathandturner
@bors: r+ p=1 |
📌 Commit 1d2308f has been approved by |
bors
added a commit
that referenced
this pull request
Aug 30, 2016
This was referenced Aug 30, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Shl
andShr
#35863, Fix documentation in cell mod #35895, Updated code sample in chapter on syntax extensions. #35962, Rename {int,uint} methods to {isize,usize}. #35977, improveBitAnd
trait documentation #35993, add a simple example forthread::current()
#35997, update error E0451 to new format #36054, Update E0194 to new error format #36056, Update E0463 error message to new format #36060, Add test for #35423 #36086, Update E0260 to new error format #36100, Update E0089 to new error format #36103, Update Error format for E0164, E0165, E0184 #36125RangeTo
andRangeToInclusive
fails #35771, improve documentation forFn*
traits #35810