-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 9 pull requests #130671
Closed
Closed
Rollup of 9 pull requests #130671
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this fixes cycle detection for modules that need a second invocation collection pass after parsing
Refactor `into_utf8_lossy` to copy valid UTF-8 bytes into the buffer, avoiding double validation of bytes. Add tests that mirror the `String::from_utf8_lossy` tests
Adds the --enable-profiler flag to the RUST_CONFIGURE_ARGS for armhf distribution for Linux. This enables running coverage for tests
verifies that the correct return instructions are emitted. Co-authored-by: Tamme Dittrich <tamme@tweedegolf.com>
…ly only bounds for the type itself
…ally collecting implied bounds, not super bounds
… r=jackh726 add `extern "C-cmse-nonsecure-entry" fn` tracking issue rust-lang#75835 in rust-lang#75835 (comment) it was decided that using an abi, rather than an attribute, was the right way to go for this feature. This PR adds that ABI and removes the `#[cmse_nonsecure_entry]` attribute. All relevant tests have been updated, some are now obsolete and have been removed. Error 0775 is no longer generated. It contains the list of targets that support the CMSE feature, and maybe we want to still use this? right now a generic "this abi is not supported on this platform" error is returned when this abi is used on an unsupported platform. On the other hand, users of this abi are likely to be experienced rust users, so maybe the generic error is good enough.
…kh726 Implement Return Type Notation (RTN)'s path form in where clauses Implement return type notation (RTN) in path position for where clauses. We already had RTN in associated type position ([e.g.](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=627a4fb8e2cb334863fbd08ed3722c09)), but per [the RFC](https://rust-lang.github.io/rfcs/3654-return-type-notation.html#where-rtn-can-be-used-for-now): > As a standalone type, RTN can only be used as the Self type of a where-clause [...] Specifically, in order to enable code like: ```rust trait Foo { fn bar() -> impl Sized; } fn is_send(_: impl Send) {} fn test<T>() where T: Foo, T::bar(..): Send, { is_send(T::bar()); } ``` * In the resolver, when we see a `TyKind::Path` whose final segment is `GenericArgs::ParenthesizedElided` (i.e. `(..)`), resolve that path in the *value* namespace, since we're looking for a method. * When lowering where clauses in HIR lowering, we first try to intercept an RTN self type via `lower_ty_maybe_return_type_notation`. If we find an RTN type, we lower it manually in a way that respects its higher-ranked-ness (see below) and resolves to the corresponding RPITIT. Anywhere else, we'll emit the same "return type notation not allowed in this position yet" error we do when writing RTN in every other position. * In `resolve_bound_vars`, we add some special treatment for RTN types in where clauses. Specifically, we need to add new lifetime variables to our binders for the early- and late-bound vars we encounter on the method. This implements the higher-ranked desugaring [laid out in the RFC](https://rust-lang.github.io/rfcs/3654-return-type-notation.html#converting-to-higher-ranked-trait-bounds). This PR also adds a bunch of tests, mostly negative ones (testing error messages). In a follow-up PR, I'm going to mark RTN as no longer incomplete, since this PR basically finishes the impl surface that we should initially stabilize, and the RFC was accepted. cc [RFC 3654](rust-lang/rfcs#3654) and rust-lang#109417
…nkov rustc_expand: remember module `#[path]`s during expansion During invocation collection, if a module item parsed from a `#[path]` attribute needed a second pass after parsing, its path wouldn't get added to the file path stack, so cycle detection broke. This checks the `#[path]` in such cases, so that it gets added appropriately. I think it should work identically to the case for external modules that don't need a second pass, but I'm not 100% sure. Fixes rust-lang#97589
…atrieb Avoid re-validating UTF-8 in `FromUtf8Error::into_utf8_lossy` Part of the unstable feature `string_from_utf8_lossy_owned` - rust-lang#129436 Refactor `FromUtf8Error::into_utf8_lossy` to copy valid UTF-8 bytes into the buffer, avoiding double validation of bytes. Add tests that mirror the `String::from_utf8_lossy` tests.
Add --enable-profiler to armhf dist Adds the --enable-profiler flag to the RUST_CONFIGURE_ARGS for armhf distribution for Linux. This enables running coverage for tests in builds for this target try-job: dist-armhf-linux
…iscross ABI compatibility: mention Result guarantee This has been already documented in https://doc.rust-lang.org/std/result/index.html#representation, but for `Option` we mirrored those docs in the "ABI compatibility" section, so let's do the same here. Cc `@workingjubilee` `@rust-lang/lang`
…iler-errors Prevent Deduplication of `LongRunningWarn` Fixes rust-lang#118612 As mention in the issue, `LongRunningWarn` is meant to be repeated multiple times. Therefore, this PR stores a unique number in every instance of `LongRunningWarn` so that it's not hashed into the same value and omitted by the deduplication mechanism.
…e1-dead,fmease Assert that `explicit_super_predicates_of` and `explicit_item_super_predicates` truly only contains bounds for the type itself We distinguish _implied_ predicates (anything that is implied from elaborating a trait bound) from _super_ predicates, which are are the subset of implied predicates that share the same self type as the trait predicate we're elaborating. This was originally done in rust-lang#107614, which fixed a large class of ICEs and strange errors where the compiler expected the self type of a trait predicate not to change when elaborating super predicates. Specifically, super predicates are special for various reasons: they're the valid candidates for trait upcasting, are the only predicates we elaborate when doing closure signature inference, etc. So making sure that we get this list correct and don't accidentally "leak" any other predicates into this list is quite important. This PR adds some debug assertions that we're in fact not doing so, and it fixes an oversight in the effect desugaring rework.
…r=compiler-errors compiler: Accept "improper" ctypes in extern "rust-cold" fn
rustbot
added
A-testsuite
Area: The testsuite used to check the correctness of rustc
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-infra
Relevant to the infrastructure team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Sep 21, 2024
@bors r+ rollup=never p=9 |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Sep 21, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 21, 2024
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#127766 (add `extern "C-cmse-nonsecure-entry" fn` ) - rust-lang#129629 (Implement Return Type Notation (RTN)'s path form in where clauses) - rust-lang#130246 (rustc_expand: remember module `#[path]`s during expansion) - rust-lang#130408 (Avoid re-validating UTF-8 in `FromUtf8Error::into_utf8_lossy`) - rust-lang#130651 (Add --enable-profiler to armhf dist) - rust-lang#130653 (ABI compatibility: mention Result guarantee) - rust-lang#130665 (Prevent Deduplication of `LongRunningWarn`) - rust-lang#130666 (Assert that `explicit_super_predicates_of` and `explicit_item_super_predicates` truly only contains bounds for the type itself) - rust-lang#130667 (compiler: Accept "improper" ctypes in extern "rust-cold" fn) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Sep 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-infra
Relevant to the infrastructure team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
extern "C-cmse-nonsecure-entry" fn
#127766 (addextern "C-cmse-nonsecure-entry" fn
)#[path]
s during expansion #130246 (rustc_expand: remember module#[path]
s during expansion)FromUtf8Error::into_utf8_lossy
#130408 (Avoid re-validating UTF-8 inFromUtf8Error::into_utf8_lossy
)LongRunningWarn
#130665 (Prevent Deduplication ofLongRunningWarn
)explicit_super_predicates_of
andexplicit_item_super_predicates
truly only contains bounds for the type itself #130666 (Assert thatexplicit_super_predicates_of
andexplicit_item_super_predicates
truly only contains bounds for the type itself)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup