Skip to content
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

Tweak wording of non-const traits used as const bounds #134094

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Dec 9, 2024

Use verbose suggestions and add additional labels/notes.

r? @compiler-errors

@rustbot
Copy link
Collaborator

rustbot commented Dec 9, 2024

HIR ty lowering was modified

cc @fmease

@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. labels Dec 9, 2024
@@ -2,7 +2,7 @@ error: const `impl` for trait `FromResidual` which is not marked with `#[const_t
--> $DIR/const-try.rs:15:12
|
LL | impl const FromResidual<Error> for TryMe {
| ^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^ not marked with `#[const_trait]`
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated, but this note is kinda nonsense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's an untouched note since at least 2022 (and before that it was moved from somewhere else), so it'll be hard to figure out what they wanted to say then :)

I think that with the current context we can remove this?

Copy link
Member

Choose a reason for hiding this comment

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

sure, or it could just be guaranteed to only trigger within default methods, but that might be difficult to fix, and i'd rather not see hacks to do that.

tests/ui/consts/const-try.stderr Outdated Show resolved Hide resolved
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 9, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 9, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Dec 9, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

please fix ci, then r=me

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 9, 2024

📌 Commit 781c622 has been approved by compiler-errors

It is now in the queue for this repository.

@bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 9, 2024
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 9, 2024
Use verbose suggestions and add additional labels/notes.

Add more test cases for stable/nightly and feature enabled/disabled.
@estebank
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Dec 10, 2024

📌 Commit 4007fc9 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 10, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 10, 2024
fmease added a commit to fmease/rust that referenced this pull request Dec 10, 2024
…piler-errors

Tweak wording of non-const traits used as const bounds

Use verbose suggestions and add additional labels/notes.

r? `@compiler-errors`
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#134042 (Add the `power8-crypto` target feature)
 - rust-lang#134070 (Some asm! diagnostic adjustments and a papercut fix)
 - rust-lang#134094 (Tweak wording of non-const traits used as const bounds)
 - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP)
 - rust-lang#134103 (Don't ICE when encountering never in range pattern)
 - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`)
 - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20)
 - rust-lang#134116 (stabilize const_nonnull_new)
 - rust-lang#134120 (Remove Felix from ping groups and review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#133583 (Fix type (exit → exist))
 - rust-lang#134042 (Add the `power8-crypto` target feature)
 - rust-lang#134094 (Tweak wording of non-const traits used as const bounds)
 - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP)
 - rust-lang#134103 (Don't ICE when encountering never in range pattern)
 - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`)
 - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20)
 - rust-lang#134116 (stabilize const_nonnull_new)
 - rust-lang#134120 (Remove Felix from ping groups and review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#133583 (Fix type (exit → exist))
 - rust-lang#134042 (Add the `power8-crypto` target feature)
 - rust-lang#134094 (Tweak wording of non-const traits used as const bounds)
 - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP)
 - rust-lang#134103 (Don't ICE when encountering never in range pattern)
 - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`)
 - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20)
 - rust-lang#134116 (stabilize const_nonnull_new)
 - rust-lang#134120 (Remove Felix from ping groups and review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2024
Rollup of 9 pull requests

Successful merges:

 - rust-lang#133583 (Fix type (exit → exist))
 - rust-lang#134042 (Add the `power8-crypto` target feature)
 - rust-lang#134094 (Tweak wording of non-const traits used as const bounds)
 - rust-lang#134100 (Remove rustc_const_stable attribute on const NOOP)
 - rust-lang#134103 (Don't ICE when encountering never in range pattern)
 - rust-lang#134113 (run-make: Fix `assert_stderr_not_contains_regex`)
 - rust-lang#134115 (rustc_target: ppc64 target string fixes for LLVM 20)
 - rust-lang#134116 (stabilize const_nonnull_new)
 - rust-lang#134120 (Remove Felix from ping groups and review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 185440a into rust-lang:master Dec 11, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 11, 2024
Rollup merge of rust-lang#134094 - estebank:const-trait-errors, r=compiler-errors

Tweak wording of non-const traits used as const bounds

Use verbose suggestions and add additional labels/notes.

r? ``@compiler-errors``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants