| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Hygienize use of built-in macros in the standard library
Same as https://github.com/rust-lang/rust/pull/61629, but for built-in macros.
Closes https://github.com/rust-lang/rust/issues/48781
r? @alexcrichton
|
|
… and add a separately-unstable field to force non-exhaustive matching
(`#[non_exhaustive]` is no implemented yet on enum variants)
so that we have the option to later expose the allocator’s error value.
CC https://github.com/rust-lang/wg-allocators/issues/23
|
|
|
|
|
|
|
|
|
|
Remove uses of `mem::uninitialized()` from cloudabi
This PR removes uses of `mem::uninitialized` from `cloudabi` module,
excluding the layout test in `src/libstd/sys/cloudabi/abi/cloudabi.rs`.
r? @RalfJung
cc @EdSchouten
cc #62397
|
|
Add UWP MSVC targets
Hi,
- The README URI change is the correct one for VS2019 community edition, which I suspect most people would use. Doesn't _need_ to be merged though.
- This https://github.com/rust-lang/rust/commit/5e6619edd1a3b5c3f85438166d4d32af49f800fd fixes the UWP build (msvc or not, doesn't matter). I suspect it broke with recent changes unnoticed because no CI.
- Store lib location is found through the VCToolsInstallDir env variable. The end of the path is currently for the VS2019 store lib locations only.
- I could not test the aarch64_uwp_windows_msvc target because the rust build script does not currently support arm64 msvc AFAIU.
|
|
|
|
|
|
|
|
Fixes #63477
Adds a closing parenthesis.
|
|
docs: add stdlib env::var(_os) panic
Closes #63456
|
|
Adds a closing parenthesis.
|
|
Add #[repr(transparent)] for several types
In some functions, types mentioned in this PR are transmuted into their inner value.
Example for `PathBuf`: https://github.com/rust-lang/rust/blob/master/src/libstd/path.rs#L1132.
This PR adds `#[repr(transparent)]` to those types, so their correct behavior doesn't depend on compiler details. (As far as I understand, currently that line, converting `PathBuf` to `Vec<u8>`, is UB).
|
|
|
|
Use associated_type_bounds where applicable - closes #61738
|
|
|
|
|
|
|
|
|
|
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Co-Authored-By: Oliver Middleton <olliemail27@gmail.com>
|
|
|
|
|
|
Add an overflow check in truncate implementation for Unix.
Closes #63326.
cc @alexcrichton
|
|
|
|
doc: Reword deprecation message of MetadataExt::as_raw_stat
Closes #62711
r? @Mark-Simulacrum
|
|
|
|
|
|
|
|
|
|
Prevously the `read_to_end` implementation for `std::io::Take` used its
own `limit` as a cap on the `reservation_size`. However, that could
still result in an over-allocation like this:
1. Call `reader.take(5).read_to_end(&mut vec)`.
2. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
3. `read` writes 5 bytes.
4. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
5. `read` writes 0 bytes.
6. The read loop ends with `vec` having length 5 and capacity 10.
The reservation of 5 bytes was correct for the read at step 2 but
unnecessary for the read at step 4. By that second read, `Take::limit`
is 0, but the `read_to_end_with_reservation` loop is still using the
same `reservation_size` it started with.
Solve this by having `read_to_end_with_reservation` take a closure,
which lets it get a fresh `reservation_size` for each read. This is an
implementation detail which doesn't affect any public API.
|
|
|
|
|
|
Rollup of 14 pull requests
Successful merges:
- #61457 (Implement DoubleEndedIterator for iter::{StepBy, Peekable, Take})
- #63017 (Remove special code-path for handing unknown tokens)
- #63184 (Explaining the reason why validation is performed in to_str of path.rs)
- #63230 (Make use of possibly uninitialized data [E0381] a hard error)
- #63260 (fix UB in a test)
- #63264 (Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank")
- #63272 (Some more libsyntax::attr cleanup)
- #63285 (Remove leftover AwaitOrigin)
- #63287 (Don't store &Span)
- #63293 (Clarify align_to's requirements and obligations)
- #63295 (improve align_offset docs)
- #63299 (Make qualify consts in_projection use PlaceRef)
- #63312 (doc: fix broken sentence)
- #63315 (Fix #63313)
Failed merges:
r? @ghost
|
|
Explaining the reason why validation is performed in to_str of path.rs
I thought it's good to explain the reason for the validation during the conversion between Path/PathBuffer into str, which explains the reason for returning an Option at this point (good for beginners who are reading through the docs).
|