about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2024-09-12Auto merge of #130281 - matthiaskrgr:rollup-1b2ibs8, r=matthiaskrgrbors-77/+34
Rollup of 5 pull requests Successful merges: - #130101 (some const cleanup: remove unnecessary attributes, add const-hack indications) - #130208 (Introduce `'ra` lifetime name.) - #130263 (coverage: Simplify creation of sum counters) - #130273 (more eagerly discard constraints on overflow) - #130276 (Add test for nalgebra hang in coherence) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-12Rollup merge of #130101 - RalfJung:const-cleanup, r=fee1-deadMatthias Krüger-77/+34
some const cleanup: remove unnecessary attributes, add const-hack indications I learned that we use `FIXME(const-hack)` on top of the "const-hack" label. That seems much better since it marks the right place in the code and moves around with the code. So I went through the PRs with that label and added appropriate FIXMEs in the code. IMO this means we can then remove the label -- Cc ``@rust-lang/wg-const-eval.`` I also noticed some const stability attributes that don't do anything useful, and removed them. r? ``@fee1-dead``
2024-09-12Document subtleties of `ManuallyDrop`Tim (Theemathas) Chirananthavat-11/+115
2024-09-12Stabilize `const_float_classify`Eduardo Sánchez Muñoz-31/+28
2024-09-12Auto merge of #129992 - alexcrichton:update-compiler-builtins, r=tgross35bors-4/+4
Update compiler-builtins to 0.1.125 This commit updates the compiler-builtins crate from 0.1.123 to 0.1.125. The changes in this update are: * https://github.com/rust-lang/compiler-builtins/pull/682 * https://github.com/rust-lang/compiler-builtins/pull/678 * https://github.com/rust-lang/compiler-builtins/pull/685
2024-09-12also update the wrapping_ docs to use similar wordingRalf Jung-20/+13
2024-09-12Rollup merge of #130160 - Scripter17:fix-slice-first_mut-doc, r=AmanieuStuart Cook-1/+1
Fix `slice::first_mut` docs Changes `pointer` to `reference` since that's the actual type it returns. `slice::last_mut` does correctly say "reference"
2024-09-12Rollup merge of #125060 - ChrisJefferson:pathbuf-doc, r=workingjubileeStuart Cook-0/+24
Expand documentation of PathBuf, discussing lack of sanitization Various methods in `PathBuf`, in particular `set_file_name` and `set_extension` accept strings which include path seperators (like `../../etc`). These methods just glue together strings, so you can end up with strange strings. This isn't reasonable to change/fix at this point, and might not even be fixable, but I think should be documented. In particular, you probably shouldn't blindly build paths using strings given by possibly malicious users.
2024-09-12simplify float::classify logicRalf Jung-109/+31
2024-09-11Fixup docs for PathBufJubilee Young-2/+2
2024-09-11Expand PathBuf documentationChris Jefferson-0/+24
Mention that some methods do not sanitize their input fully
2024-09-12Auto merge of #130183 - Marcondiro:unicode-16.0.0, r=Manishearthbors-708/+743
Bump Unicode to version 16.0.0 [Unicode 16.0.0 is out!](https://www.unicode.org/versions/Unicode16.0.0/) This PR updates Unicode data embedded in `core`.
2024-09-11Rollup merge of #130248 - nyurik:fix-129895, r=workingjubileeJubilee-1/+1
Limit `libc::link` usage to `nto70` target only, not NTO OS It seems QNX 7.0 does not support `linkat` at all (most tests were failing). Limiting to QNX 7.0 only, while using `linkat` for the future versions seems like the right path forward (tested on 7.0). Fixes #129895 CC: `@japaric` `@flba-eb` `@saethlin`
2024-09-11Rollup merge of #130168 - juliusl:pr/fix-win-fs-change-time-links, r=ChrisDentonJubilee-10/+14
maint: update docs for change_time ext and doc links maint: update docs for change_time ext and doc links Related: https://github.com/rust-lang/rust/issues/121478 r? tgross35
2024-09-11Rollup merge of #130077 - madsmtm:watchos-arm-unwind, r=workingjubileeJubilee-14/+18
Fix linking error when compiling for 32-bit watchOS In https://github.com/rust-lang/rust/pull/124494 (or https://github.com/rust-lang/rust/pull/124748), I mistakenly conflated "not SjLj" to mean "ARM EHABI", which isn't true, 32-bit watchOS uses a third unwinding method called "DWARF CFI". So this PR is effectively a revert of https://github.com/rust-lang/rust/pull/124494, with a few more comments explaining what's going on. Fixes https://github.com/rust-lang/rust/issues/130071. r? Mark-Simulacrum (since you reviewed the original)
2024-09-11Rollup merge of #129835 - RalfJung:float-tests, r=workingjubileeJubilee-34/+3
enable const-float-classify test, and test_next_up/down on 32bit x86 The test_next_up/down tests have been disabled on all 32bit x86 targets, which goes too far -- they should definitely work on our (tier 1) i686 target, it is only without SSE that we might run into trouble due to https://github.com/rust-lang/rust/issues/114479. However, I cannot reproduce that trouble any more -- maybe that got fixed by https://github.com/rust-lang/rust/pull/123351? The const-float-classify test relied on const traits "because we can", and got disabled when const traits got removed. That's an unfortunate reduction in test coverage of our float functionality, so let's restore the test in a way that does not rely on const traits. The const-float tests are actually testing runtime behavior as well, and I don't think that runtime behavior is covered anywhere else. Probably they shouldn't be called "const-float", but we don't have a `tests/ui/float` folder... should I create one and move them there? Are there any other ui tests that should be moved there? I also removed some FIXME referring to not use x87 for Rust-to-Rust-calls -- that has happened in #123351 so this got fixed indeed. Does that mean we can simplify all that float code again? I am not sure how to test it. Is running the test suite with an i586 target enough? Cc ```@tgross35``` ```@workingjubilee```
2024-09-11Rollup merge of #129696 - RalfJung:stdarch, r=AmanieuJubilee-0/+0
update stdarch The goal is mostly to pull in https://github.com/rust-lang/stdarch/pull/1633. r? ```@Amanieu```
2024-09-11Limit `libc::link` usage to `nto70` target only, not NTO OSYuri Astrakhan-1/+1
It seems QNX 7.0 does not support `linkat` at all (most tests were failing). Limiting to QNX 7.0 only, while using `linkat` for the future versions seems like the right path forward (tested on 7.0). Fixes 129895
2024-09-11various updates based on reviewRalf Jung-24/+38
2024-09-11make basic allocation functions track_caller in Miri for nicer backtracesRalf Jung-0/+14
2024-09-11chore: remove struct detailsJulius Liu-2/+2
2024-09-11Rollup merge of #130207 - GrigorenkoPV:ERROR_CANT_RESOLVE_FILENAME, ↵Matthias Krüger-0/+1
r=ChrisDenton Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop` cc #86442 As summarized in #130188, there seems to be a consensus that this should be done.
2024-09-11Rollup merge of #130206 - GrigorenkoPV:WSAEDQUOT, r=ChrisDentonMatthias Krüger-0/+1
Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded` cc #86442 As summarized in #130190, there seems to be a consensus that this should be done.
2024-09-11Rollup merge of #129866 - root-goblin:patch-1, r=workingjubileeMatthias Krüger-27/+35
Clarify documentation labelling and definitions for std::collections Page affected: https://doc.rust-lang.org/std/collections/index.html#performance Changes: - bulleted conventions - expanded definitions on terms used - more accessible language - more informative headings
2024-09-11chore: releasegithub-actions[bot]-1/+1
2024-09-11docs: remove struct infoJulius Liu-1/+1
2024-09-11ptr::add/sub: these are *not* equivalent to offset(count as isize)Ralf Jung-16/+19
2024-09-11use `naked_asm!` in `#[naked]` functionsFolkert de Vries-24/+15
2024-09-11update stdarchRalf Jung-0/+0
2024-09-11MaybeUninit::zeroed: mention that padding is not zeroedRalf Jung-0/+3
2024-09-10clean up internal comments about float semanticsRalf Jung-8/+3
- remove an outdated FIXME - add reference to floating-point semantics issue Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-09-10these tests seem to work fine on i586 these daysRalf Jung-26/+0
2024-09-10Auto merge of #129403 - scottmcm:only-array-simd, r=compiler-errorsbors-2/+2
Ban non-array SIMD Nearing the end of https://github.com/rust-lang/compiler-team/issues/621 ! Currently blocked on ~~https://github.com/rust-lang/compiler-builtins/pull/673~~ ~~https://github.com/rust-lang/compiler-builtins/pull/674~~ ~~https://github.com/rust-lang/rust/pull/129400~~ ~~https://github.com/rust-lang/rust/pull/129481~~ for windows.
2024-09-11Stabilize `std::io::ErrorKind::CrossesDevices`Pavel Grigorenko-1/+1
2024-09-10Clarify docs for std::collectionsJames Liu-27/+35
Page affected: https://doc.rust-lang.org/std/collections/index.html#performance Changes: - bulleted conventions - expanded definitions on terms used - more accessible language - merged Sequence and Map performance cost tables
2024-09-11Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop`Pavel Grigorenko-0/+1
2024-09-11Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded`Pavel Grigorenko-0/+1
2024-09-10Auto merge of #130025 - Urgau:missing_docs-expect, r=petrochenkovbors-0/+4
Also emit `missing_docs` lint with `--test` to fulfil expectations This PR removes the "test harness" suppression of the `missing_docs` lint to be able to fulfil `#[expect]` (expectations) as it is now "relevant". I think the goal was to maybe avoid false-positive while linting on public items under `#[cfg(test)]` but with effective visibility we should no longer have any false-positive. Another possibility would be to query the lint level and only emit the lint if it's of expect level, but that is even more hacky. Fixes https://github.com/rust-lang/rust/issues/130021 try-job: x86_64-gnu-aux
2024-09-10Bump unicode printable to version 16.0.0Marcondiro-57/+73
2024-09-10Bump unicode_data to version 16.0.0Marcondiro-651/+670
2024-09-10Auto merge of #130179 - workingjubilee:rollup-l78cv44, r=workingjubileebors-36/+57
Rollup of 11 pull requests Successful merges: - #128316 (Stabilize most of `io_error_more`) - #129473 (use `download-ci-llvm=true` in the default compiler config) - #129529 (Add test to build crates used by r-a on stable) - #129981 (Remove `serialized_bitcode` from `LtoModuleCodegen`.) - #130094 (Inform the solver if evaluation is concurrent) - #130132 ([illumos] enable SIGSEGV handler to detect stack overflows) - #130146 (bootstrap `naked_asm!` for `compiler-builtins`) - #130149 (Helper function for formatting with `LifetimeSuggestionPosition`) - #130152 (adapt a test for llvm 20) - #130162 (bump download-ci-llvm-stamp) - #130164 (move some const fn out of the const_ptr_as_ref feature) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-09Ban non-array SIMDScott McMurray-2/+2
2024-09-09Rollup merge of #130164 - RalfJung:const_ptr_as_ref, r=dtolnayJubilee-16/+16
move some const fn out of the const_ptr_as_ref feature When a `const fn` is still `#[unstable]`, it should generally use the same feature to track its regular stability and const-stability. Then when that feature moves towards stabilization we can decide whether the const-ness can be stabilized as well, or whether it should be moved into a new feature. Also, functions like `ptr::as_ref` (which returns an `Option<&mut T>`) require `is_null`, which is tricky and blocked on some design concerns (see #74939). So move those to the is_null feature gate, as they should be stabilized together with `ptr.is_null()`. Affects #91822, #122034, #75402, https://github.com/rust-lang/rust/issues/74939
2024-09-09Rollup merge of #130146 - folkertdev:bootstrap-naked-asm, r=AmanieuJubilee-0/+14
bootstrap `naked_asm!` for `compiler-builtins` tracking issue: https://github.com/rust-lang/rust/issues/90957 parent PR: https://github.com/rust-lang/rust/pull/128651 in this PR, `naked_asm!` is added as an alias for `asm!` with one difference: `options(noreturn)` is always enabled by `naked_asm!`. That makes it future-compatible for when `naked_asm!` starts disallowing `options(noreturn)` later. The `naked_asm!` macro must be introduced first so that we can upgrade `compiler-builtins` to use it, and can then change the implementation of `naked_asm!` in https://github.com/rust-lang/rust/pull/128651 I've added some usages for `naked_asm!` in the tests, so we can be confident that it works, but I've left upgrading the whole test suite to the parent PR. r? ``@Amanieu``
2024-09-09Rollup merge of #130132 - sunshowers:illumos-sigsegv, r=NoratriebJubilee-4/+11
[illumos] enable SIGSEGV handler to detect stack overflows Use the same code as Solaris. I couldn't find any tests regarding this, but I did test a stage0 build against my stack-exhaust-test binary [1]. Before: ``` running with use_stacker = No, new_thread = false, make_large_local = false zsh: segmentation fault (core dumped) cargo run ``` After: ``` running with use_stacker = No, new_thread = false, make_large_local = false thread 'main' has overflowed its stack fatal runtime error: stack overflow zsh: IOT instruction (core dumped) cargo +stage0 run ``` Fixes #128568. [1] https://github.com/sunshowers/stack-exhaust-test/
2024-09-09Rollup merge of #128316 - GrigorenkoPV:io_error_a_bit_more, r=dtolnayJubilee-16/+16
Stabilize most of `io_error_more` Sadly, venting my frustration with t-libs-api is not a constructive way to solve problems and get things done, so I will try to stick to stuff that actually matters here. - Tracking issue for this feature was opened 3 years ago: #86442 - FCP to stabilize it was completed 19(!!) months ago: https://github.com/rust-lang/rust/issues/86442#issuecomment-1368082102 - A PR with stabilization was similarly open for 19 months: #106375, but nothing ever came out of it. Presumably (it is hard to judge given the lack of communication) because a few of the variants still had some concerns voiced about them, even after the FCP. So, to highlight a common sentiment: > Maybe uncontroversial variants can be stabilised first and other variants (such as `QuotaExceeded` or `FilesystemLoop`) later? [^1] [^1]: https://github.com/rust-lang/rust/issues/106375#issuecomment-1435762236 > I would like to voice support stabilization of the uncontroversial variants. This would get those variants to stable and focus the discussion around the more controversial ones. I don't see any particular reason that all of these must be stabilized at the same time. [...] [^2] [^2]: https://github.com/rust-lang/rust/pull/106375#issuecomment-1742661555 > Maybe some less-controversial subset could be stabilized sooner? What’s blocking this issue from making progress? [^3] [^3]: https://github.com/rust-lang/rust/issues/86442#issuecomment-1691187483 (got 30 upvotes btw) (and no response) So this is exactly what this PR does. It stabilizes the non-controversial variants now, leaving just a few of them behind. Namely, this PR stabilizes: - `HostUnreachable` - `NetworkUnreachable` - `NetworkDown` - `NotADirectory` - `IsADirectory` - `DirectoryNotEmpty` - `ReadOnlyFilesystem` - `StaleNetworkFileHandle` - `StorageFull` - `NotSeekable` - `FileTooLarge` - `ResourceBusy` - `ExecutableFileBusy` - `Deadlock` - `TooManyLinks` - `ArgumentListTooLong` - `Unsupported` This PR does not stabilize: - `FilesystemLoop` - `FilesystemQuotaExceeded` - `CrossesDevices` - `InvalidFilename` Hopefully, this will allow us to move forward with this highly and long awaited addition to std, both allowing to still polish the less clear parts of it and not leading to stagnation. r? joshtriplett because they seem to be listed as a part of t-libs-api and were one of the most responsive persons previously
2024-09-10Auto merge of #129778 - RalfJung:interp-lossy-typed-copy, r=saethlinbors-1/+6
interpret: make typed copies lossy wrt provenance and padding A "typed copy" in Rust can be a lossy process: when copying at type `usize` (or any other non-pointer type), if the original memory had any provenance, that provenance is lost. When copying at pointer type, if the original memory had partial provenance (i.e., not the same provenance for all bytes), that provenance is lost. When copying any type with padding, the contents of padding are lost. This PR equips our validity-checking pass with the ability to reset provenance and padding according to those rules. Can be reviewed commit-by-commit. The first three commits are just preparation without any functional change. Fixes https://github.com/rust-lang/miri/issues/845 Fixes https://github.com/rust-lang/miri/issues/2182
2024-09-09chore: removing supporting links in favor of existing doc-comment styleJulius Liu-13/+6
2024-09-09maint: update docs for change_time ext and doc linksJulius Liu-9/+20
2024-09-09Rollup merge of #130154 - okaneco:stabilize_char_min, r=cuviperMatthias Krüger-4/+1
Stabilize `char::MIN` FCP completed https://github.com/rust-lang/rust/issues/114298#issuecomment-2335250508 Closes #114298