Correctly deny late-bound lifetimes from parent in anon consts and TAITs
This commit is contained in:
parent
ab45885dec
commit
52aff53812
18 changed files with 230 additions and 150 deletions
|
@ -430,20 +430,30 @@ pub(crate) struct VariadicFunctionCompatibleConvention<'a> {
|
|||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
pub(crate) enum CannotCaptureLateBoundInAnonConst {
|
||||
#[diag(hir_analysis_cannot_capture_late_bound_ty_in_anon_const)]
|
||||
pub(crate) enum CannotCaptureLateBound {
|
||||
#[diag(hir_analysis_cannot_capture_late_bound_ty)]
|
||||
Type {
|
||||
#[primary_span]
|
||||
use_span: Span,
|
||||
#[label]
|
||||
def_span: Span,
|
||||
what: &'static str,
|
||||
},
|
||||
#[diag(hir_analysis_cannot_capture_late_bound_const_in_anon_const)]
|
||||
#[diag(hir_analysis_cannot_capture_late_bound_const)]
|
||||
Const {
|
||||
#[primary_span]
|
||||
use_span: Span,
|
||||
#[label]
|
||||
def_span: Span,
|
||||
what: &'static str,
|
||||
},
|
||||
#[diag(hir_analysis_cannot_capture_late_bound_lifetime)]
|
||||
Lifetime {
|
||||
#[primary_span]
|
||||
use_span: Span,
|
||||
#[label]
|
||||
def_span: Span,
|
||||
what: &'static str,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue