-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 7 pull requests #74493
Rollup of 7 pull requests #74493
Commits on Jun 26, 2020
-
Configuration menu - View commit details
-
Copy full SHA for ba6857d - Browse repository at this point
Copy the full SHA ba6857dView commit details
Commits on Jul 14, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 18be370 - Browse repository at this point
Copy the full SHA 18be370View commit details
Commits on Jul 16, 2020
-
Fix small nits, clarfying some confusing vocabulary and using more co…
…nsistent wording
Configuration menu - View commit details
-
Copy full SHA for 8a2f147 - Browse repository at this point
Copy the full SHA 8a2f147View commit details
Commits on Jul 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0bac361 - Browse repository at this point
Copy the full SHA 0bac361View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fefa2c - Browse repository at this point
Copy the full SHA 4fefa2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f28d59 - Browse repository at this point
Copy the full SHA 2f28d59View commit details -
Configuration menu - View commit details
-
Copy full SHA for c45e9c8 - Browse repository at this point
Copy the full SHA c45e9c8View commit details
Commits on Jul 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 6cd164f - Browse repository at this point
Copy the full SHA 6cd164fView commit details -
Configuration menu - View commit details
-
Copy full SHA for de03a12 - Browse repository at this point
Copy the full SHA de03a12View commit details -
rustc_metadata: Remove some extra diagnostics for legacy plugins
They are deprecated so doing extra work for error recovery doesn't make sense
Configuration menu - View commit details
-
Copy full SHA for 926ac5a - Browse repository at this point
Copy the full SHA 926ac5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4044cbc - Browse repository at this point
Copy the full SHA 4044cbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a4217d - Browse repository at this point
Copy the full SHA 0a4217dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 09240a4 - Browse repository at this point
Copy the full SHA 09240a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f08aae6 - Browse repository at this point
Copy the full SHA f08aae6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30b8835 - Browse repository at this point
Copy the full SHA 30b8835View commit details -
Rollup merge of rust-lang#70817 - yoshuawuyts:task-ready, r=dtolnay
Add core::task::ready! macro This PR adds `ready!` as a top-level macro to `libcore` following the implementation of `futures_core::ready`, tracking issue rust-lang#70922. This macro is commonly used when implementing `Future`, `AsyncRead`, `AsyncWrite` and `Stream`. And being only 5 lines, it seems like a useful and straight forward addition to std. ## Example ```rust use core::task::{Context, Poll}; use core::future::Future; use core::pin::Pin; async fn get_num() -> usize { 42 } pub fn do_poll(cx: &mut Context<'_>) -> Poll<()> { let mut f = get_num(); let f = unsafe { Pin::new_unchecked(&mut f) }; let num = ready!(f.poll(cx)); // ... use num Poll::Ready(()) } ``` ## Naming In `async-std` we chose to nest the macro under the `task` module instead of having the macro at the top-level. This is a pattern that currently does not occur in std, mostly due to this not being possible prior to Rust 2018. This PR proposes to add the `ready` macro as `core::ready`. But another option would be to introduce it as `core::task::ready` since it's really only useful when used in conjunction with `task::{Context, Poll}`. ## Implementation questions I tried rendering the documentation locally but the macro didn't show up under `core`. I'm not sure if I quite got this right. I used the [`todo!` macro PR](https://github.com/rust-lang/rust/pull/56348/files) as a reference, and our approaches look similar. ## References - [`futures::ready`](https://docs.rs/futures/0.3.4/futures/macro.ready.html) - [`async_std::task::ready`](https://docs.rs/async-std/1.5.0/async_std/task/index.html) - [`futures_core::ready`](https://docs.rs/futures-core/0.3.4/futures_core/macro.ready.html)
Configuration menu - View commit details
-
Copy full SHA for 479c8ad - Browse repository at this point
Copy the full SHA 479c8adView commit details -
Rollup merge of rust-lang#73762 - poliorcetics:trait-keyword, r=KodrAus
Document the trait keyword Partial fix of rust-lang#34601. This document the trait keyword. To avoid doing too much and forcing more updates as functionalities evolve, I put two links to the reference, especially for trait objects. This mainly documents the "big" parts, not so much the small details that might trip someone experimenting. @rustbot modify labels: T-doc,C-enhancement
Configuration menu - View commit details
-
Copy full SHA for a6266e2 - Browse repository at this point
Copy the full SHA a6266e2View commit details -
Rollup merge of rust-lang#74021 - 1011X:master, r=dtolnay
impl Index<RangeFrom> for CStr This change implements (partial) slicing for `CStr`. Since a `CStr` must end in a null byte, it's not possible to trim from the right and still have a valid `CStr`. But, it *is* possible to trim from the left. This lets us be a bit more flexible and treat them more like strings. ```rust let string = CStr::from_bytes_with_nul(b"Hello World!\0"); let result = CStr::from_bytes_with_nul(b"World!\0"); assert_eq!(&string[6..], result); ```
Configuration menu - View commit details
-
Copy full SHA for f305b20 - Browse repository at this point
Copy the full SHA f305b20View commit details -
Rollup merge of rust-lang#74071 - petrochenkov:cload3, r=matthewjasper
rustc_metadata: Make crate loading fully speculative Instead of reporting `span_err`s on the spot crate loading errors are now wrapped into the `CrateError` enum and returned, so they are reported only at the top level `resolve_crate` call, and not reported at all if we are resolving speculatively with `maybe_resolve_crate`. As a result we can attempt loading crates for error recovery (e.g. import suggestions) without any risk of producing extra errors. Also, this means better separation between error reporting and actual logic. Fixes rust-lang#55103 Fixes rust-lang#56590
Configuration menu - View commit details
-
Copy full SHA for 43ba840 - Browse repository at this point
Copy the full SHA 43ba840View commit details -
Rollup merge of rust-lang#74445 - lcnr:const-generic-ty-decl, r=Dylan…
…-DPC add test for rust-lang#62878 forgot to push this as part of rust-lang#74159 r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for 1a54b61 - Browse repository at this point
Copy the full SHA 1a54b61View commit details -
Rollup merge of rust-lang#74459 - canova:const-unreachable-unchecked,…
… r=oli-obk Make unreachable_unchecked a const fn This PR makes `std::hint::unreachable_unchecked` a const fn so we can use it inside a const function. r? @RalfJung Fixes rust-lang#53188.
Configuration menu - View commit details
-
Copy full SHA for 2fad396 - Browse repository at this point
Copy the full SHA 2fad396View commit details -
Rollup merge of rust-lang#74478 - rust-lang:revert-74416-linker-local…
…e-utf8, r=Mark-Simulacrum Revert "Use an UTF-8 locale for the linker." Reverts rust-lang#74416 This is suspected to have caused significant compile time regressions: https://perf.rust-lang.org/compare.html?start=39d5a61f2e4e237123837f5162cc275c2fd7e625&end=d3df8512d2c2afc6d2e7d8b5b951dd7f2ad77b02&stat=instructions:u
Configuration menu - View commit details
-
Copy full SHA for a83e294 - Browse repository at this point
Copy the full SHA a83e294View commit details