-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 10 pull requests #24869
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
Merged
Merged
Rollup of 10 pull requests #24869
Conversation
This file contains hidden or 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
Member
steveklabnik
commented
Apr 27, 2015
- Successful merges: In [-] doc buttons, change hyphen ‘-’ to minus ‘−’ #24797, rustdoc: change color of trait types #24804, collections: Examples for as_string and as_vec #24848, Make From::from example more idiomatic / simpler #24854, thread: right now you can't actually set those printers #24855, trpl: Clarify lib.rs vs main.rs #24860, Update reference.md: string literals section #24863, book: improve Vec intro #24866, reference: block-comment -> block comment #24867, doc: it is 'index', not 'i' #24868
- Failed merges:
The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look more smooth.
Fix `make_command_line` for the case of backslashes at the end of an argument requiring quotes. We must encode the command and arguments such that `CommandLineToArgvW` recovers them in the spawned process. Simplify the logic by using a running count of backslashes as they are encountered instead of looking ahead for quotes following them. Extend `test_make_command_line` to additionally cover: * a leading quote in an argument that requires quotes, * a backslash before a quote in an argument that requires quotes, * a backslash at the end of an argument that requires quotes, and * a backslash at the end of an argument that does not require quotes.
So that if people accidentally delete the character, they won’t re-type it as a hyphen, which would cause bugs. I changed ‘+’ too, even though it won’t be re-typed incorrectly, so that it is easier to see when plus is used as a symbol for the button, and when it is used as an operator in code. It also makes it clearer that the use of an entity for minus is on purpose, so people won’t be tempted to replace the entity incorrectly with a hyphen character.
Remove the name "multi-line string literal" since the rule appears to affect each line-break individually rather than the whole string literal. Re-word, and remove the stray reference to raw strings.
…mmand-line, r=alexcrichton Fix `make_command_line` for the case of backslashes at the end of an argument requiring quotes. We must encode the command and arguments such that `CommandLineToArgvW` recovers them in the spawned process. Simplify the logic by using a running count of backslashes as they are encountered instead of looking ahead for quotes following them. Extend `test_make_command_line` to additionally cover: * a leading quote in an argument that requires quotes, * a backslash before a quote in an argument that requires quotes, * a backslash at the end of an argument that requires quotes, and * a backslash at the end of an argument that does not require quotes.
Clarify type inference of floating-point literals
The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look slightly smoother. If you don’t want to use literal Unicode characters, I can change ‘−’ to `\u2212`. I’m not starting with that suggestion because ‘−’ is easier to read and understand, and if I used `\u2212`, it would probably be necessary to also comment the usage on each line to explain what character is being used.
Improve example for as_string and add example for as_vec Provide a better example of `as_string` / `DerefString`'s unique capabilities. Use an example where (for an unspecified reason) you need a &String, and show how `as_string` solves the problem without needing an allocation.
A user in IRC was having trouble because they used `main.rs` when they were trying to migrate a library. The `[[lib]]` key is not easily found, and the `main.rs`/`lib.rs` distinction doesn't seem to exist in trpl r? @steveklabnik
Remove the name "multi-line string literal" since the rule appears to affect each line-break individually rather than the whole string literal. Re-word, and remove the stray reference to raw strings.
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ p=1337 |
📌 Commit 03f3b45 has been approved by |
⌛ Testing commit 03f3b45 with merge 32f9f42... |
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.