-
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 18 pull requests #74303
Rollup of 18 pull requests #74303
Conversation
This commit redesigns LineWriter to work more directly on the internals of BufWriter. This interface change is to enable a future Pull Request in which Stdout can be switched between Line and Block buffered mode.
- Added a bunch of new unit tests - Removed test_line_buffer_fail_flush - Updated erroneous_flush_retried - Added helper methods to LineWriterShim for code clarity, to distinguish "self.buffer" (the BufWriter) from self.inner (the thing wrapped by the BufWriter) - Un-expressionized write & write_all - Added clause to bail early on Ok(0)
- Cleaned up BufWriter::seek - Updated line_vectored test - Updated line_vectored_partial_and_errors test - Added several new tests
- Renamed write_to_buffer to write_to_buf, for consistency - Fixed references to flush_buf - Optimized `write` to use one less `memchr` call
- Fixed test after write_vectored bugfix - Some comments
- Fixed partial-line buffering issue - Added tests Thanks @the8472 for catching!
Co-authored-by: Josh Triplett <[email protected]>
…riplett Document the union keyword Partial fix of rust-lang#34601. This documents the `union` keyword by presenting three cases: simply using a union, matching on a union and referencing the fields of a union. @rustbot modify labels: T-doc,C-enhancement
add (unchecked) indexing methods to raw (and NonNull) slices This complements the existing (unstable) `len` method. Unfortunately, for non-null slices, we cannot call this method `as_ptr` as that overlaps with the existing method of the same name. If this looks reasonable to accept, I propose to reuse the rust-lang#71146 tracking issue and rename the feature get to `slice_ptr_methods` or so. Cc @SimonSapin Fixes rust-lang#60639
…-Simulacrum Fix caching issue when building tools. This fixes a problem with tool builds not being cached properly. rust-lang#73297 changed it so that Clippy will participate in the "deny warnings" setting. Unfortunately this causes a problem because Clippy shares the build directory with other tools which do not participate in "deny warnings". Because Cargo does not independently cache artifacts based on different RUSTFLAGS settings, it causes all the shared dependencies to get rebuilt if Clippy ever gets built. The solution here is to stop using RUSTFLAGS, and just sneak the settings in through the rustc wrapper. Cargo won't know about the different settings, so it will not bust the cache. This should be safe since lint settings on dependencies are ignored. This is how things used to work in the past before rust-lang#64316. Alternate solutions: * Treat Clippy as a "submodule" and don't enforce warnings on it. This was the behavior before rust-lang#73297. The consequence is that if a warning sneaks into clippy, that the clippy maintainers will need to fix it when they sync clippy back to the clippy repo. * Just deny warnings on all tools (removing the in-tree/submodule distinction). This is tempting, but with some issues (cc rust-lang#52336): * Adding or changing warnings in rustc can be difficult to land because tools have to be updated if they trip the warning. In practice, this isn't too bad. Cargo (and rustfmt) already runs with `deny(warnings)`, so this has been the de-facto standard already (although they do not use the extra lints like `unused_lifetimes`). * Teach Cargo to add flags to the workspace members, but not dependencies. * Teach Cargo to add flags without fingerprinting them? * Teach Cargo to independently cache different RUSTFLAGS artifacts (this was [reverted](rust-lang/cargo#7417) due to complications). This would also unnecessarily rebuild dependencies, but would avoid cache thrashing. * Teach Cargo about lint settings. Closes rust-lang#74016
…kfire clean up E0718 explanation r? @Dylan-DPC
…jyn514 rustdoc: Allow linking from private items to private types Fixes rust-lang#74134 After PR rust-lang#72771 this would trigger an intra_doc_link_resolution_failure warning when rustdoc is invoked without --document-private-items. Links from private items to private types are however never actually generated in that case and thus shouldn't produce a warning. These links are in fact a very useful tool to document crate internals. Tests are added for all 4 combinations of public/private items and link targets. Test 1 is the case mentioned above and fails without this commit. Tests 2 - 4 passed before already but are added nonetheless to prevent regressions.
…ochenkov Detect tuple struct incorrectly used as struct pat Subpart of rust-lang#74005. r? @petrochenkov
Don't panic if the lhs of a div by zero is not statically known Fixes rust-lang#73993 for real this time r? @wesleywiser
Remove an unwrap in layout computation A tiny improvement.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
…r=Mark-Simulacrum Teach bootstrap about target files vs target triples `rustc` allows passing in predefined target triples as well as JSON target specification files. This change allows bootstrap to have the first inkling about those differences. This allows building a cross-compiler for an out-of-tree architecture (even though that compiler won't work for other reasons). Even if no one ever uses this functionality, I think the newtype around the `Interned<String>` improves the readability of the code.
don't mark linux kernel module targets as a unix environment refs rust-lang#74247 r?@joshtriplett cc: @ehuss
…acrum Slight reorganization of sys/(fast_)thread_local I was long confused by the `thread_local` and `fast_thread_local` modules in the `sys(_common)` part of libstd. The names make it *sound* like `fast_thread_local` is just a faster version of `thread_local`, but really these are totally different APIs: one provides thread-local "keys", which are non-addressable pointer-sized pieces of local storage with an associated destructor; the other (the "fast" one) provides just a destructor. So I propose we rename `fast_thread_local` to `thread_local_dtor`, and `thread_local` to `thread_local_key`. That's what this PR does.
…der-type-error, r=estebank typeck: report placeholder type error w/out span Fixes rust-lang#74086. This PR fixes a regression introduced in rust-lang#70369 which meant that an error was not being emitted for invalid placeholder types when there wasn't a span available. r? @estebank
…Gomez Added detailed error code explanation for issue E0688 in Rust compiler. Added proper error explanation for issue E0688 in the Rust compiler. Error Code E0688 Sub Part of Issue rust-lang#61137 r? @GuillaumeGomez
…=matklad ⬆️ rust-analyzer
📌 Commit 5b2adeb has been approved by |
🌲 The tree is currently closed for pull requests below priority 20, this pull request will be tested once the tree is reopened |
@bors treeclosed=5 We still have timeouts, so until further notice I'm going to be manually shepherding things when I'm awake |
⌛ Testing commit 5b2adeb with merge 1f75cb09b2cf8578aea3e3193f90e0fb554ea4e9... |
💔 Test failed - checks-actions |
Looks like a legitimate error:
it appears to be caused by the rust-analyzer bump in #74290 |
Successful merges:
Failed merges:
r? @ghost