-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 12 pull requests #82430
Rollup of 12 pull requests #82430
Commits on Jan 21, 2021
-
Improve suggestion for tuple struct pattern matching errors.
Currently, when a user uses a struct pattern to pattern match on a tuple struct, the errors we emit generally suggest adding fields using their field names, which are numbers. However, numbers are not valid identifiers, so the suggestions, which use the shorthand notation, are not valid syntax. This commit changes those errors to suggest using the actual tuple struct pattern syntax instead, which is a more actionable suggestion.
Configuration menu - View commit details
-
Copy full SHA for 8a83c8f - Browse repository at this point
Copy the full SHA 8a83c8fView commit details
Commits on Feb 6, 2021
-
Configuration menu - View commit details
-
Copy full SHA for f165f49 - Browse repository at this point
Copy the full SHA f165f49View commit details -
Configuration menu - View commit details
-
Copy full SHA for f30c51a - Browse repository at this point
Copy the full SHA f30c51aView commit details
Commits on Feb 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a0f9d4b - Browse repository at this point
Copy the full SHA a0f9d4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1581ed - Browse repository at this point
Copy the full SHA f1581edView commit details -
Configuration menu - View commit details
-
Copy full SHA for e4b83fc - Browse repository at this point
Copy the full SHA e4b83fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for cadcf5e - Browse repository at this point
Copy the full SHA cadcf5eView commit details -
Fix
@has
checks "no closing quotation" errorApparently `"foo\""` has different behavior from `'foo\''` in Python shlex. See the [discussion on Zulip][z] for more. [z]: https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.40has.20checks.20.22no.20closing.20quotation.22
Configuration menu - View commit details
-
Copy full SHA for 0a34521 - Browse repository at this point
Copy the full SHA 0a34521View commit details
Commits on Feb 9, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 1b29b29 - Browse repository at this point
Copy the full SHA 1b29b29View commit details
Commits on Feb 11, 2021
-
Make WASI's
hard_link
behavior match other platforms.Following rust-lang#78026, `std::fs::hard_link` on most platforms does not follow symlinks. Change the WASI implementation to also not follow symlinks.
Configuration menu - View commit details
-
Copy full SHA for 0060c91 - Browse repository at this point
Copy the full SHA 0060c91View commit details
Commits on Feb 12, 2021
-
Configuration menu - View commit details
-
Copy full SHA for daa55ac - Browse repository at this point
Copy the full SHA daa55acView commit details
Commits on Feb 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9d29793 - Browse repository at this point
Copy the full SHA 9d29793View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb647f3 - Browse repository at this point
Copy the full SHA cb647f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6111a2 - Browse repository at this point
Copy the full SHA f6111a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d519ea - Browse repository at this point
Copy the full SHA 5d519eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe4fe19 - Browse repository at this point
Copy the full SHA fe4fe19View commit details
Commits on Feb 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for eace240 - Browse repository at this point
Copy the full SHA eace240View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7879099 - Browse repository at this point
Copy the full SHA 7879099View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33d8b04 - Browse repository at this point
Copy the full SHA 33d8b04View commit details
Commits on Feb 15, 2021
-
Add diagnostic items to the following types: OsString (os_string_type) PathBuf (path_buf_type) Owned (to_owned_trait) As well as the to_vec method on slice/[T]
Configuration menu - View commit details
-
Copy full SHA for 5ef2025 - Browse repository at this point
Copy the full SHA 5ef2025View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6bb628 - Browse repository at this point
Copy the full SHA c6bb628View commit details
Commits on Feb 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 30c5125 - Browse repository at this point
Copy the full SHA 30c5125View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67fcaaa - Browse repository at this point
Copy the full SHA 67fcaaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ec4b06 - Browse repository at this point
Copy the full SHA 5ec4b06View commit details
Commits on Feb 17, 2021
-
Configuration menu - View commit details
-
Copy full SHA for eeb5552 - Browse repository at this point
Copy the full SHA eeb5552View commit details
Commits on Feb 18, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8ddd846 - Browse repository at this point
Copy the full SHA 8ddd846View commit details
Commits on Feb 19, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 48b5c09 - Browse repository at this point
Copy the full SHA 48b5c09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 597118b - Browse repository at this point
Copy the full SHA 597118bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 62ee3ec - Browse repository at this point
Copy the full SHA 62ee3ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1abcdfe - Browse repository at this point
Copy the full SHA 1abcdfeView commit details
Commits on Feb 20, 2021
-
Configuration menu - View commit details
-
Copy full SHA for a9c6188 - Browse repository at this point
Copy the full SHA a9c6188View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8540ae - Browse repository at this point
Copy the full SHA d8540aeView commit details
Commits on Feb 22, 2021
-
Suggest
return
ing tail expressions that match return typeSome newcomers are confused by the behavior of tail expressions, interpreting that "leaving out the `;` makes it the return value". To help them go in the right direction, suggest using `return` instead when applicable.
Configuration menu - View commit details
-
Copy full SHA for 796ce9f - Browse repository at this point
Copy the full SHA 796ce9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 020edd9 - Browse repository at this point
Copy the full SHA 020edd9View commit details -
Do not suggest
;
if expression is side effect freeWhen a tail expression isn't unit, we previously always suggested adding a trailing `;` to turn it into a statement. This suggestion isn't appropriate for any expression that doesn't have side-effects, as the user will have likely wanted to call something else or do something with the resulting value, instead of just discarding it.
Configuration menu - View commit details
-
Copy full SHA for d669882 - Browse repository at this point
Copy the full SHA d669882View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86b3f3f - Browse repository at this point
Copy the full SHA 86b3f3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc6c19e - Browse repository at this point
Copy the full SHA fc6c19eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7bc5016 - Browse repository at this point
Copy the full SHA 7bc5016View commit details
Commits on Feb 23, 2021
-
Rollup merge of rust-lang#79423 - camelid:smart-punct, r=jyn514
Enable smart punctuation Closes rust-lang#76690.
Configuration menu - View commit details
-
Copy full SHA for 1c2a949 - Browse repository at this point
Copy the full SHA 1c2a949View commit details -
Rollup merge of rust-lang#81154 - dylni:improve-design-of-assert-len,…
… r=KodrAus Improve design of `assert_len` It was discussed in the [tracking issue](rust-lang#76393 (comment)) that `assert_len`'s name and usage are confusing. This PR improves them based on a suggestion by ``@scottmcm`` in that issue. I also improved the documentation to make it clearer when you might want to use this method. Old example: ```rust let range = range.assert_len(slice.len()); ``` New example: ```rust let range = range.ensure_subset_of(..slice.len()); ``` Fixes rust-lang#81157
Configuration menu - View commit details
-
Copy full SHA for 72e6d51 - Browse repository at this point
Copy the full SHA 72e6d51View commit details -
Rollup merge of rust-lang#81235 - reese:rw-tuple-diagnostics, r=estebank
Improve suggestion for tuple struct pattern matching errors. Closes rust-lang#80174 This change allows numbers to be parsed as field names when pattern matching on structs, which allows us to provide better error messages when tuple structs are matched using a struct pattern. r? ``@estebank``
Configuration menu - View commit details
-
Copy full SHA for 8e51bd4 - Browse repository at this point
Copy the full SHA 8e51bd4View commit details -
Rollup merge of rust-lang#81769 - estebank:tail-expr-as-potential-ret…
…urn, r=lcnr Suggest `return`ing tail expressions that match return type Some newcomers are confused by the behavior of tail expressions, interpreting that "leaving out the `;` makes it the return value". To help them go in the right direction, suggest using `return` instead when applicable.
Configuration menu - View commit details
-
Copy full SHA for 5d90e89 - Browse repository at this point
Copy the full SHA 5d90e89View commit details -
Rollup merge of rust-lang#81837 - gilescope:to_ascii_speedups, r=dtolnay
Slight perf improvement on char::to_ascii_lowercase `char::to_ascii_lowercase()` was checking if it was ascii and then if it was in the right range. Instead propose to check once (I think removing a compare and a shift in the process: [godbolt](https://godbolt.org/z/e5Tora) ). before: ``` test char::methods::bench_to_ascii_lowercase ... bench: 11,196 ns/iter (+/- 632) test char::methods::bench_to_ascii_uppercase ... bench: 11,656 ns/iter (+/- 671) ``` after: ``` test char::methods::bench_to_ascii_lowercase ... bench: 9,612 ns/iter (+/- 979) test char::methods::bench_to_ascii_uppercase ... bench: 8,241 ns/iter (+/- 701) ``` (calling u8::to_ascii_lowercase and letting that flip the 5th bit is also an option, but it's more instructions. I'm thinking for things around ascii and char we want to be as efficient as possible.)
Configuration menu - View commit details
-
Copy full SHA for 4af965e - Browse repository at this point
Copy the full SHA 4af965eView commit details -
Rollup merge of rust-lang#81969 - jonas-schievink:no-cfg-if, r=Mark-S…
…imulacrum Avoid `cfg_if` in `std::os` rust-analyzer cannot currently load the `cfg_if` crate, which means that rust-analyzer is unable to see `std::os::{unix, windows, linux}` here. This works around that by avoiding `cfg_if`; the `#[cfg]` expressions are simple enough to reasonably write by hand. Fixes rust-lang/rust-analyzer#6038
Configuration menu - View commit details
-
Copy full SHA for c3de8ab - Browse repository at this point
Copy the full SHA c3de8abView commit details -
Rollup merge of rust-lang#81984 - sunfishcode:wasi-link, r=alexcrichton
Make WASI's `hard_link` behavior match other platforms. Following rust-lang#78026, `std::fs::hard_link` on most platforms does not follow symlinks. Change the WASI implementation to also not follow symlinks. r? ```@alexcrichton```
Configuration menu - View commit details
-
Copy full SHA for 7b9ef2f - Browse repository at this point
Copy the full SHA 7b9ef2fView commit details -
Rollup merge of rust-lang#82091 - henryboisdequin:use-place-ref-more,…
… r=RalfJung use PlaceRef abstractions more consistently Addresses this [comment](https://github.com/rust-lang/rust/pull/80865/files#r558978715) Associated issue: rust-lang#80647 r? ```@RalfJung```
Configuration menu - View commit details
-
Copy full SHA for cc07061 - Browse repository at this point
Copy the full SHA cc07061View commit details -
Rollup merge of rust-lang#82128 - anall:feature/add_diagnostic_items,…
… r=davidtwco add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice This is adding diagnostic items to be used by rust-lang/rust-clippy#6730, but my understanding is the clippy-side change does need to be done over there since I am adding a new clippy feature. Add diagnostic items to the following types: OsString (os_string_type) PathBuf (path_buf_type) Owned (to_owned_trait) As well as the to_vec method on slice/[T]
Configuration menu - View commit details
-
Copy full SHA for b8d4354 - Browse repository at this point
Copy the full SHA b8d4354View commit details -
Rollup merge of rust-lang#82166 - kaniini:s390x-musl-target, r=nagisa
add s390x-unknown-linux-musl target This is the first step in bringup for Rust on s390x. The libc and std crates need modifications as well, but getting this upstream makes that work easier.
Configuration menu - View commit details
-
Copy full SHA for 8979fd4 - Browse repository at this point
Copy the full SHA 8979fd4View commit details -
Rollup merge of rust-lang#82234 - GuillaumeGomez:remove-query-param-o…
…n-esc, r=Nemo157 Remove query parameters when skipping search results Fixes rust-lang#81330. This PR changes the following: when pressing ESC and that no other "action" was performed (understand: no closing the search result, or hiding a menu or something along the line), then we discard the URL query parameters (the `?whatever=dsjfs`). What do you think about this change ```@rust-lang/rustdoc``` ? EDIT: finally we're simply removing the query parameter when we're skipping the search results. r? ```@Nemo157```
Configuration menu - View commit details
-
Copy full SHA for 8541435 - Browse repository at this point
Copy the full SHA 8541435View commit details -
Rollup merge of rust-lang#82255 - nhwn:nonzero-err-as-bug, r=davidtwco
Make `treat_err_as_bug` Option<NonZeroUsize> `rustc -Z treat-err-as-bug=N` already requires `N` to be nonzero when the argument is parsed, so changing the type from `Option<usize>` to `Option<NonZeroUsize>` is a low-hanging fruit in terms of layout optimization.
Configuration menu - View commit details
-
Copy full SHA for 0e5bca5 - Browse repository at this point
Copy the full SHA 0e5bca5View commit details