diff options
| author | lcnr <rust@lcnr.de> | 2022-09-08 15:10:49 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-09-08 16:50:44 +0200 |
| commit | b79a2b3f73f0710150a8ccc71b72e847d6c1c7c2 (patch) | |
| tree | 57ab97fc71fdec238854341601453bdd5c3d0b2d /compiler/rustc_ast_passes/src | |
| parent | ccb5595df2ed412eda6444edc7eaf06f709fa79d (diff) | |
| download | rust-b79a2b3f73f0710150a8ccc71b72e847d6c1c7c2.tar.gz rust-b79a2b3f73f0710150a8ccc71b72e847d6c1c7c2.zip | |
update `ParamKindOrd`
Diffstat (limited to 'compiler/rustc_ast_passes/src')
| -rw-r--r-- | compiler/rustc_ast_passes/src/ast_validation.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast_passes/src/ast_validation.rs b/compiler/rustc_ast_passes/src/ast_validation.rs index d6d8881a53a..26813f2c19c 100644 --- a/compiler/rustc_ast_passes/src/ast_validation.rs +++ b/compiler/rustc_ast_passes/src/ast_validation.rs @@ -845,10 +845,10 @@ fn validate_generic_param_order( let (kind, bounds, span) = (¶m.kind, ¶m.bounds, ident.span); let (ord_kind, ident) = match ¶m.kind { GenericParamKind::Lifetime => (ParamKindOrd::Lifetime, ident.to_string()), - GenericParamKind::Type { default: _ } => (ParamKindOrd::Type, ident.to_string()), + GenericParamKind::Type { default: _ } => (ParamKindOrd::TypeOrConst, ident.to_string()), GenericParamKind::Const { ref ty, kw_span: _, default: _ } => { let ty = pprust::ty_to_string(ty); - (ParamKindOrd::Const, format!("const {}: {}", ident, ty)) + (ParamKindOrd::TypeOrConst, format!("const {}: {}", ident, ty)) } }; param_idents.push((kind, ord_kind, bounds, idx, ident)); |
