about summary refs log tree commit diff
path: root/library/core/src/ops/mod.rs
AgeCommit message (Collapse)AuthorLines
2025-09-27move Reborrow to ops, fix fmt issuesAapo Alasuutari-1/+1
2025-09-15fix: Move CoerceShared into opsAapo Alasuutari-0/+3
2025-06-12Tracking the old name of renamed unstable library attributexizheyin-1/+1
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-04-28AsyncDrop implementation using shim codegen of ↵Andrew Zhogin-1/+0
async_drop_in_place::{closure}, scoped async drop added.
2025-02-12add `IntoBounds` traitPeter Jaszkowiak-0/+2
for `range_into_bounds` feature, #136903
2025-02-04Add OneSidedRangeBound to eliminate panic in `split_point_of`Taylor Cramer-2/+2
See discussion in https://github.com/rust-lang/rust/pull/88502/files#r760177240
2024-11-27update cfgsBoxy-1/+0
2024-10-25Arbitrary self types v2: (unused) Receiver traitAdrian Taylor-0/+3
This commit contains a new Receiver trait, which is the basis for the Arbitrary Self Types v2 RFC. This allows smart pointers to be method receivers even if they're not Deref. This is currently unused by the compiler - a subsequent PR will start to use this for method resolution if the arbitrary_self_types feature gate is enabled. This is being landed first simply to make review simpler: if people feel this should all be in an atomic PR let me know. This is a part of the arbitrary self types v2 project, https://github.com/rust-lang/rfcs/pull/3519 https://github.com/rust-lang/rust/issues/44874 r? @wesleywiser
2024-10-22Rename Receiver -> LegacyReceiverAdrian Taylor-2/+2
As part of the "arbitrary self types v2" project, we are going to replace the current `Receiver` trait with a new mechanism based on a new, different `Receiver` trait. This PR renames the old trait to get it out the way. Naming is hard. Options considered included: * HardCodedReceiver (because it should only be used for things in the standard library, and hence is sort-of hard coded) * LegacyReceiver * TargetLessReceiver * OldReceiver These are all bad names, but fortunately this will be temporary. Assuming the new mechanism proceeds to stabilization as intended, the legacy trait will be removed altogether. Although we expect this trait to be used only in the standard library, we suspect it may be in use elsehwere, so we're landing this change separately to identify any surprising breakages. It's known that this trait is used within the Rust for Linux project; a patch is in progress to remove their dependency. This is a part of the arbitrary self types v2 project, https://github.com/rust-lang/rfcs/pull/3519 https://github.com/rust-lang/rust/issues/44874 r? @wesleywiser
2024-09-25Stabilize the `map`/`value` methods on `ControlFlow`Scott McMurray-1/+1
And fix the stability attribute on the `pub use` in `core::ops`.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-38/+17
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-01Step bootstrap cfgsMark Rousskov-1/+0
2024-04-16Add simple async drop glue generationzetanumbers-0/+3
Explainer: https://zetanumbers.github.io/book/async-drop-design.html https://github.com/rust-lang/rust/pull/121801
2024-03-25Require DerefPure for patternsMichael Goulet-0/+3
2023-12-25Add AsyncFn family of traitsMichael Goulet-0/+4
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-2/+2
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-10-20s/generator/coroutine/Oli Scherer-3/+3
2023-10-20s/Generator/Coroutine/Oli Scherer-1/+1
2022-12-19Update coerce_unsized tracking issue from #27732 to #18598Anders Kaseorg-1/+1
Issue #27732 was closed as a duplicate of #18598. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-12-10Correct wrong note for short circuiting operatorsest31-4/+4
They *are* representable by traits, even if the short-circuiting behaviour requires a different approach than the non-short-circuiting operators. For an example proposal, see the postponed RFC 2722. As it is not accurate, reword the note.
2022-09-19Optimize `array::IntoIter`Scott McMurray-0/+3
`.into_iter()` on arrays was slower than it needed to be (especially compared to slice iterator) since it uses `Range<usize>`, which needs to handle degenerate ranges like `10..4`. This PR adds an internal `IndexRange` type that's like `Range<usize>` but with a safety invariant that means it doesn't need to worry about those cases -- it only handles `start <= end` -- and thus can give LLVM more information to optimize better. I added one simple demonstration of the improvement as a codegen test.
2022-04-30Add `do yeet` expressions to allow experimentation in nightlyScott McMurray-0/+3
Using an obviously-placeholder syntax. An RFC would still be needed before this could have any chance at stabilization, and it might be removed at any point. But I'd really like to have it in nightly at least to ensure it works well with try_trait_v2, especially as we refactor the traits.
2021-12-02Make array::{try_from_fn, try_map} and Iterator::try_find generic over TryScott McMurray-0/+5
Fixes 85115 This only updates unstable functions. `array::try_map` didn't actually exist before, despite the tracking issue 79711 still being open from the old PR 79713.
2021-11-12add slice take methodsIbraheem Ahmed-0/+3
2021-08-21Remove the `TryV2` aliasScott McMurray-7/+1
Post-bootstrap-update cleanup.
2021-06-28Update to new bootstrap compilerMark Rousskov-11/+0
2021-05-19#[cfg(bootstrap)] out the v1 try_trait stuffScott McMurray-0/+2
2021-05-06Perf Experiment: Wait, what if I just skip the trait aliasScott McMurray-21/+0
2021-05-06Fix rustdoc::private-intra-doc-links errors in the docsScott McMurray-1/+1
2021-05-06Better rustc_on_unimplemented, and UI test fixesScott McMurray-2/+2
2021-05-06Actually implement the feature in the compilerScott McMurray-0/+10
Including all the bootstrapping tweaks in the library.
2021-05-06Bootstrapping preparation for the libraryScott McMurray-0/+19
Since just `ops::Try` will need to change meaning.
2021-04-17Add the try_trait_v2 library basicsScott McMurray-0/+7
No compiler changes as part of this -- just new unstable traits and impls thereof. The goal here is to add the things that aren't going to break anything, to keep the feature implementation simpler in the next PR.
2020-09-23Use Self more in core in doc when possibleAlexis Bourget-6/+6
2020-09-02Format ControlFlow changes with rustfmtLeonora Tindall-2/+2
2020-09-01Rename and expose LoopState as ControlFlowLeonora Tindall-0/+4
2020-08-21Remove links that get imported from the preludeLeSeulArtichaut-1/+1
2020-08-21Use intra-doc-links in `core::ops::*`LeSeulArtichaut-7/+1
2020-07-27mv std libs to library/mark-0/+199