Skip to content

Conversation

@theemathas
Copy link
Contributor

This makes it consistent with other const traits in the standard library with supertraits.

I am currently unsure if const FnMut should require const FnOnce or not. See zulip discussion.

This file previously contained an error annotation with incorrect syntax.
Remove this annotation, as per the dev guide, since this is marked as known-bug.
https://rustc-dev-guide.rust-lang.org/tests/ui.html#known-bugs
@rustbot 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. labels Oct 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 21, 2025

r? @lcnr

rustbot has assigned @lcnr.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer


fn main() {
(const || (()).foo())();
// ^ ERROR: cannot call non-const method `<() as Foo>::foo` in constant functions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We sometimes leave these in to keep some context for when someone fixes the test. Fine here tho

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also dedup super traits for constness goals, like we already do for traits.

View changes since this review

@lcnr
Copy link
Contributor

lcnr commented Oct 23, 2025

idk if that should be part of this PR, regardless

r? @oli-obk

@rustbot rustbot assigned oli-obk and unassigned lcnr Oct 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2025

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants