Skip to content

Fixes two elided_named_lifetimes warnings#1680

Merged
seanyoung merged 3 commits intohyperledger-solang:mainfrom
smoelius:elided-named-lifetimes
Feb 2, 2025
Merged

Fixes two elided_named_lifetimes warnings#1680
seanyoung merged 3 commits intohyperledger-solang:mainfrom
smoelius:elided-named-lifetimes

Conversation

@smoelius
Copy link
Contributor

When I build Solang, I see these two warnings:

warning: elided lifetime has a name
   --> src/emit/mod.rs:375:18
    |
369 |     pub fn binary<'a>(
    |                   -- lifetime `'a` declared here
...
375 |     ) -> binary::Binary {
    |                  ^^^^^^ this elided lifetime gets resolved as `'a`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default

warning: elided lifetime has a name
   --> src/sema/builtin_structs.rs:243:59
    |
243 |     pub fn definition<'a>(&'a self, ns: &'a Namespace) -> &StructDecl {
    |                       -- lifetime `'a` declared here      ^ this elided lifetime gets resolved as `'a`

This PR addresses both of the warnings.

Signed-off-by: Samuel Moelius <samuel.moelius@trailofbits.com>
@seanyoung seanyoung merged commit e5dc149 into hyperledger-solang:main Feb 2, 2025
3 of 10 checks passed
@smoelius smoelius deleted the elided-named-lifetimes branch May 12, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants