about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2023-07-31Rollup merge of #112858 - chriswailes:riscv64-android, r=Mark-SimulacrumMatthias Krüger-1/+1
Update Android system definitions and add riscv-linux-android as tier 3 target This PR includes the following: * Corrected Android system definitions for some types * Support for the riscv64-linux-android target The authoritative types for the system definitions can be found here: https://cs.android.com/android/platform/superproject/+/master:bionic/libc/include/sys/stat.h Fixes rust-lang/compiler-team#640
2023-07-31I'm mathematically challengedltdk-2/+2
2023-07-31Work around missing <*str>::lenMatt Fellenz-4/+4
2023-07-31impl SliceIndex<str> for (Bound<usize>, Bound<usize>)Matt Fellenz-4/+56
2023-07-31Can't compare usize and u32ltdk-2/+2
2023-07-31Use u32::from for MIN/MAX examplesltdk-2/+2
2023-07-31Add note on gap for MIN/MAXltdk-0/+35
2023-07-31Add char::MINltdk-0/+15
2023-07-31Add gamma and ln_gamma functions to f32 and f64Andrew Kane-1/+158
2023-07-31Clean up SGX user memory copiesJethro Beekman-122/+85
2023-07-31`waitqueue` clarifications for SGX platformRaoul Strackx-4/+12
2023-07-31Implement UnwindSafe and RefUnwindSafe for BacktraceKonrad Borowski-1/+9
Backtrace doesn't have visible mutable state.
2023-07-31remove repetitive wordscui fliter-2/+2
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-07-30Rollup merge of #114268 - SUPERCILEX:empty, r=workingjubileeJubilee-2/+2
Fix empty_write since rust version attribute Fixup of https://github.com/rust-lang/rust/pull/98154 for the rust version. r? ``@workingjubilee``
2023-07-30Rollup merge of #109075 - joboet:lazylock_backtrace, r=workingjubileeJubilee-49/+25
Use `LazyLock` to lazily resolve backtraces By using TAIT to name the initializing closure, `LazyLock` can be used to replace the current `LazilyResolvedCapture`.
2023-07-30Rollup merge of #95965 - CAD97:const-weak-new, r=workingjubileeJubilee-2/+2
Stabilize const-weak-new This is a fairly uncontroversial library stabilization, so I'm going ahead and proposing it to ride the trains to stable. This stabilizes the following APIs, which are defined to be non-allocating constructors. ```rust // alloc::rc impl<T> Weak<T> { pub const fn new() -> Weak<T>; } // alloc::sync impl<T> Weak<T> { pub const fn new() -> Weak<T>; } ``` Closes #95091 ``@rustbot`` modify labels: +needs-fcp
2023-07-30Stabilize const-weak-newCAD97-2/+2
Bump its stabilization version several times along the way to accommodate changes in release processes. Co-authored-by: Mara Bos <m-ou.se@m-ou.se> Co-authored-by: Trevor Gross <t.gross35@gmail.com>
2023-07-30Auto merge of #112843 - chenyukang:yukang-more-on-backtrace, r=workingjubileebors-0/+19
Print omitted frames count for short backtrace mode Fixes #111730
2023-07-30Fix empty_write since rust version attributeAlex Saveau-2/+2
2023-07-30Rollup merge of #102198 - lukas-code:nonnull_as_ref, r=AmanieuMatthias Krüger-2/+3
`const`-stablilize `NonNull::as_ref` A bunch of pointer to reference methods have been made unstably const some time ago in #91823 under the feature gate `const_ptr_as_ref`. Out of these, `NonNull::as_ref` can be implemented as a `const fn` in stable rust today, so i hereby propose to const stabilize this function only. Tracking issue: #91822 ``@rustbot`` label +T-libs-api -T-libs
2023-07-30Rollup merge of #98154 - vidhanio:master, r=workingjubileeMatthias Krüger-26/+87
merge functionality of `io::Sink` into `io::Empty` Many times, there is a need for a simple dummy `io::Read`er + `io::Write`r, but currently the only options are `io::Empty` and `io::Sink` respectively. Having both of their functionality together requires writing your own boilerplate for something that makes sense to have in the standard library. This PR adds the functionality of `io::Sink` to `io::Empty`, making `io::Empty` be able to perform the tasks of both of the previous structs. (This idea was first mentioned in #24235) Note: I also updated some doc comments in `io::utils` in this pull request to fix inconsistencies between `io::Sink` and `io::Empty`. API Change Proposal: https://github.com/rust-lang/libs-team/issues/49
2023-07-30Explain more clearly why `fn() -> T` can't be `#[derive(Clone)]`Martin Nordholts-0/+40
2023-07-30Avoid using ptr::Unique in LinkedList codeRyan Lowe-11/+13
2023-07-30Rollup merge of #114223 - ryanoneill:vec-indexing-doc-language, r=workingjubileeMatthias Krüger-1/+1
Documentation: Fix Stilted Language in Vec->Indexing Problem Language in the Vec->Indexing documentation sounds stilted due to incorrect word ordering: "... type allows to access values by index." Solution Reorder words in the Vec->Indexing documentation to flow better: "... type allows access to values by index." The phrase "allows access to" also matches other existing documentation.
2023-07-30Rollup merge of #112655 - WaffleLapkin:must_use_map_or, r=workingjubileeMatthias Krüger-0/+2
Mark `map_or` as `#[must_use]` I don't know what else to say. r? libs
2023-07-30Rollup merge of #110056 - chenyukang:yukang/fix-110045, r=workingjubileeMatthias Krüger-10/+8
Fix the example in document for WaitTimeoutResult::timed_out Fixes #110045
2023-07-30Mark `map_or` as `#[must_use]`Maybe Waffle-0/+2
2023-07-30rand use getrandom for freebsd (available since 12.x)David Carlier-9/+7
2023-07-30Fix the example in document for WaitTimeoutResult::timed_outyukang-10/+8
2023-07-30Fix implementation of `Duration::checked_div`Jacob Pratt-4/+5
2023-07-30Auto merge of #114236 - fee1-dead-contrib:rollup-m92j7q1, r=fee1-deadbors-3/+16
Rollup of 3 pull requests Successful merges: - #112151 (Clarify behavior of inclusive bounds in BTreeMap::{lower,upper}_bound) - #113512 (Updated lines doc to include trailing carriage return note) - #114203 (Effects: don't print `host` param in diagnostics) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-30Rollup merge of #113512 - vallentin:lines-doc, r=workingjubileefee1-dead-3/+8
Updated lines doc to include trailing carriage return note Updated `str::lines` doc to include explicit info about (trailing) carriage returns. Reference: #100311
2023-07-30Rollup merge of #112151 - chloekek:patch-1, r=workingjubileefee1-dead-0/+8
Clarify behavior of inclusive bounds in BTreeMap::{lower,upper}_bound It wasn’t quite clear to me how these methods would interpret inclusive bounds so I added examples for those.
2023-07-30Auto merge of #112280 - zica87:master, r=workingjubileebors-13/+0
Remove redundant example of `BTreeSet::iter` The usage and that `Values returned by the iterator are returned in ascending order` are already demonstrated by the other example and the description, so I removed the useless one.
2023-07-29Documentation: Fix Stilted Language in Vec->IndexingRyan O'Neill-1/+1
Problem Language in the Vec->Indexing documentation sounds stilted due to incorrect word ordering: "... type allows to access values by index." Solution Reorder words in the Vec->Indexing documentation to flow better: "... type allows access to values by index." The phrase "allows access to" also matches other existing documentation.
2023-07-29Add wasm32-wasi-threads target + WASI threadsGeorgii Rylov-12/+141
2023-07-29print omitted frames count for short backtrace modeyukang-0/+19
2023-07-29Adjust some tests for invalid_reference_casting improvementsUrgau-1/+2
2023-07-29Change default panic handler message format.Mara Bos-8/+13
2023-07-29Auto merge of #113099 - bvanjoi:fix-112713-2, r=petrochenkovbors-1/+2
fix(resolve): update the ambiguity glob binding as warning recursively Fixes #47525 Fixes #56593, but `issue-56593-2.rs` is not fixed to ensure backward compatibility. Fixes #98467 Fixes #105235 Fixes #112713 This PR had added a field called `warn_ambiguous` in `NameBinding` which is only for back compatibly reason and used for lint. More details: https://github.com/rust-lang/rust/pull/112743 r? `@petrochenkov`
2023-07-29Auto merge of #114197 - matthiaskrgr:rollup-iluf7u4, r=matthiaskrgrbors-56/+4
Rollup of 7 pull requests Successful merges: - #113773 (Don't attempt to compute layout of type referencing error) - #114107 (Prevent people from assigning me as a PR reviewer) - #114124 (tests/ui/proc-macro/*: Migrate FIXMEs to check-pass) - #114171 (Fix switch-stdout test for none unix/windows platforms) - #114172 (Fix issue_15149 test for the SGX target) - #114173 (btree/map.rs: remove "Basic usage" text) - #114174 (doc: replace wrong punctuation mark) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-29Rollup merge of #114174 - tshepang:patch-6, r=workingjubileeMatthias Krüger-1/+1
doc: replace wrong punctuation mark
2023-07-29Rollup merge of #114173 - tshepang:patch-1, r=workingjubileeMatthias Krüger-54/+0
btree/map.rs: remove "Basic usage" text Not useful, for there is just a single example
2023-07-29Rollup merge of #114172 - fortanix:raoul/fix_process-spawning_test, ↵Matthias Krüger-0/+2
r=workingjubilee Fix issue_15149 test for the SGX target PR https://github.com/rust-lang/rust/pull/112390 moved tests to std. Unfortunately, this caused the `issue_15149` test to be enabled for the SGX target. This is incorrect as the SGX target does not support the `env::current_exe()` call.
2023-07-29Rollup merge of #114171 - fortanix:raoul/fix_switch-stdout_test, ↵Matthias Krüger-1/+1
r=workingjubilee Fix switch-stdout test for none unix/windows platforms PR #112390 moved tests to std. Unfortunately, there is a typo which causes issues on platforms other than unix and windows.
2023-07-29Auto merge of #111916 - fee1-dead-contrib:noop-method-call-warn, ↵bors-0/+1
r=compiler-errors make `noop_method_call` warn by default r? `@compiler-errors`
2023-07-28inline trivial (noop) flush callsThom Chiovoloni-0/+13
2023-07-28Rollup merge of #114128 - estebank:delayed-span-bug-dump, r=davidtwcoMatthias Krüger-1/+1
When flushing delayed span bugs, write to the ICE dump file even if it doesn't exist Fix #113881.
2023-07-29library: allow `ambiguous_glob_reexports` for `core_arch`bohan-1/+2
2023-07-28Fix issue_15149 test for the SGX targetRaoul Strackx-0/+2