Deny capturing late-bound non-lifetime param in anon const
This commit is contained in:
parent
b583ede652
commit
cbf4d4e3a5
5 changed files with 121 additions and 5 deletions
|
@ -381,3 +381,21 @@ pub(crate) struct VariadicFunctionCompatibleConvention<'a> {
|
|||
pub span: Span,
|
||||
pub conventions: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
pub(crate) enum CannotCaptureLateBoundInAnonConst {
|
||||
#[diag(hir_analysis_cannot_capture_late_bound_ty_in_anon_const)]
|
||||
Type {
|
||||
#[primary_span]
|
||||
use_span: Span,
|
||||
#[label]
|
||||
def_span: Span,
|
||||
},
|
||||
#[diag(hir_analysis_cannot_capture_late_bound_const_in_anon_const)]
|
||||
Const {
|
||||
#[primary_span]
|
||||
use_span: Span,
|
||||
#[label]
|
||||
def_span: Span,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue