Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add AnonConstKind to non_trivial_const_arg diagnostics #144324

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

Draft
dvtkrlbs wants to merge 3 commits into rust-lang:master
base: master
Choose a base branch
Loading
from dvtkrlbs:non-trivial-const-arg

Conversation

Copy link
Contributor

@dvtkrlbs dvtkrlbs commented Jul 22, 2025
edited
Loading

#142387

r? @compiler-errors

one thing I am not sure about is if AnonConstKind is always available (if not not sure how to make it optional since IntoDiagArg is not implemented for Option). Especially in one of the late diagnostics there is no context to add AnonConstKind to an error (some diagnostics about lifetimes).

@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 Jul 22, 2025
@dvtkrlbs dvtkrlbs marked this pull request as draft July 22, 2025 19:59
@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 Jul 22, 2025
item: Option<(Ident, ConstantItemKind)>,
f: impl FnOnce(&mut Self),
) {
let f = |this: &mut Self| {
this.with_rib(ValueNS, RibKind::ConstantItem(may_use_generics, item), |this| {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Really not sure bout this one since it is nested ConstantItems

@@ -3337,6 +3337,7 @@ impl<'ast, 'ra, 'tcx> LateResolutionVisitor<'_, 'ast, 'ra, 'tcx> {
.sess
.is_nightly_build()
.then_some(errors::ParamInNonTrivialAnonConstHelp),
place: AnonConstKind::InlineConst,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no context here so I am just defaulting to InlineConst. I need to fix this

Copy link
Collaborator

bors commented Aug 2, 2025

☔ The latest upstream changes (presumably #129183) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /