-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
base: master
Are you sure you want to change the base?
Conversation
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| { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
ae7ce72
to
4669414
Compare
☔ The latest upstream changes (presumably #129183) made this pull request unmergeable. Please resolve the merge conflicts. |
#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).