@@ -215,7 +215,7 @@ enum ResolutionError<'a> {
215
215
/// Error E0128: type parameters with a default cannot use forward-declared identifiers.
216
216
ForwardDeclaredTyParam , // FIXME(const_generics:defaults)
217
217
/// ERROR E0770: the type of const parameters must not depend on other generic parameters.
218
- ParamInTyOfConstArg ,
218
+ ParamInTyOfConstArg ( Symbol ) ,
219
219
/// Error E0735: type parameters with a default cannot use `Self`
220
220
SelfInTyParamDefault ,
221
221
/// Error E0767: use of unreachable label
@@ -2484,7 +2484,7 @@ impl<'a> Resolver<'a> {
2484
2484
}
2485
2485
ConstParamTyRibKind => {
2486
2486
if record_used {
2487
- self . report_error ( span, ParamInTyOfConstArg ) ;
2487
+ self . report_error ( span, ParamInTyOfConstArg ( rib_ident . name ) ) ;
2488
2488
}
2489
2489
return Res :: Err ;
2490
2490
}
@@ -2513,7 +2513,10 @@ impl<'a> Resolver<'a> {
2513
2513
FnItemRibKind => HasGenericParams :: Yes ,
2514
2514
ConstParamTyRibKind => {
2515
2515
if record_used {
2516
- self . report_error ( span, ResolutionError :: ParamInTyOfConstArg ) ;
2516
+ self . report_error (
2517
+ span,
2518
+ ResolutionError :: ParamInTyOfConstArg ( rib_ident. name ) ,
2519
+ ) ;
2517
2520
}
2518
2521
return Res :: Err ;
2519
2522
}
@@ -2552,7 +2555,10 @@ impl<'a> Resolver<'a> {
2552
2555
FnItemRibKind => HasGenericParams :: Yes ,
2553
2556
ConstParamTyRibKind => {
2554
2557
if record_used {
2555
- self . report_error ( span, ResolutionError :: ParamInTyOfConstArg ) ;
2558
+ self . report_error (
2559
+ span,
2560
+ ResolutionError :: ParamInTyOfConstArg ( rib_ident. name ) ,
2561
+ ) ;
2556
2562
}
2557
2563
return Res :: Err ;
2558
2564
}
0 commit comments