-
Notifications
You must be signed in to change notification settings - Fork 13k
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 5 pull requests #119918
Closed
Closed
Rollup of 5 pull requests #119918
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
rename `reported_signature_mismatch` to reflect its use it's used for a lot of things, not only closures
…, r=compiler-errors Allow `~const` on associated type bounds again This follows from [this Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/419616-t-compiler.2Fproject-const-traits/topic/projections.20on.20.28~.29const.20Trait.20.26.20.28~.29const.20assoc.20ty.20bounds). Basically in my opinion, it makes sense to allow `~const` on associated type bounds again since they're quite useful even though we haven't implemented the proposed syntax `<Ty as ~const Trait>::Proj`/`<Ty as const Trait>::Proj` yet; that can happen as a follow-up. This already allows more code to compile since `T::Assoc` where `T` is a type parameter and where the predicate `<T as ~const Trait>` is in the environment gets elaborated to (pseudo) `<T as ~const Trait>::Assoc`. ```rs #[const_trait] trait Trait { type Assoc: ~const Trait; fn func() -> i32; } const fn function<T: ~const Trait>() -> i32 { T::Assoc::func() } ``` `~const` associated type bounds also work together with `const` bounds: ```rs struct Type<const N: i32>; fn procedure<T: const Trait>() -> Type<{ T::Assoc::func() }> { // `Trait` comes from above Type } ``` NB: This PR also starts allowing `~const` bounds in the generics and the where-clause of trait associated types since it's trivial to support them. However, I don't know if those bounds are actually useful. Maybe we should continue to reject them? For reference, it wouldn't make any sense to allow `~const Trait` in GACs (generic associated constants, `generic_const_items`) because they'd be absolutely useless (contrary to `const Trait`). ~~[`@]rustbot` ping project-const-traits~~ r? project-const-traits
…rrors Taint `_` placeholder types in trait impl method signatures We report an error right below for them, but that kind of broken type can cause subsequent ICEs. fixes rust-lang#119867
…=oli-obk Remove unused `ErrorReporting` variant from overflow handling r? oli-obk
fix typo in `fn()` docs
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler 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.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Jan 13, 2024
@bors r+ rollup=never p=5 |
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
Jan 13, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 13, 2024
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#119891 (rename `reported_signature_mismatch` to reflect its use) - rust-lang#119894 (Allow `~const` on associated type bounds again) - rust-lang#119896 (Taint `_` placeholder types in trait impl method signatures) - rust-lang#119898 (Remove unused `ErrorReporting` variant from overflow handling) - rust-lang#119902 (fix typo in `fn()` docs) r? `@ghost` `@rustbot` modify labels: rollup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler 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.
T-rustdoc
Relevant to the rustdoc 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:
reported_signature_mismatch
to reflect its use #119891 (renamereported_signature_mismatch
to reflect its use)~const
on associated type bounds again #119894 (Allow~const
on associated type bounds again)_
placeholder types in trait impl method signatures #119896 (Taint_
placeholder types in trait impl method signatures)ErrorReporting
variant from overflow handling #119898 (Remove unusedErrorReporting
variant from overflow handling)fn()
docs #119902 (fix typo infn()
docs)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup