File tree Expand file tree Collapse file tree 4 files changed +9
-14
lines changed
crates/cairo-lang-semantic/src/items Expand file tree Collapse file tree 4 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -199,11 +199,10 @@ pub trait FreeFunctionSemantic<'db>: Database {
199199 fn free_function_declaration_implicit_precedence (
200200 & ' db self ,
201201 id : FreeFunctionId < ' db > ,
202- ) -> Maybe < ImplicitPrecedence < ' db > > {
203- Ok ( free_function_declaration_data ( self . as_dyn_database ( ) , id)
202+ ) -> Maybe < & ' db ImplicitPrecedence < ' db > > {
203+ Ok ( & free_function_declaration_data ( self . as_dyn_database ( ) , id)
204204 . maybe_as_ref ( ) ?
205- . implicit_precedence
206- . clone ( ) )
205+ . implicit_precedence )
207206 }
208207 /// Returns the generic params of a free function.
209208 fn free_function_generic_params (
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ pub trait FunctionWithBodySemantic<'db>: Database {
278278 fn function_declaration_implicit_precedence (
279279 & ' db self ,
280280 function_id : FunctionWithBodyId < ' db > ,
281- ) -> Maybe < ImplicitPrecedence < ' db > > {
281+ ) -> Maybe < & ' db ImplicitPrecedence < ' db > > {
282282 match function_id {
283283 FunctionWithBodyId :: Free ( id) => self . free_function_declaration_implicit_precedence ( id) ,
284284 FunctionWithBodyId :: Impl ( id) => self . impl_function_declaration_implicit_precedence ( id) ,
Original file line number Diff line number Diff line change @@ -4352,12 +4352,11 @@ pub trait ImplSemantic<'db>: Database {
43524352 fn impl_function_declaration_implicit_precedence (
43534353 & ' db self ,
43544354 id : ImplFunctionId < ' db > ,
4355- ) -> Maybe < ImplicitPrecedence < ' db > > {
4356- Ok ( impl_function_declaration_data ( self . as_dyn_database ( ) , id)
4355+ ) -> Maybe < & ' db ImplicitPrecedence < ' db > > {
4356+ Ok ( & impl_function_declaration_data ( self . as_dyn_database ( ) , id)
43574357 . maybe_as_ref ( ) ?
43584358 . function_declaration_data
4359- . implicit_precedence
4360- . clone ( ) )
4359+ . implicit_precedence )
43614360 }
43624361 /// Returns the trait function of an impl function.
43634362 fn impl_function_trait_function (
Original file line number Diff line number Diff line change @@ -1424,11 +1424,8 @@ pub trait TraitSemantic<'db>: Database {
14241424 fn trait_function_declaration_implicit_precedence (
14251425 & ' db self ,
14261426 trait_function_id : TraitFunctionId < ' db > ,
1427- ) -> Maybe < ImplicitPrecedence < ' db > > {
1428- Ok ( self
1429- . priv_trait_function_declaration_data ( trait_function_id) ?
1430- . implicit_precedence
1431- . clone ( ) )
1427+ ) -> Maybe < & ' db ImplicitPrecedence < ' db > > {
1428+ Ok ( & self . priv_trait_function_declaration_data ( trait_function_id) ?. implicit_precedence )
14321429 }
14331430 /// Returns the semantic diagnostics of a trait function definition (declaration + body).
14341431 fn trait_function_body_diagnostics (
You can’t perform that action at this time.
0 commit comments