File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
semantic_analysis/ast_node/declaration Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11use super :: { TyDeclParsedType , TyTraitInterfaceItem , TyTraitItem } ;
22use crate :: {
3- ast_elements:: type_parameter:: ConstGenericExpr ,
43 decl_engine:: DeclEngineGet as _,
54 engine_threading:: * ,
65 language:: parsed:: { self , AbiDeclaration } ,
Original file line number Diff line number Diff line change @@ -189,13 +189,17 @@ impl ty::TyConfigurableDecl {
189189 } )
190190 }
191191
192- pub ( crate ) fn forbid_const_generics (
192+ pub ( crate ) fn forbid_const_generics (
193193 & self ,
194194 handler : & Handler ,
195195 engines : & Engines ,
196196 ) -> Result < ( ) , ErrorEmitted > {
197197 if self . type_ascription . type_id . has_const_generics ( engines) {
198- Err ( handler. emit_err ( CompileError :: ConstGenericNotSupportedHere { span : self . type_ascription . span . clone ( ) } ) )
198+ Err (
199+ handler. emit_err ( CompileError :: ConstGenericNotSupportedHere {
200+ span : self . type_ascription . span . clone ( ) ,
201+ } ) ,
202+ )
199203 } else {
200204 Ok ( ( ) )
201205 }
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ impl TyDecl {
123123 Ok ( config_decl) => {
124124 config_decl. forbid_const_generics ( handler, engines) ?;
125125 ty:: TyDecl :: from ( decl_engine. insert ( config_decl, Some ( & decl_id) ) )
126- } ,
126+ }
127127 Err ( err) => ty:: TyDecl :: ErrorRecovery ( span, err) ,
128128 } ;
129129 ctx. insert_symbol ( handler, name, typed_const_decl. clone ( ) ) ?;
You can’t perform that action at this time.
0 commit comments