-
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 9 pull requests #82393
Rollup of 9 pull requests #82393
Commits on Feb 15, 2021
-
Add internal
collect_into_array[_unchecked]
to remove duplicate codeThis does not suggest adding such a function to the public API. This is just for the purpose of avoiding duplicate code. Many array methods already contained the same kind of code and there are still many array related methods to come (e.g. `Iterator::{chunks, map_windows, next_n, ...}`) which all basically need this functionality. Writing custom `unsafe` code for each of those seems not like a good idea.
Configuration menu - View commit details
-
Copy full SHA for c675af8 - Browse repository at this point
Copy the full SHA c675af8View commit details
Commits on Feb 17, 2021
-
std::src::os::raw: Refactor, introducing macro type_alias!
This file contained a lot of repetitive code. This was about to get considerably worse, with introduction of a slew of new aliases. No functional change. I've eyeballed the docs and they don't seem to have changed either. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for d6b9d9a - Browse repository at this point
Copy the full SHA d6b9d9aView commit details -
I'm pretty sure I am going want this for rust-lang#73125 and it seems like an omission that would be in any case good to remedy. It's a shame we don't have competent token pasting and case mangling for use in macro_rules!. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for e78b501 - Browse repository at this point
Copy the full SHA e78b501View commit details
Commits on Feb 20, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 447ce27 - Browse repository at this point
Copy the full SHA 447ce27View commit details -
Use the first paragraph, instead of cookie-cutter text, for rustdoc d…
…escriptions Fixes rust-lang#82283
Configuration menu - View commit details
-
Copy full SHA for 5538528 - Browse repository at this point
Copy the full SHA 5538528View commit details -
Cut off plain text descriptions after headers
Before: The Rust Standard LibraryThe Rust Standard Library is the foundation of portable Rust software, a set of minimal and battle-tested shared abstractions for the broader Rust ecosystem. It offers core types, like `Vec<T>` and `Option<T>`, library-defined operations on language primitives, standard macros, I/O and multithreading, among many other things. After: The Rust Standard Library
Configuration menu - View commit details
-
Copy full SHA for 1bedd4d - Browse repository at this point
Copy the full SHA 1bedd4dView commit details
Commits on Feb 21, 2021
-
This code wasn't actually working, and trying to SEO optimize that page is pointless anyway.
Configuration menu - View commit details
-
Copy full SHA for bcef5e7 - Browse repository at this point
Copy the full SHA bcef5e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b3b1c9 - Browse repository at this point
Copy the full SHA 8b3b1c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for dcf4991 - Browse repository at this point
Copy the full SHA dcf4991View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd5a710 - Browse repository at this point
Copy the full SHA fd5a710View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a85719 - Browse repository at this point
Copy the full SHA 6a85719View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60a9dcc - Browse repository at this point
Copy the full SHA 60a9dccView commit details -
remove unneccessary wrapping of return value of allow_unstable(), it …
…would always return Some(thing)
Configuration menu - View commit details
-
Copy full SHA for 4cb649b - Browse repository at this point
Copy the full SHA 4cb649bView commit details -
rustc_parse: remove unneccessary wrapping of return value in fn mk_ra…
…nge() which would always return Ok(..)
Configuration menu - View commit details
-
Copy full SHA for 12080dc - Browse repository at this point
Copy the full SHA 12080dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00bc134 - Browse repository at this point
Copy the full SHA 00bc134View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85bd00f - Browse repository at this point
Copy the full SHA 85bd00fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 393878b - Browse repository at this point
Copy the full SHA 393878bView commit details -
rustc_codegen_ssa: remove unneeded wrapping of return type of execute…
…_copy_from_cache_work_item (always returns Ok(..))
Configuration menu - View commit details
-
Copy full SHA for 76b9b16 - Browse repository at this point
Copy the full SHA 76b9b16View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9b90c0 - Browse repository at this point
Copy the full SHA a9b90c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1260883 - Browse repository at this point
Copy the full SHA 1260883View commit details -
Update src/test/rustdoc/description.rs
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Configuration menu - View commit details
-
Copy full SHA for a6b85fb - Browse repository at this point
Copy the full SHA a6b85fbView commit details -
Update src/test/rustdoc/description.rs
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Configuration menu - View commit details
-
Copy full SHA for 575c75b - Browse repository at this point
Copy the full SHA 575c75bView commit details -
remove redundant wrapping of return types of allow_internal_unstable(…
…) and rustc_allow_const_fn_unstable()
Configuration menu - View commit details
-
Copy full SHA for da9a588 - Browse repository at this point
Copy the full SHA da9a588View commit details -
Fix sizes of repr(C) enums on hexagon
Enums on hexagon use a smallest size (but at least 1 byte) that fits all the enumeration values. This is unlike many other ABIs where enums are at least 32 bits.
Configuration menu - View commit details
-
Copy full SHA for 7130e46 - Browse repository at this point
Copy the full SHA 7130e46View commit details
Commits on Feb 22, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 45673e2 - Browse repository at this point
Copy the full SHA 45673e2View commit details -
Rollup merge of rust-lang#82098 - LukasKalbertodt:add-collect-into-ar…
…ray, r=dtolnay Add internal `collect_into_array[_unchecked]` to remove duplicate code Unlike the similar PRs rust-lang#69985, rust-lang#75644 and rust-lang#79659, this PR only adds private functions and does not propose any new public API. The change is just for the purpose of avoiding duplicate code. Many array methods already contained the same kind of code and there are still many array related methods to come (e.g. `Iterator::{chunks, map_windows, next_n, ...}`, `[T; N]::{cloned, copied, ...}`, ...) which all basically need this functionality. Writing custom `unsafe` code for each of those doesn't seem like a good idea. I added two functions in this PR (and not just the `unsafe` version) because I already know that I need the `Option`-returning version for `Iterator::map_windows`. This is closely related to rust-lang#81615. I think that all options listed in that issue can be implemented using the function added in this PR. The only instance where `collect_array_into` might not be general enough is when the caller want to handle incomplete arrays manually. Currently, if `iter` yields fewer than `N` items, `None` is returned and the already yielded items are dropped. But as this is just a private function, it can be made more general in future PRs. And while this was not the goal, this seems to lead to better assembly for `array::map`: https://rust.godbolt.org/z/75qKTa (CC ``@JulianKnodt)`` Let me know what you think :) CC ``@matklad`` ``@bstrie``
Configuration menu - View commit details
-
Copy full SHA for 3cf201f - Browse repository at this point
Copy the full SHA 3cf201fView commit details -
Rollup merge of rust-lang#82228 - ijackson:nonzero-cint, r=KodrAus
Provide NonZero_c_* integers I'm pretty sure I am going want this for rust-lang#73125 and it seems like an omission that would be in any case good to remedy. <strike>Because the raw C types are in `std`, not `core`, to achieve this we must export the relevant macros from `core` so that `std` can use them. That's done with a new `num_internals` perma-unstable feature. The macros need to take more parameters for the module to get the types from and feature attributes to use. I have eyeballed the docs output for core, to check that my changes to these macros have made no difference to the core docs output.</strike>
Configuration menu - View commit details
-
Copy full SHA for a5f6668 - Browse repository at this point
Copy the full SHA a5f6668View commit details -
Rollup merge of rust-lang#82287 - r00ster91:field_name_and, r=petroch…
…enkov Make "missing field" error message more natural ```rust struct A { x: i32, y: i32, z: i32, } fn main() { A { }; } ``` ``` error[E0063]: missing fields `x`, `y`, `z` in initializer of `A` --> src/main.rs:8:5 | 8 | A { }; | ^ missing `x`, `y`, `z` ``` This error is now: ``` error[E0063]: missing fields `x`, `y` and `z` in initializer of `A` --> src/main.rs:8:5 | 8 | A { }; | ^ missing `x`, `y` and `z` ``` I thought it looked nicer and more natural this way. Also, if there is >3 fields missing, there is an "and" as well ("missing \`x\`, \`y\`, \`z\` *and* 1 other field"), but for <=3 there is not. As such it improves consistency too. As for the implementation, originally I ended up with a chunky `push_str` algorithm but then I figured I could just do the formatting manually since it's just 3 field names at maximum. It is comparatively readable. As a sidenote, one thing I was wondering about is, isn't there more cases where you have a list of things like field names? Maybe this whole thing can at some point later be made into a more general function to be used in multiple areas.
Configuration menu - View commit details
-
Copy full SHA for 20c1fa1 - Browse repository at this point
Copy the full SHA 20c1fa1View commit details -
Rollup merge of rust-lang#82351 - notriddle:docs-meta-description, r=…
…jyn514 Use the first paragraph, instead of cookie-cutter text, for rustdoc descriptions Partially addresses rust-lang#82283.
Configuration menu - View commit details
-
Copy full SHA for 1dba8ce - Browse repository at this point
Copy the full SHA 1dba8ceView commit details -
Rollup merge of rust-lang#82353 - camelid:no-more-param_env-cell, r=j…
…yn514 rustdoc: Remove unnecessary `Cell` around `param_env` r? `@jyn514`
Configuration menu - View commit details
-
Copy full SHA for 4dfe69a - Browse repository at this point
Copy the full SHA 4dfe69aView commit details -
Rollup merge of rust-lang#82367 - matthiaskrgr:wraps, r=petrochenkov
remove redundant option/result wrapping of return values If a function always returns `Ok(something)`, we can return `something` directly and remove the corresponding error handling in the callers. clippy::unnecessary_wraps
Configuration menu - View commit details
-
Copy full SHA for 1870b3b - Browse repository at this point
Copy the full SHA 1870b3bView commit details -
Rollup merge of rust-lang#82372 - RalfJung:unsafe-cell, r=KodrAus
improve UnsafeCell docs Sometimes [questions like this come up](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/UnsafeCells.20as.20raw.20pointers) because the UnsafeCell docs say "it's the only legal way to obtain aliasable data that is considered mutable". That is not entirely correct, since raw pointers also provide that option. So I propose we focus the docs on the interaction of `UnsafeCell` and *shared references* specifically, which is really where they are needed.
Configuration menu - View commit details
-
Copy full SHA for 7958166 - Browse repository at this point
Copy the full SHA 7958166View commit details -
Rollup merge of rust-lang#82379 - nagisa:nagisa/hexagon-enums, r=este…
…bank Fix sizes of repr(C) enums on hexagon Enums on hexagon use a smallest size (but at least 1 byte) that fits all the enumeration values. This is unlike many other ABIs where enums are at least 32 bits. Fixes rust-lang#82100
Configuration menu - View commit details
-
Copy full SHA for 50a2de2 - Browse repository at this point
Copy the full SHA 50a2de2View commit details -
Rollup merge of rust-lang#82382 - camelid:remove-fake_def_ids-refcell…
…, r=jyn514 rustdoc: Remove `fake_def_ids` RefCell
Configuration menu - View commit details
-
Copy full SHA for 86940be - Browse repository at this point
Copy the full SHA 86940beView commit details