-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 11 pull requests #56353
Rollup of 11 pull requests #56353
Conversation
This requires adding a new method, `P::filter_map`. This commit reduces instruction counts for various benchmarks by up to 0.7%.
`TryFrom<&[T]> for &[T; $N]` (note *reference* to an array) already exists, but not needing to dereference makes type inference easier for example when using `u32::from_be_bytes`. Also add doc examples doing just that.
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
`mir_stats` has not been used since 2b32cb9.
This commit modifies linker flavor inference to only remove the extension to the linker when performing inference if that extension is a 'exe'.
…oerister Use sort_by_cached_key when the key function is not trivial/free I'm not 100% sure about `def_path_hash` (everything it does is inlined) but it seems like a good idea at least for the rest, as they are cloning.
add test for issue rust-lang#21335 Running this test with LLVM assertions enabled doesn't seem to trigger an assertion on my Mac. Fixes rust-lang#21335.
Assorted tweaks - preallocate `VecDeque` in `Decodable::decode` (as it is done with other collections which can do it) - add a FIXME to `String::from_utf16` r? @RalfJung
…komatsakis drop glue takes in mutable references, it should reflect that in its type When drop glue begins, it should retag, like all functions taking references do. But to do that, it needs to take the reference at a proper type: `&mut T`, not `*mut T`. Failing to retag can mean that the memory the reference points to remains frozen, and `EscapeToRaw` on a frozen location is a NOP, meaning later mutations cause a Stacked Borrows violation. Cc @nikomatsakis @gankro because Stacked Borrows Cc @eddyb for the changes to miri argument passing (the intention is to allow passing `*mut [u8]` when `&mut [u8]` is expected and vice versa)
Fix ICE with feature self_struct_ctor Fix rust-lang#56202.
…ithoutboats Add TryFrom<&[T]> for [T; $N] where T: Copy `TryFrom<&[T]> for &[T; $N]` (note *reference* to an array) already exists, but not needing to dereference makes type inference easier for example when using `u32::from_be_bytes`. Also add doc examples doing just that.
…crum use top level `fs` functions where appropriate This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
…r=petrochenkov Reuse the `P` in `InvocationCollector::fold_{,opt_}expr`. This requires adding a new method, `P::filter_map`. This commit reduces instruction counts for various benchmarks by up to 0.7%.
…excrichton Remove not used option `mir_stats` has not been used since 2b32cb9.
…-Simulacrum Rename conversion util; remove duplicate util in librustc_codegen_llvm.
…ension, r=nagisa rustc 1.30.0's linker flavor inference is a non-backwards compat change to -Clinker Part of rust-lang#55396. This commit modifies linker flavor inference to only remove the extension to the linker when performing inference if that extension is a 'exe'. r? @nagisa cc @alexcrichton @japaric
@bors r+ p=12 |
📌 Commit 6c3a010 has been approved by |
⌛ Testing commit 6c3a010 with merge 5f04ce828af40725ebaab47c3b2821ed8c8946bf... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
fs
functions where appropriate #56258 (use top levelfs
functions where appropriate)P
inInvocationCollector::fold_{,opt_}expr
. #56268 (Reuse theP
inInvocationCollector::fold_{,opt_}expr
.)Failed merges:
r? @ghost