-
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 10 pull requests #94134
Rollup of 10 pull requests #94134
Conversation
MIPS64 targets under OpenWrt require soft-float fpu support. Rust-lang requires soft-float defined in tuple definition and isn't over-ridden by toolchain compile-time CFLAGS/LDFLAGS Set explicit soft-float for tuple. Signed-off-by: Donald Hoskins <grommish@gmail.com>
Neither the SOLID filesystem API nor built-in filesystems guarantee thread safety by default. Although this may suffice in general embedded- system use cases, and in fact the API can be used from multiple threads without any problems in many cases, this has been a source of unsoundness in `std::sys::solid::fs`. This commit updates the `std` code to leverage the filesystem thread- safety wrapper to enforce thread safety. This is done by prefixing all paths passed to the filesystem API with `\TS`. (Note that relative paths aren't supported in this platform.)
Co-authored-by: Urgau <lolo.branstett@numericable.fr> Co-authored-by: Marcelina Kościelnicka <mwk@0x04.net>
Adds support for the LLVM MemTagSanitizer.
Address rust-lang#85991 Suggest the `impl Trait` return type syntax if the user tried to return a generic parameter and we get a type mismatch The suggestion is not emitted if the param appears in the function parameters, and only get the bounds that actually involve `T: ` directly It also checks whether the generic param is contained in any where bound (where it isn't the self type), and if one is found (like `Option<T>: Send`), it is not suggested. This also adds `TyS::contains`, which recursively vistits the type and looks if the other type is contained anywhere
Previously these were entirely disallowed, except for r11 which was allowed by accident.
…, r=jackh726 Suggest `impl Trait` return type when incorrectly using a generic return type Address rust-lang#85991 When there is a type mismatch error and the return type is generic, and that generic parameter is not used in the function parameters, suggest replacing that generic with the `impl Trait` syntax. r? `@estebank`
Add MemTagSanitizer Support Add support for the LLVM [MemTagSanitizer](https://llvm.org/docs/MemTagSanitizer.html). On hardware which supports it (see caveats below), the MemTagSanitizer can catch bugs similar to AddressSanitizer and HardwareAddressSanitizer, but with lower overhead. On a tag mismatch, a SIGSEGV is signaled with code SEGV_MTESERR / SEGV_MTEAERR. # Usage `-Zsanitizer=memtag -C target-feature="+mte"` # Comments/Caveats * MemTagSanitizer is only supported on AArch64 targets with hardware support * Requires `-C target-feature="+mte"` * LLVM MemTagSanitizer currently only performs stack tagging. # TODO * Tests * Example
…eny, r=estebank Add more information to `impl Trait` error Fixes rust-lang#92458 Let me know if I went overboard here, or if the suggestions could use some refinement. r? `@estebank` Feel free to reassign to someone else
…=GuillaumeGomez Pass `--test` flag through rustdoc to rustc so `#[test]` functions can be scraped As a part of stabilizing the scrape examples extension in Cargo, I uncovered a bug where examples cannot be scraped from tests. See this test: https://github.com/rust-lang/cargo/pull/10343/files#diff-27aa4f012ebfebaaee61498d91d2370de460628405d136b05e77efe61e044679R2496 The issue is that when rustdoc is run on a test file, because `--test` is not passed as a rustc option, then functions annotated with `#[test]` are ignored by the compiler. So this PR changes rustdoc so when `--test` is passed in conjunction with a `--scrape-example-<suffix>` flag, then the `test` field of `rustc_interface::Config` is true. r? `@camelid`
mips64-openwrt-linux-musl: correct soft-foat MIPS64 targets under OpenWrt require soft-float fpu support. Rust-lang requires soft-float defined in tuple definition and isn't over-ridden by toolchain compile-time CFLAGS/LDFLAGS Set explicit soft-float for tuple. Signed-off-by: Donald Hoskins <grommish@gmail.com>
kmc-solid: Use the filesystem thread-safety wrapper Fixes the thread unsafety of the `std::fs` implementation used by the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. Neither the SOLID filesystem API nor built-in filesystem drivers guarantee thread safety by default. Although this may suffice in general embedded-system use cases, and in fact the API can be used from multiple threads without any problems in many cases, this has been a source of unsoundness in `std::sys::solid::fs`. This commit updates the implementation to leverage the filesystem thread-safety wrapper (which uses a pluggable synchronization mechanism) to enforce thread safety. This is done by prefixing all paths passed to the filesystem API with `\TS`. (Note that relative paths aren't supported in this platform.)
asm: Allow the use of r8-r14 as clobbers on Thumb1 Previously these were entirely disallowed, except for r11 which was allowed by accident. cc `@hudson-ayers`
…h726,nikomatsakis Only mark projection as ambiguous if GAT substs are constrained A slightly more targeted version of rust-lang#92917, where we only give up with ambiguity if we infer something about the GATs substs when probing for a projection candidate. fixes rust-lang#93874 also note (but like the previous PR, does not fix) rust-lang#91762 r? `@jackh726` cc `@nikomatsakis` who reviewed rust-lang#92917
Implement --check-cfg option (RFC 3013), take 2 This pull-request implement RFC 3013: Checking conditional compilation at compile time (rust-lang/rfcs#3013) and is based on the previous attempt rust-lang#89346 by `@mwkmwkmwk` that was closed due to inactivity. I have address all the review comments from the previous attempt and added some more tests. cc rust-lang#82450 r? `@petrochenkov`
Add the `known-bug` test directive, use it, and do some cleanup cc rust-lang/compiler-team#476 Now tests can be annotated with `known-bug`, which should indicate that the test *should* pass (or at least that the current output is a bug). Adding it relaxes the requirement to add error annotations to the test (though it is still allowed). In the future, this could be extended with further relaxations - with the goal to make adding these tests need minimal effort. I've used this attribute for the GAT tests added in rust-lang#93757. Finally, I've also cleaned up `header.rs` in compiletest a bit, by extracting out a bit of common logic. I've also split out some of the directives into their own consts. This removes a lot of very similar functions from `Config` and makes `TestProps::load_from` read nicer. I've split these into separate commits, so I in theory could split these into separate PRs if they're controversial, but I think they're pretty straightforward. r? ``@Mark-Simulacrum``
@bors r+ rollup=never p=10 |
📌 Commit 620b0c5 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1882597): comparison url. Summary: This benchmark run did not return any relevant results. 22 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Successful merges:
impl Trait
return type when incorrectly using a generic return type #89892 (Suggestimpl Trait
return type when incorrectly using a generic return type)impl Trait
error #92806 (Add more information toimpl Trait
error)--scrape-tests
option to rustdoc to scrape functions marked#[test]
#93497 (Pass--test
flag through rustdoc to rustc so#[test]
functions can be scraped)known-bug
test directive, use it, and do some cleanup #93953 (Add theknown-bug
test directive, use it, and do some cleanup)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup