-
Notifications
You must be signed in to change notification settings - Fork 371
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
Automatic sync from rustc #3069
Conversation
Not really a saving in terms of lines of code, but at least the logic is de-duplicated
Add some needed comments in `adjust_fulfillment_errors.rs` r? `@estebank`
Add initial libstd support for Xous This patchset adds some minimal support to the tier-3 target `riscv32imac-unknown-xous-elf`. The following features are supported: * alloc * thread creation and joining * thread sleeping * thread_local * panic_abort * mutex * condvar * stdout Additionally, internal support for the various Xous primitives surrounding IPC have been added as part of the Xous FFI. These may be exposed as part of `std::os::xous::ffi` in the future, however for now they are not public. This represents the minimum viable product. A future patchset will add support for networking and filesystem support.
This reduces the amount of dependencies pulling in atty. ``` Removing env_logger v0.9.3 ``` Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Don't modify libstd to dump rustc ICEs Do a much simpler thing and just dump a `std::backtrace::Backtrace` to file. r? `@estebank` `@oli-obk` Fixes #115610
Pretty-print argument-position impl trait to name it. This removes a corner case. RPIT and TAIT keep having no name, and it would be wrong to use the one in HIR (Ident::empty), so I make this case ICE.
Implement `cstr_count_bytes` This has not yet been approved via ACP, but it's simple enough to get started on. - ACP: rust-lang/libs-team#256 - Tracking issue: rust-lang/rust#114441 `@rustbot` label +T-libs-api
Update to LLVM 17.0.0 This rebases our LLVM fork to 17.0.0. Fixes #115681.
…llot Correctly deny late-bound lifetimes from parent in anon consts and TAITs Reuse the `AnonConstBoundary` scope (introduced in #108553, renamed in this PR to `LateBoundary`) to deny late-bound vars of *all* kinds (ty/const/lifetime) in anon consts and TAITs. Side-note, but I would like to consolidate this with the error reporting for RPITs (E0657): https://github.com/rust-lang/rust/blob/c4f25777a08cd64b710e8a9a6159e67cbb35e6f5/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs#L733-L754 but the semantics about what we're allowed to capture there are slightly different, so I'm leaving that untouched. Fixes #115474
Use no_core for KCFI tests to exercise them in CI
Refactor `thread_info` to remove the `RefCell` `thread_info` currently uses `RefCell`-based initialization. Refactor this to use `OnceCell` instead which is more performant and better suits the needs of one-time initialization. This is nobody's bottleneck but OnceCell checks are a single `cmp` vs. `RefCell<Option>` needing runtime logic
miri: reduce code duplication in some SSE/SSE2 intrinsics Reduces code duplication in the Miri implementation of some SSE and SSE2 using generics and rustc_const_eval helper functions. There are also some other minor changes. r? `@RalfJung`
dependencies: reduce the amount of crates pulling in atty It would be nice to have only one `hermit-abi` in `Cargo.lock` (rust-lang/rust#107405 (comment)). The only crate pulling in the old `hermit-abi` version is `atty`, which is unmaintained. This PR upgrades three dependencies, which then no longer depend on `atty`: * `Cargo.lock`: `colored v2.0.0 -> v2.0.4` * `Cargo.lock`: `tracing-tree v0.2.3 -> v0.2.4` * Miri: `env_logger 0.9.3 -> 0.10.0` The only dependency chain left that pulls in `hermit-abi 0.1.19` is: `hermit-abi 0.1.19` -> `atty 0.2.14` -> `env_logger 0.7.1` -> `jsonpath_lib 0.2.6` -> `jsondocck 0.1.0` (src/tools/jsondocck) Replacing jsondocck with jsondocckng is tracked in rust-lang/rust#94140.
…-predicate, r=oli-obk clean up unneeded `ToPredicate` impls Part of #107250. Removed all totally unused impls. And inlined two impls not need to satisify trait bound. r? `@oli-obk`
coverage: Remove debug code from the instrumentor The coverage instrumentor has an entire module full of complex code that is only used for debugging. And as I continue to work on coverage, I keep finding that this debug code is constantly causing more trouble than it's worth. It's deeply entangled with current implementation details, such that making any non-trivial change to the instrumentor usually requires major changes to the debug code. And so far I have personally not found any of this debug code to be *useful*. In light of that situation, I'd like to try just ripping all of it out. If I spend any more time dealing with coverage debug code, I want it to be because I'm writing new and useful tools, not dutifully maintaining a boat-anchor that quite plausibly isn't being used by anyone at all. --- r? `@ghost` `@rustbot` label +A-code-coverage --- [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Removing.20debug.20code.20from.20the.20coverage.20instrumentor)
…illaumeGomez rustdoc: add test cases, and fix, search tabs layout jank ## Before ### Resizing https://github.com/rust-lang/rust/assets/1593513/24bb5f2b-f6bd-4ed8-91e1-f9ff63d1acee ### Typing https://github.com/rust-lang/rust/assets/1593513/145f53e1-42eb-4b2a-adba-7c9ab44b0aa4 ## After ### Resizing https://github.com/rust-lang/rust/assets/1593513/acc10a55-e83e-43e6-8604-5dfcb9ae3141 ### Typing https://github.com/rust-lang/rust/assets/1593513/09d6d389-e24f-428f-933f-83d9075f15a2
Ensure `build/tmp` exists in `rustdoc_themes::get_themes` This causes failures in ferrocene's CI as `build/tmp` might not exist at this point, causing the following expect to fail here https://github.com/rust-lang/rust/blob/4b91288484569dd59c9a996ae45e08ae9527abc1/src/tools/rustdoc-themes/main.rs#L24
RELEASES.md: Add missing patch releases This was copy-pasted from the current state of the `stable` branch see https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E71.2E1/near/382524871
Rollup of 5 pull requests Successful merges: - #115566 (clean up unneeded `ToPredicate` impls) - #115962 (coverage: Remove debug code from the instrumentor) - #115988 (rustdoc: add test cases, and fix, search tabs layout jank) - #115991 (Ensure `build/tmp` exists in `rustdoc_themes::get_themes`) - #115997 (RELEASES.md: Add missing patch releases) r? `@ghost` `@rustbot` modify labels: rollup
adjust ConstValue::Slice to work for arbitrary slice types valtrees have already been assuming that this works; this PR makes it a reality. Also further restrict `ConstValue::Slice` to what it is actually used for; this even shrinks `ConstValue` from 32 to 24 bytes which is a nice win. :) The alternative to this approach is to make `ConstValue::Slice` work really only for `&str`/`&[u8]` literals, and never return it in `op_to_const`. That would make `op_to_const` very clean. We could then even remove the `meta` field; the length would always be `data.inner().len()`. We could *almost* just use a `Symbol` instead of a `ConstAllocation`, but we have to support byte strings and there doesn't seem to be an interned representation of them (or rather, `ConstAllocation` *is* their interned representation). In this world, valtrees of slice reference types would then become noticeably more expensive to turn into a `ConstValue` -- but does that matter? Specifically for `&str`/`&[u8]` we could still use the optimized representation if we wanted. If byte strings were already interned somewhere I'd gravitate towards the alternative, but the way things stand, we need a `ConstAllocation` case anyway to support byte strings, and then we might as well support arbitrary slices. (Or we say that byte strings don't get an optimized representation at all. Such a performance cliff between `str` and byte strings is probably unexpected, though due to the lack of interning for byte strings I think there might already be a performance cliff there.)
rustc_target/loongarch: Fix passing of transparent unions with only one non-ZST member This ensures that `MaybeUninit<T>` has the same ABI as `T` when passed through an `extern "C"` function. Fixes rust-lang/rust#115509 r? `@bjorn3`
…pkin Simplify/Optimize FileEncoder FileEncoder is basically a BufWriter except that it exposes access to the not-written-to-yet region of the buffer so that some users can write directly to the buffer. This strategy is awesome because it lets us avoid calling memcpy for small copies, but the previous strategy was based on the writer accessing a `&mut [MaybeUninit<u8>; N]` and returning a `&[u8]` which is an API which currently mandates the use of unsafe code, making that interface in general not that appealing. So this PR cleans up the FileEncoder implementation and builds on that general idea of direct buffer access in order to prevent `memcpy` calls in a few key places when encoding the dep graph and rmeta tables. The interface used here is now 100% safe, but with the caveat that internally we need to avoid trusting the number of bytes that the provided function claims to have written. The original primary objective of this PR was to clean up the FileEncoder implementation so that the fix for the following issues would be easy to implement. The fix for these issues is to correctly update self.buffered even when writes fail, which I think it's easy to verify manually is now done, because all the FileEncoder methods are small. Fixes rust-lang/rust#115298 Fixes rust-lang/rust#114671 Fixes rust-lang/rust#114045 Fixes rust-lang/rust#108100 Fixes rust-lang/rust#106787
Fall back to the unoptimized implementation in read_binary_file if File::metadata lies Fixes rust-lang/rust#115458 r? `@jackh726` because you approved the previous PR
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
@bors r+ |
@bors force r+ |
Hm, I thought @bors retry |
@bors r+ |
☀️ Test successful - checks-actions |
👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward |
@bors retry |
☀️ Test successful - checks-actions |
No description provided.