about summary refs log tree commit diff
path: root/library/core
AgeCommit message (Collapse)AuthorLines
2022-12-22Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgrbors-6/+5
Rollup of 6 pull requests Successful merges: - #105837 (Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity) - #105932 (Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15) - #105960 (Various cleanups) - #105985 (Method chain nitpicks) - #105996 (Test that async blocks are `UnwindSafe`) - #106012 (Clarify that raw retags are not permitted in Mir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Auto merge of #106023 - JohnTitor:rollup-k8mettz, r=JohnTitorbors-13/+15
Rollup of 8 pull requests Successful merges: - #105584 (add assert messages if chunks/windows are length 0) - #105602 (interpret: add read_machine_[ui]size convenience methods) - #105824 (str.lines() docstring: clarify that line endings are not returned) - #105980 (Refer to "Waker" rather than "RawWaker" in `drop` comment) - #105986 (Fix typo in reading_half_a_pointer.rs) - #105995 (Add regression test for #96530) - #106008 (Sort lint_groups in no_lint_suggestion) - #106014 (Add comment explaining what the scrape-examples-toggle.goml GUI test is about) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Rollup merge of #106012 - JakobDegen:retag-raw, r=RalfJungMatthias Krüger-1/+0
Clarify that raw retags are not permitted in Mir Not sure when this changed, but documentation and the validator needed to be updated. This also removes raw retags from custom mir. cc rust-lang/miri#2735 r? `@RalfJung`
2022-12-22Rollup merge of #105960 - oli-obk:effect_cleanup, r=fee1-deadMatthias Krüger-5/+5
Various cleanups This PR pulls changes out of https://github.com/rust-lang/rust/pull/101900 that can land on master immediately r? ``@fee1-dead``
2022-12-22Rollup merge of #105980 - goffrie:waker-drop, r=thomccYuki Okushi-2/+2
Refer to "Waker" rather than "RawWaker" in `drop` comment In my view this is technically more correct as `Waker` actually implements `Drop` (which calls the `drop` method) whereas `RawWaker` does not.
2022-12-22Rollup merge of #105824 - zacchiro:patch-1, r=JohnTitorYuki Okushi-2/+4
str.lines() docstring: clarify that line endings are not returned Previously, the str.lines() docstring stated that lines are split at line endings, but not whether those were returned or not. This new version of the docstring states this explicitly, avoiding the need of getting to doctests to get an answer to this FAQ.
2022-12-22Rollup merge of #105584 - raffimolero:patch-1, r=JohnTitorYuki Okushi-9/+9
add assert messages if chunks/windows are length 0
2022-12-21Auto merge of #105613 - Nilstrieb:rename-assert_uninit_valid, r=RalfJungbors-4/+5
Rename `assert_uninit_valid` intrinsic It's not about "uninit" anymore but about "filling with 0x01 bytes" so the name should at least try to reflect that. This is actually not fully correct though, as it does still panic for all uninit with `-Zstrict-init-checks`. I'm not sure what the best way is to deal with that not causing confusion. I guess we could just remove the flag? I don't think having it makes a lot of sense anymore with the direction that we have chose to go. It could be relevant again if #100423 lands so removing it may be a bit over eager. r? `@RalfJung`
2022-12-21Clarify that raw retags are not permitted in MirJakob Degen-1/+0
2022-12-21Auto merge of #100390 - jhpratt:float-from-bool, r=dtolnaybors-0/+20
Implement `From<bool>` for f32, f64 As is required for trait implementations, these are insta-stable. Given there is a release tomorrow and this needs FCP, I set 1.65 as the stable version. `@rustbot` label +A-floating-point +C-feature-request +needs-fcp +relnotes +S-waiting-on-review +T-libs-api -T-libs
2022-12-21less specific wordingRalf Jung-2/+1
2022-12-20Refer to "Waker" rather than "RawWaker" in `drop` commentGeoffry Song-2/+2
2022-12-20Auto merge of #105381 - uweigand:s390x-ffi-vaarg, r=nikicbors-5/+50
Implement va_list and va_arg for s390x FFI Following the s390x ELF ABI and based on the clang implementation, provide appropriate definitions of va_list in library/core/src/ffi/mod.rs and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs. Fixes the following test cases on s390x: src/test/run-make-fulldeps/c-link-to-rust-va-list-fn src/test/ui/abi/variadic-ffi.rs Fixes https://github.com/rust-lang/rust/issues/84628.
2022-12-20Fix some `~const` usage in libcoreOli Scherer-5/+5
2022-12-19Update coerce_unsized tracking issue from #27732 to #18598Anders Kaseorg-19/+19
Issue #27732 was closed as a duplicate of #18598. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-12-19Implement va_list and va_arg for s390x FFIUlrich Weigand-5/+50
Following the s390x ELF ABI and based on the clang implementation, provide appropriate definitions of va_list in library/core/src/ffi/mod.rs and va_arg handling in compiler/rustc_codegen_llvm/src/va_arg.rs. Fixes the following test cases on s390x: src/test/run-make-fulldeps/c-link-to-rust-va-list-fn src/test/ui/abi/variadic-ffi.rs Fixes https://github.com/rust-lang/rust/issues/84628.
2022-12-19Rollup merge of #105915 - andrewpollack:revert-105250-async-rm-resumety, ↵Matthias Krüger-9/+2
r=tmandry Revert "Replace usage of `ResumeTy` in async lowering with `Context`" Reverts rust-lang/rust#105250 Fixes: #105501 Following instructions from [forge](https://forge.rust-lang.org/compiler/reviews.html#reverts). This change introduced a breaking change that is not actionable nor relevant, and is blocking updates to our toolchain. Along with other comments on the CL marking issues that are fixed by reverts, reverting is best until these issues can be resolved cc. `@Swatinem`
2022-12-19Revert "Replace usage of `ResumeTy` in async lowering with `Context`"Andrew Pollack-9/+2
2022-12-19docs: improve pin docsch-iv-1/+35
Co-authored-by: <@ch-iv>
2022-12-19Rollup merge of #105682 - thomcc:expose-ptr-fmt, r=RalfJungDylan DPC-2/+2
Use `expose_addr()` in `fmt::Pointer` Discussion in https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Should.20.60fmt.3A.3APointer.60.20expose.20the.20argument.3F on whether or not we should do this (still undecided). CC `@RalfJung`
2022-12-17Another `as_chunks` exampleScott McMurray-0/+11
I really liked this structure that dtolney brought up in #105316, so wanted to put it in the docs to help others use it.
2022-12-17Rollup merge of #105814 - JakobDegen:custom-mir-terms, r=oli-obkMatthias Krüger-2/+37
Support call and drop terminators in custom mir The only caveat with this change is that cleanup blocks are not supported. I would like to add them, but it's not quite clear to me what the best way to do that is, so I'll have to think about it some more. r? ``@oli-obk``
2022-12-17str.lines() docstring: clarify that line endings are not returnedStefano Zacchiroli-2/+4
Previously, the str.lines() docstring stated that lines are split at line endings, but not whether those were returned or not. This new version of the docstring states this explicitly, avoiding the need of getting to doctests to get an answer to this FAQ.
2022-12-16Support call and drop terminators in custom mirJakob Degen-2/+37
2022-12-16Fix intra-doc linkChris Denton-1/+1
2022-12-16Replace `Split*::as_str` with `remainder`Maybe Waffle-77/+96
This commit - Renames `Split*::{as_str -> remainder}` as it seems less confusing - Makes `remainder` return Option<&str> to distinguish between "iterator is exhausted" and "the tail is empty"
2022-12-16Rollup merge of #105748 - hakoerber:master, r=Dylan-DPCMatthias Krüger-4/+4
doc: Fix a few small issues Hey, while reading through the (awesome) stdlib docs, I found a few minor typos. * A few typos around generic types (`;` vs `,`) * Use inline code formatting for code fragments * One instance of wrong wording
2022-12-16SplitInternal: always set `finished` in `get_end`Maybe Waffle-7/+8
2022-12-15Auto merge of #105356 - JakobDegen:more-custom-mir, r=oli-obkbors-22/+240
Custom MIR: Many more improvements Commits are each atomic changes, best reviewed one at a time, with the exception that the last commit includes all the documentation. ### First commit Unsafetyck was not correctly disabled before for `dialect = "built"` custom MIR. This is fixed and a regression test is added. ### Second commit Implements `Discriminant`, `SetDiscriminant`, and `SwitchInt`. ### Third commit Implements indexing, field, and variant projections. ### Fourth commit Documents the previous commits and everything else. There is some amount of weirdness here due to having to beat Rust syntax into cooperating with MIR concepts, but it hopefully should not be too much. All of it is documented. r? `@oli-obk`
2022-12-15doc: Fix a few small issuesHannes Körber-4/+4
* A few typos around generic types (`;` vs `,`) * Use inline code formatting for code fragments * One instance of wrong wording
2022-12-15Implement `From<bool>` for f32, f64Jacob Pratt-0/+20
2022-12-14Auto merge of #105690 - matthiaskrgr:rollup-khtq97k, r=matthiaskrgrbors-1/+1
Rollup of 6 pull requests Successful merges: - #105642 (Minor grammar nit.) - #105658 (Remove ..X from RELEASES.md) - #105663 (Adjust log line in `fuchsia-test-runner.py`) - #105664 (rustdoc: apply `pre-wrap` CSS to code-wrapped links) - #105665 (rustdoc: simplify popover CSS) - #105676 (rustdoc: add CSS margin between `impl` docblock and its items) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-14Rollup merge of #105642 - uberFoo:master, r=Dylan-DPCMatthias Krüger-1/+1
Minor grammar nit. I was browsing the documentation and noticed that this should be an adverb.
2022-12-14Rollup merge of #105523 - estebank:suggest-collect-vec, r=compiler-errorsMatthias Krüger-0/+1
Suggest `collect`ing into `Vec<_>` Fix #105510.
2022-12-14Address documentation suggestionsJakob Degen-11/+13
2022-12-14Add documentation for custom mirJakob Degen-36/+224
2022-12-14Support more projections in custom mirJakob Degen-0/+22
2022-12-14Support common enum operations in custom mirJakob Degen-0/+6
2022-12-13Use `expose_addr()` in `fmt::Pointer`Thom Chiovoloni-2/+2
2022-12-13Improve wording for Option and ResultChris AtLee-8/+6
2022-12-13Add docs for question mark operator for OptionChris AtLee-0/+45
2022-12-13Suggest `collect`ing into `Vec<_>`Esteban Küber-0/+1
2022-12-13Rename `assert_uninit_valid` intrinsicNilstrieb-4/+6
It's not about "uninit" anymore but about "filling with 0x01 bytes" so the name should at least try to reflect that.
2022-12-13Add result example + rewordingFabian Hintringer-4/+8
2022-12-13Add #[inline] marker to OnceCell/LazyCell/OnceLock/LazyLockTrevor Gross-1/+16
2022-12-12Minor grammar nit.Keith T. Star-1/+1
2022-12-12Correct typos in `core::sync::Exclusive::get_{pin_mut, mut}`Albert Larsan-2/+2
2022-12-12add assert messages if chunks/windows are length 0raffimolero-9/+9
2022-12-11Auto merge of #105508 - eduardosm:ptr-methods-inline-always, r=Mark-Simulacrumbors-4/+4
Make pointer `sub` and `wrapping_sub` methods `#[inline(always)]` Splitted from https://github.com/rust-lang/rust/pull/105262
2022-12-11Use rint instead of roundevenJules Bertholet-5/+8
Use rint intrinsic instead of roundeven to impement `round_ties_even`. They do the same thing when rounding mode is default, which Rust assumes. And `rint` has better platform support. Keeps `roundeven` around in `core::intrinsics`, it's doing no harm there.