- 16 6月, 2021 3 次提交
-
-
由 Yuki Okushi 提交于
-
由 bors 提交于
Rollup of 10 pull requests Successful merges: - #80269 (Explain non-dropped sender recv in docs) - #82179 (Add functions `Duration::try_from_secs_{f32, f64}`) - #85608 (Stabilize `ops::ControlFlow` (just the type)) - #85792 (Refactor windows sockets impl methods) - #86220 (Improve maybe_uninit_extra docs) - #86277 (Remove must_use from ALLOWED_ATTRIBUTES) - #86285 (
⬆ rust-analyzer) - #86294 (Stabilize {std, core}::prelude::rust_*.) - #86306 (Add mailmap entries for myself) - #86314 (Remove trailing triple backticks in `mut_keyword` docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup -
由 bors 提交于
Update Miri Fixes #86316 Fixes #86261 r? `@RalfJung`
-
- 15 6月, 2021 23 次提交
-
-
由 hyd-dev 提交于
-
由 Yuki Okushi 提交于
Remove trailing triple backticks in `mut_keyword` docs
-
由 Yuki Okushi 提交于
Add mailmap entries for myself
-
由 Yuki Okushi 提交于
Stabilize {std, core}::prelude::rust_*. This stabilizes the `{core, std}::prelude::{rust_2015, rust_2018, rust_2021}` modules. The usage of these modules as the prelude in those editions was already stabilized. This just stabilizes the modules themselves, making it possible for a user to explicitly refer to them. Tracking issue: https://github.com/rust-lang/rust/issues/85684 FCP on the RFC that included this finished here: https://github.com/rust-lang/rfcs/pull/3114#issuecomment-840577395
-
由 Yuki Okushi 提交于
⬆ rust-analyzer -
由 Yuki Okushi 提交于
Remove must_use from ALLOWED_ATTRIBUTES This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods, particularly when the attribute has a long string value. As discussed in #84309. Partially addresses #81482. r? ```@Manishearth```
-
由 Yuki Okushi 提交于
Improve maybe_uninit_extra docs For reasoning, see https://github.com/rust-lang/rust/issues/63567#issuecomment-858640987
-
由 Yuki Okushi 提交于
Refactor windows sockets impl methods No behavioural changes, but a bit tidier visual flow.
-
由 Yuki Okushi 提交于
Stabilize `ops::ControlFlow` (just the type) Tracking issue: https://github.com/rust-lang/rust/issues/75744 (which also tracks items *not* closed by this PR). With the new `?` desugar implemented, [it's no longer possible to mix `Result` and `ControlFlow`](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=13feec97f5c96a9d791d97f7de2d49a6). (At the time of making this PR, godbolt was still on the 2021-05-01 nightly, where you can see that [the mixing example compiled](https://rust.godbolt.org/z/13Ke54j16).) That resolves the only blocker I know of, so I'd like to propose that `ControlFlow` be considered for stabilization. Its basic existence was part of https://github.com/rust-lang/rfcs/pull/3058, where it got a bunch of positive comments (examples [1](https://github.com/rust-lang/rfcs/pull/3058#issuecomment-758277325) [2](https://github.com/rust-lang/rfcs/pull/3058#pullrequestreview-592106494) [3](https://github.com/rust-lang/rfcs/pull/3058#issuecomment-784444155) [4](https://github.com/rust-lang/rfcs/pull/3058#issuecomment-797031584)). Its use in the compiler has been well received (https://github.com/rust-lang/rust/pull/78182#issuecomment-713695594), and there are ecosystem updates interested in using it (https://github.com/rust-itertools/itertools/issues/469#issuecomment-677729589, https://github.com/jonhoo/rust-imap/issues/194). As this will need an FCP, picking a libs member manually: r? `@m-ou-se` ## Stabilized APIs ```rust #[derive(Debug, Clone, Copy, PartialEq)] pub enum ControlFlow<B, C = ()> { /// Exit the operation without running subsequent phases. Break(B), /// Move on to the next phase of the operation as normal. Continue(C), } ``` As well as using `?` on a `ControlFlow<B, _>` in a function returning `ControlFlow<B, _>`. (Note, in particular, that there's no `From::from`-conversion on the `Break` value, the way there is for `Err`s.) ## Existing APIs *not* stabilized here All the associated methods and constants: `break_value`, `is_continue`, `map_break`, [`CONTINUE`](https://doc.rust-lang.org/nightly/std/ops/enum.ControlFlow.html#associatedconstant.CONTINUE), etc. Some of the existing methods in nightly seem reasonable, some seem like they should be removed, and some need more discussion to decide. But none of them are *essential*, so [as in the RFC](https://rust-lang.github.io/rfcs/3058-try-trait-v2.html#methods-on-controlflow), they're all omitted from this PR. They can be considered separately later, as further usage demonstrates which are important.
-
由 Yuki Okushi 提交于
Add functions `Duration::try_from_secs_{f32, f64}` These functions allow constructing a Duration from a floating point value that could be out of range without panicking. Tracking issue: #83400
-
由 Yuki Okushi 提交于
Explain non-dropped sender recv in docs Original senders that are still hanging around could cause Receiver::recv to not block since this is a potential footgun for beginners, clarify more on this in the docs for readers to be aware about it. Maybe it would be better to show an example of the pattern where `drop(tx)` is used when it is being cloned multiple times? Although I have seen it in quite a few articles but I am surprised that this part is not very clear with the current words without careful reading. > If the corresponding Sender has disconnected, or it disconnects while this call is blocking, this call will wake up and return Err to indicate that no more messages can ever be received on this channel. However, since channels are buffered, messages sent before the disconnect will still be properly received. Some words there may seemed similar if I carefully read and relate it but if I am new, I probably does not know "drop" makes it "disconnected". So I mention the words "drop" and "alive" to make it more relatable to lifetime.
-
由 bors 提交于
Use the now available implementation of `IntoIterator` for arrays
-
由 bors 提交于
Update RELEASES.md for 1.53.0 ### [Rendered](https://github.com/XAMPPRocky/rust/blob/relnotes_1.53.0/RELEASES.md) r? `@Mark-Simulacrum` cc `@rust-lang/release`
-
由 bors 提交于
rustdoc: revert deref recur to resume inclusion of impl ExtTrait<Local> for ExtType As discussed here: https://github.com/rust-lang/rust/issues/82465#issuecomment-829290384, Revert PR #80653 to resolve issue #82465. Issue #82465 was we had stopped including certain trait implementations, namely implementations on an imported type of an imported trait *instantiated on a local type*. That bug was injected by PR #80653. Reverting #80653 means we don't list all the methods that you have accessible via recursively applying `Deref`. [Discussion in last week's rustc triage meeting](https://zulip-archive.rust-lang.org/238009tcompilermeetings/19557weekly2021042954818.html#236680594) led us to conclude that the bug was worse than the enhancement, and there was not an obvious fix for the bug itself. So for the short term we remove the enhancement, while in the long term we will work on figuring out a way to have our imported trait implementation cake and eat it too.
-
由 Lukas Wirth 提交于
-
由 LeSeulArtichaut 提交于
-
由 bors 提交于
Improve CTFE UB validation error messages As mentioned in https://github.com/rust-lang/rust/pull/86245#discussion_r650494012 this PR slightly improves the formatting of validation errors, to move the path to the error prefix. From: `type validation failed: encountered invalid vtable: size is bigger than largest supported object at .0` To: `type validation failed at .0: encountered invalid vtable: size is bigger than largest supported object`.
-
由 LeSeulArtichaut 提交于
-
由 Scott McMurray 提交于
-
由 bors 提交于
Fix force-warns to allow dashes. The `--force-warns` flag was not allowing lint names with dashes, only supporting underscores. This changes it to allow dashes to match the behavior of the A/W/D/F flags.
-
由 Rémy Rakic 提交于
-
由 Rémy Rakic 提交于
- 14 6月, 2021 14 次提交
-
-
由 Mara Bos 提交于
-
由 bors 提交于
Stabilize `maybe_uninit_ref` This stabilizes `assume_init_{ref,mut}`. FCP is complete: https://github.com/rust-lang/rust/issues/63568#issuecomment-590121300 The renaming was done by #76047 and FIXME was resolved by #76241, so I think we can now stabilize them finally
🎉 Still, it's const-unstable as `assert_inhabited` is unstable. Closes #63568 -
由 mbartlett21 提交于
`Duration::from_secs_{f32, f64}` now use the results from the non-panicking functions and unwrap it.
-
由 mbartlett21 提交于
This also adds the error type used, `FromSecsError` and its `impl`s.
-
由 est31 提交于
For reasoning, see https://github.com/rust-lang/rust/issues/63567#issuecomment-858640987
-
由 bors 提交于
Revert #85176 addition of `clone_from` for `ManuallyDrop` Forwarding `clone_from` to the inner value changes the observable behavior, as previously the inner value would *not* be dropped by the default implementation. Frankly, this is a super-niche case, so #85176 is welcome to argue the behavior should be otherwise! But if we overrride it, IMO documenting the behavior would be good. Example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c5d0856686fa850c1d7ee16891014efb
-
由 Laurențiu Nicola 提交于
-
由 Jacob Hoffman-Andrews 提交于
This is a fairly common attribute on methods, but is not something you need to know when reading the method docs - the purpose of the attribute is for the compiler to tell you about it if you forget to use a value. Removing reclaims some valuable space in the summary of methods.
-
由 bors 提交于
Fix typo `with custom a custom` -> `with a custom`
-
由 Rémy Rakic 提交于
-
由 Rémy Rakic 提交于
-
由 bors 提交于
Fix font weight Fixes #86256. I realized that the only cases where we actually needed to have bold text was inside `impl-items`. cc `@camelid` r? `@jsha`
-
由 Yuki Okushi 提交于
-
由 Guillaume Gomez 提交于
-