Disentangle ForwardGenericParamBan and ConstParamTy ribs
This commit is contained in:
parent
0998d4095b
commit
42773bfcac
29 changed files with 196 additions and 114 deletions
|
@ -32,7 +32,10 @@ use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};
|
|||
use effective_visibilities::EffectiveVisibilitiesVisitor;
|
||||
use errors::{ParamKindInEnumDiscriminant, ParamKindInNonTrivialAnonConst};
|
||||
use imports::{Import, ImportData, ImportKind, NameResolution};
|
||||
use late::{HasGenericParams, PathSource, PatternSource, UnnecessaryQualification};
|
||||
use late::{
|
||||
ForwardGenericParamBanReason, HasGenericParams, PathSource, PatternSource,
|
||||
UnnecessaryQualification,
|
||||
};
|
||||
use macros::{MacroRulesBinding, MacroRulesScope, MacroRulesScopeRef};
|
||||
use rustc_arena::{DroplessArena, TypedArena};
|
||||
use rustc_ast::expand::StrippedCfgItem;
|
||||
|
@ -273,7 +276,7 @@ enum ResolutionError<'ra> {
|
|||
shadowed_binding_span: Span,
|
||||
},
|
||||
/// Error E0128: generic parameters with a default cannot use forward-declared identifiers.
|
||||
ForwardDeclaredGenericParam,
|
||||
ForwardDeclaredGenericParam(Symbol, ForwardGenericParamBanReason),
|
||||
// FIXME(generic_const_parameter_types): This should give custom output specifying it's only
|
||||
// problematic to use *forward declared* parameters when the feature is enabled.
|
||||
/// ERROR E0770: the type of const parameters must not depend on other generic parameters.
|
||||
|
@ -287,7 +290,7 @@ enum ResolutionError<'ra> {
|
|||
/// This error is emitted even with `generic_const_exprs`.
|
||||
ParamInEnumDiscriminant { name: Symbol, param_kind: ParamKindInEnumDiscriminant },
|
||||
/// Error E0735: generic parameters with a default cannot use `Self`
|
||||
SelfInGenericParamDefault,
|
||||
ForwardDeclaredSelf(ForwardGenericParamBanReason),
|
||||
/// Error E0767: use of unreachable label
|
||||
UnreachableLabel { name: Symbol, definition_span: Span, suggestion: Option<LabelSuggestion> },
|
||||
/// Error E0323, E0324, E0325: mismatch between trait item and impl item.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue