| Age | Commit message (Collapse) | Author | Lines |
|
Add examples for `std::thread::Thread::name`.
None
|
|
Document `CStr::as_ptr` dangers.
r? @steveklabnik
Hi! I've tried to document `CString::new("hello").unwrap().as_ptr()` footgun. Related [RFC] and the original [discussion].
[RFC]: https://github.com/rust-lang/rfcs/pull/1642
[discussion]: https://users.rust-lang.org/t/you-should-stop-telling-people-that-safe-rust-is-always-safe/6094
|
|
|
|
|
|
Add short summaries to btree modules
Also improve hash_map and hash_set module short summaries.
These are missing from [here](https://doc.rust-lang.org/nightly/std/collections/#modules).
r? @steveklabnik
|
|
|
|
Add example in docs for `std::thread::panicking`.
None
|
|
doc: fix mis-named binding & remove not needed `mut`
|
|
Also improve hash_map and hash_set module short summaries.
|
|
|
|
|
|
Signed-off-by: Peter Atashian <retep998@gmail.com>
|
|
Add ERROR_FILE_EXISTS to ErrorKind conversion on Windows
Bug report: https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215
Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists
|
|
Map::Entry methods to recover key and value together
See https://github.com/rust-lang/rust/issues/32281#issuecomment-213066344
|
|
|
|
|
|
|
|
Bug report:
https://users.rust-lang.org/t/detecting-error-kind-for-opening-file/6215
Reference:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx#error_file_exists
|
|
- Add links to all RFCs to make it clear these are not Rust RFCs.
- Correct RFC numbers to match the numbers in [RFC 6890](https://tools.ietf.org/html/rfc6890)
- Clean up formatting to show addresses and ranges in parentheses like (255.255.255.255)
|
|
|
|
Also, do not repeat name of type
|
|
|
|
|
|
|
|
non-MIR translation is still not supported for these and will happily ICE.
This is a [breaking-change] for many uses of slice_patterns.
|
|
|
|
Rename main thread from "<main>" to "main".
Fix issue #33789
We may need to discuss whether this counts as a breaking change since code may check the main thread name against "\<main\>". Discussion is in #33789
|
|
Make sure Mutex and RwLock can't be re-locked on the same thread
Fixes #33770
r? @alexcrichton
|
|
|
|
This is allowed by POSIX and can happen on glibc with processors
that support hardware lock elision.
|
|
The only applies to pthread mutexes. We solve this by creating the
mutex with the PTHREAD_MUTEX_NORMAL type, which guarantees that
re-locking from the same thread will deadlock.
|
|
doc: typo
|
|
Restore original meaning of std::fs::read_dir's example changed in #33958
`DirEntry.file_type().is_dir()` will not follow symlinks, but the original example (`fs::metadata(&path).is_dir()`) does. Therefore the change in #33958 introduced a subtle difference that now it won't enter linked folders. To preserve the same behavior, we use `Path::is_dir()` instead, which does follow symlink.
(See discussion in the previous PR for detail.)
|
|
Fix broken link name in `bool` documentation
|
|
document that Files close themselves automatically
|
|
|
|
std: Clean out old unstable + deprecated APIs
These should all have been deprecated for at least one cycle, so this commit
cleans them all out.
|
|
Open code the __fastfail intrinsic for rtabort! on windows
As described https://msdn.microsoft.com/en-us/library/dn774154.aspx
This is a Windows 8+ mechanism for terminating the process quickly,
which degrades to either an access violation or bugcheck in older versions.
I'm not sure this is better the the current mechanism of terminating
with an illegal instruction, but we recently converted unix to
terminate more correctly with SIGABORT, and this *seems* more correct
for windows.
[breaking-change]
|
|
DirEntry.file_type().is_dir() will not follow symlinks, but the original
example (fs::metadata(&path).is_dir()) does. Therefore the change in
#33958 introduced a subtle difference that now it won't enter linked
folders. To preserve the same behavior, we use Path::is_dir() instead,
which does follow symlink.
|
|
|
|
|
|
Inline simple Cursor write calls
Implementing the Write trait for Cursors over slices is so light-weight that under some circumstances multiple writes can be fused into a single instruction. In general I think inlining these functions is a good idea because most of the code can be constant-folded and copy-propagated away.
Closes issue #33916.
r? @alexcrichton
|
|
This commit prepares the source for a new stage0 compiler, the 1.10.0 beta
compiler. These artifacts are hot off the bots and should be ready to go.
|
|
|
|
These should all have been deprecated for at least one cycle, so this commit
cleans them all out.
|
|
Since Bytes and Chars called directly into Read::read, they didn't use
any of the retrying wrappers. This allows both iterator types to retry.
|
|
Basically reverts #25508. The `is_dir()` function has been stable since 1.5.0.
|
|
Implement Error trait for fmt::Error type
Fixes #33827.
r? @alexcrichton
Just one last thing: I added a feature name, but don't hesitate to ask me to change it if you think it doesn't fit well.
|
|
panic.rs: fix docs (recover -> catch_unwind)
The current docs are a bit inconsistent. First, change all references of "recover" to "catch_unwind" because the function was renamed. Second, consistently use the term "unwind safe" instead of "panic safe", "exception safe" and "recover safe" (all these terms were used previously).
|
|
Implementing the Write trait for Cursors over slices is so light-weight that under some circumstances multiple writes can be fused into a single instruction. In general I think inlining these functions is a good idea because most of the code can be constant-folded and copy-propagated away.
Closes issue #33916.
|