| Age | Commit message (Collapse) | Author | Lines |
|
Add doc example for `std::ffi::CString::from_vec_unchecked`.
None
|
|
r=steveklabnik
provide additional justification for array interface design
Explain why Rust does not implement traits for large arrays.
Explain why most methods are implemented on slices rather than arrays.
Note: I'm dipping my toes in the water with a tiny PR. Especially looking for feedback on wording and style. Points of concern: appropriate level of top-level explanation; foreshadowing (is it appropriate to imply that we expect Rust's type system to eventually support size-generic arrays?); using `Foo` and `Bar` as type variables instead of e.g. `T` and `S`.
@peschkaj
|
|
r=steveklabnik
Add note to docs for &str that example is to demo internals only
r? @steveklabnik
This adds a note below the &str representation example explaining that the example provided should not be used under normal circumstances..
Would it make sense to point people in the direction of the method(s) they should use instead? I left it out in the interest of not complicating the documentation, but, there's definitely an argument to be made for adding a bit of guidance in there.
|
|
Made vec_deque::Drain, hash_map::Drain, and hash_set::Drain covariant
Fixed the rest of the Drain iterators.
|
|
Emscripten test fixes
This picks up parts of #31623 to disable certain tests that emscripten can't run, as threads/processes are not supported.
I re-applied @tomaka's changes manually, I can rebase those commits with his credentials if he wants.
It also disables jemalloc for emscripten (at least in Rustbuild, I have to check if there is another setting for the same thing in the old makefile approach).
This should not impact anything for normal builds.
|
|
std: Optimize panic::catch_unwind slightly
The previous implementation of this function was overly conservative with
liberal usage of `Option` and `.unwrap()` which in theory never triggers. This
commit essentially removes the `Option`s in favor of unsafe implementations,
improving the code generation of the fast path for LLVM to see through what's
happening more clearly.
cc #34727
|
|
Fix typo (privledge->privilege)
|
|
Explain why Rust does not implement traits for large arrays.
Explain why most methods are implemented on slices rather than arrays.
|
|
|
|
|
|
Didn't see this one at first.
|
|
|
|
The previous implementation of this function was overly conservative with
liberal usage of `Option` and `.unwrap()` which in theory never triggers. This
commit essentially removes the `Option`s in favor of unsafe implementations,
improving the code generation of the fast path for LLVM to see through what's
happening more clearly.
cc #34727
|
|
Fix docs typo in std::os::unix::net::SocketAddr::is_unnamed
|
|
Remove unnecessary `main` functions in doc examples.
|
|
Refactored code to access TLS only in case of panic (II)
Fixes #34787
r? @alexcrichton
Do it **very** carefully this time!
|
|
Rollup of 15 pull requests
- Successful merges: #35371, #35396, #35446, #35449, #35452, #35458, #35465, #35466, #35470, #35475, #35477, #35484, #35504, #35507, #35524
- Failed merges: #35395, #35415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utilize `PhantomData` to enforce `!Sync` and `!Send` field.
None
|
|
Implement `RefCell::{try_borrow, try_borrow_mut}`
CC #35070
r? @alexcrichton
|
|
|
|
Update HashMap docs regarding DoS protection
Because of changes to how Rust acquires randomness HashMap is not
guaranteed to be DoS resistant. This commit reflects these changes in
the docs themselves and provides an alternative method to creating
a hash that is resistant if needed.
This fixes #33817 and includes relevant information regarding changes made in #33086
|
|
|
|
Add doc example for `std::ffi::NulError::into_vec`.
None
|
|
r=alexcrichton
Fix build on DragonFly (unused function errno_location)
Function errno_location() is not used on DragonFly. As warnings are
errors, this breaks the build.
|
|
|
|
Handle RwLock reader count overflow
`pthread_rwlock_rdlock` may return `EAGAIN` if the maximum reader count overflows. We shouldn't return a successful lock in that case.
|
|
|
|
Function errno_location() is not used on DragonFly. As warnings are
errors, this breaks the build.
|
|
Comment on the casts in the `seek` implementations on files
|
|
|
|
|
|
Because of changes to how Rust acquires randomness HashMap is not
guaranteed to be DoS resistant. This commit reflects these changes in
the docs themselves and provides an alternative method to creating
a hash that is resistant if needed.
|
|
Doc `std::thread::park_timeout`
r? @steveklabnik
|
|
Add doc example for `std::ffi::NulError::nul_position`.
None
|
|
A couple `std::net` doc improvements.
None
|
|
Add io::Error doc examples
Fixes #29359.
r? @steveklabnik
|
|
Add doc examples for FileType struct
Part of #29356.
r? @steveklabnik
|
|
|
|
|
|
|
|
|
|
|
|
Escape the unmatched surrogates with lower-case hexadecimal numbers
It's done the same way for the rest of the codepoint escapes.
|
|
|