-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 7 pull requests #86891
Rollup of 7 pull requests #86891
Commits on May 22, 2021
-
Add std::os::unix::fs::DirEntryExt2::file_name_ref(&self) -> &OsStr
DirEntryExt2 is a new trait with the same purpose as DirEntryExt, but sealed
Configuration menu - View commit details
-
Copy full SHA for bc45e47 - Browse repository at this point
Copy the full SHA bc45e47View commit details
Commits on Jun 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 719dafc - Browse repository at this point
Copy the full SHA 719dafcView commit details
Commits on Jun 30, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 618c805 - Browse repository at this point
Copy the full SHA 618c805View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc2705d - Browse repository at this point
Copy the full SHA fc2705dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e2536bb - Browse repository at this point
Copy the full SHA e2536bbView commit details
Commits on Jul 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 6d34a2e - Browse repository at this point
Copy the full SHA 6d34a2eView commit details
Commits on Jul 5, 2021
-
aborts: Clarify documentation and comments
In the docs for intrinsics::abort(): * Strengthen the recommendation by to use process::abort instead. * Document the fact that it (ab)uses an LLVM debug trap and what the likely consequences are. * State that the precise behaviour is unstable. In the docs for process::abort(): * Promise that we have the same behaviour as C `abort()`. * Document the likely consequences, including, specifically, the consequences on Unix. In the internal comment for unix::abort_internal: * Refer to the public docs for the public API functions. * Correct and expand the description of libc::abort. Specifically: * Do not claim that abort() unregisters signal handlers. It doesn't; it honours the SIGABRT handler. * Discuss, extensively, the issue with abort() flushing stdio buffers. * Describe the glibc behaviour in some detail. Co-authored-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for a8bb7fa - Browse repository at this point
Copy the full SHA a8bb7faView commit details -
abort docs: Do not claim that intrinsics::abort is always a debug trap
As per discussion here rust-lang#85377 (review) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for de19e4d - Browse repository at this point
Copy the full SHA de19e4dView commit details -
abort docs: Document buffer non-flushing
There is discussion of this in rust-lang#40230 which requests clarification. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for 4e7c348 - Browse repository at this point
Copy the full SHA 4e7c348View commit details -
Talk about invalid instructions rather than debug traps
And withdraw the allegation of "abuse". Adapted from a suggestion by @m-ou-se. Co-authored-by: Mara Bos <m-ou.se@m-ou.se> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for 44852e0 - Browse repository at this point
Copy the full SHA 44852e0View commit details -
Talk about "terminate" rather than "die"
Adapted from a suggestion by @m-ou-se. Co-authored-by: Mara Bos <m-ou.se@m-ou.se> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Configuration menu - View commit details
-
Copy full SHA for 19c347e - Browse repository at this point
Copy the full SHA 19c347eView commit details -
Use american spelling for behaviour
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Configuration menu - View commit details
-
Copy full SHA for f73a555 - Browse repository at this point
Copy the full SHA f73a555View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08d912f - Browse repository at this point
Copy the full SHA 08d912fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fa5406 - Browse repository at this point
Copy the full SHA 4fa5406View commit details -
Enable dir_entry_ext2 feature in doc test.
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Configuration menu - View commit details
-
Copy full SHA for 469f467 - Browse repository at this point
Copy the full SHA 469f467View commit details -
Remove
impl Clean for {Ident, Symbol}
These were only used once, in a place where it was trivial to replace. Also, it's unclear what 'clean' would mean for these, so it seems better to be explicit.
Configuration menu - View commit details
-
Copy full SHA for 6f931da - Browse repository at this point
Copy the full SHA 6f931daView commit details -
Rollup merge of rust-lang#83581 - arennow:dir_entry_ext_unix_borrow_n…
…ame, r=m-ou-se Add std::os::unix::fs::DirEntryExt2::file_name_ref(&self) -> &OsStr Greetings! This is my first PR here, so please forgive me if I've missed an important step or otherwise done something wrong. I'm very open to suggestions/fixes/corrections. This PR adds a function that allows `std::fs::DirEntry` to vend a borrow of its filename on Unix platforms, which is especially useful for sorting. (Windows has (as I understand it) encoding differences that require an allocation.) This new function sits alongside the cross-platform [`file_name(&self) -> OsString`](https://doc.rust-lang.org/std/fs/struct.DirEntry.html#method.file_name) function. I pitched this idea in an [internals thread](https://internals.rust-lang.org/t/allow-std-direntry-to-vend-borrows-of-its-filename/14328/4), and no one objected vehemently, so here we are. I understand features in general, I believe, but I'm not at all confident that my whole-cloth invention of a new feature string (as required by the compiler) was correct (or that the name is appropriate). Further, there doesn't appear to be a test for the sibling `ino` function, so I didn't add one for this similarly trivial function either. If it's desirable that I should do so, I'd be happy to [figure out how to] do that. The following is a trivial sample of a use-case for this function, in which directory entries are sorted without any additional allocations: ```rust use std::os::unix::fs::DirEntryExt; use std::{fs, io}; fn main() -> io::Result<()> { let mut entries = fs::read_dir(".")?.collect::<Result<Vec<_>, io::Error>>()?; entries.sort_unstable_by(|a, b| a.file_name_ref().cmp(b.file_name_ref())); for p in entries { println!("{:?}", p); } Ok(()) } ```
Configuration menu - View commit details
-
Copy full SHA for 1fcd9ab - Browse repository at this point
Copy the full SHA 1fcd9abView commit details -
Rollup merge of rust-lang#85377 - ijackson:abort-docs, r=m-ou-se
aborts: Clarify documentation and comments In the docs for intrinsics::abort(): * Strengthen the recommendation by to use process::abort instead. * Document the fact that it sometimes (ab)uses an LLVM debug trap and what the likely consequences are. * State that the precise behaviour is unstable. In the docs for process::abort(): * Promise that we have the same behaviour as C `abort()`. * Document the likely consequences, including, specifically, the consequences on Unix. In the internal comment for unix::abort_internal: * Refer to the public docs for the public API functions. * Correct and expand the description of libc::abort. Specifically: * Do not claim that abort() unregisters signal handlers. It doesn't; it honours the SIGABRT handler. * Discuss, extensively, the issue with abort() flushing stdio buffers. * Describe the glibc behaviour in some detail. Co-authored-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk> Fixes rust-lang#40230
Configuration menu - View commit details
-
Copy full SHA for add24d2 - Browse repository at this point
Copy the full SHA add24d2View commit details -
Rollup merge of rust-lang#86685 - RalfJung:alloc-mut, r=oli-obk
double-check mutability inside Allocation r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 1ca3205 - Browse repository at this point
Copy the full SHA 1ca3205View commit details -
Rollup merge of rust-lang#86794 - inquisitivecrystal:seek-rewind, r=m…
…-ou-se Stabilize `Seek::rewind()` This stabilizes `Seek::rewind`. It seemed to fit into one of the existing tests, so I extended that test rather than adding a new one. Closes rust-lang#85149.
Configuration menu - View commit details
-
Copy full SHA for 2bc7d4d - Browse repository at this point
Copy the full SHA 2bc7d4dView commit details -
Rollup merge of rust-lang#86852 - Amanieu:remove_doc_aliases, r=josht…
…riplett Remove some doc aliases As per the new doc alias policy in rust-lang/std-dev-guide#25, this removes some controversial doc aliases: - `malloc`, `alloc`, `realloc`, etc. - `length` (alias for `len`) - `delete` (alias for `remove` in collections and also file/directory deletion) r? `@joshtriplett`
Configuration menu - View commit details
-
Copy full SHA for 470ed70 - Browse repository at this point
Copy the full SHA 470ed70View commit details -
Rollup merge of rust-lang#86878 - lnicola:rust-analyzer-2021-07-05, r…
…=lnicola ⬆️ rust-analyzer
Configuration menu - View commit details
-
Copy full SHA for 973f208 - Browse repository at this point
Copy the full SHA 973f208View commit details -
Rollup merge of rust-lang#86886 - jyn514:no-clean-symbol, r=Guillaume…
…Gomez Remove `impl Clean for {Ident, Symbol}` These were only used once, in a place where it was trivial to replace. Also, it's unclear what 'clean' would mean for these, so it seems better to be explicit. Found while reviewing rust-lang#86841, which makes the same change to `build_macro`, so the two will conflict. r? `@GuillaumeGomez`
Configuration menu - View commit details
-
Copy full SHA for 952deae - Browse repository at this point
Copy the full SHA 952deaeView commit details