Skip to content

fix clippy

fix clippy #468

GitHub Actions / clippy failed Oct 23, 2024 in 1s

clippy

18 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 18
Warning 0
Note 0
Help 0

Versions

  • rustc 1.84.0-nightly (86d69c705 2024-10-22)
  • cargo 1.84.0-nightly (cf53cc54b 2024-10-18)
  • clippy 0.1.84 (86d69c705a 2024-10-22)

Annotations

Check failure on line 188 in scopegraphs/src/scopegraph.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
   --> scopegraphs/src/scopegraph.rs:188:6
    |
188 | impl<'sg, LABEL, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
    |      ^^^                                ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
188 - impl<'sg, LABEL, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
188 + impl<LABEL, DATA, CMPL> ScopeGraph<'_, LABEL, DATA, CMPL>
    |

Check failure on line 136 in scopegraphs/src/scopegraph.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
   --> scopegraphs/src/scopegraph.rs:136:6
    |
136 | impl<'sg, LABEL, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
    |      ^^^                                ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
136 - impl<'sg, LABEL, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
136 + impl<LABEL, DATA, CMPL> ScopeGraph<'_, LABEL, DATA, CMPL>
    |

Check failure on line 64 in scopegraphs/src/scopegraph.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
  --> scopegraphs/src/scopegraph.rs:64:6
   |
64 | impl<'sg, LABEL: Hash + Eq, DATA> InnerScopeGraph<'sg, LABEL, DATA> {
   |      ^^^                                          ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
64 - impl<'sg, LABEL: Hash + Eq, DATA> InnerScopeGraph<'sg, LABEL, DATA> {
64 + impl<LABEL: Hash + Eq, DATA> InnerScopeGraph<'_, LABEL, DATA> {
   |

Check failure on line 388 in scopegraphs/src/resolve/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

error: very complex type used. Consider factoring parts into `type` definitions
   --> scopegraphs/src/resolve/mod.rs:379:10
    |
379 |       ) -> Result<
    |  __________^
380 | |         ResolvedPath<'sg, LABEL, DATA>,
381 | |         OnlyElementError<
382 | |             'a,
...   |
387 | |         >,
388 | |     > {
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
    = note: `-D clippy::type-complexity` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::type_complexity)]`

Check failure on line 180 in scopegraphs/src/resolve/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
   --> scopegraphs/src/resolve/mod.rs:180:6
    |
180 | impl<'sg, LABEL, DATA> ResolvedPath<'sg, LABEL, DATA> {
    |      ^^^                            ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
180 - impl<'sg, LABEL, DATA> ResolvedPath<'sg, LABEL, DATA> {
180 + impl<LABEL, DATA> ResolvedPath<'_, LABEL, DATA> {
    |

Check failure on line 168 in scopegraphs/src/resolve/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
   --> scopegraphs/src/resolve/mod.rs:168:6
    |
168 | impl<'sg, LABEL, DATA> ResolvedPath<'sg, LABEL, DATA> {
    |      ^^^                            ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
168 - impl<'sg, LABEL, DATA> ResolvedPath<'sg, LABEL, DATA> {
168 + impl<LABEL, DATA> ResolvedPath<'_, LABEL, DATA> {
    |

Check failure on line 159 in scopegraphs/src/resolve/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
   --> scopegraphs/src/resolve/mod.rs:159:6
    |
159 | impl<'sg, LABEL: Clone, DATA> Clone for ResolvedPath<'sg, LABEL, DATA> {
    |      ^^^                                             ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
159 - impl<'sg, LABEL: Clone, DATA> Clone for ResolvedPath<'sg, LABEL, DATA> {
159 + impl<LABEL: Clone, DATA> Clone for ResolvedPath<'_, LABEL, DATA> {
    |

Check failure on line 91 in scopegraphs/src/resolve/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'a

error: the following explicit lifetimes could be elided: 'a
  --> scopegraphs/src/resolve/mod.rs:91:6
   |
91 | impl<'a, LABEL> Iterator for PathScopeIterator<'a, LABEL> {
   |      ^^                                        ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
91 - impl<'a, LABEL> Iterator for PathScopeIterator<'a, LABEL> {
91 + impl<LABEL> Iterator for PathScopeIterator<'_, LABEL> {
   |

Check failure on line 106 in scopegraphs/src/resolve/lookup.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'storage

error: the following explicit lifetimes could be elided: 'storage
   --> scopegraphs/src/resolve/lookup.rs:106:6
    |
106 | impl<'storage, 'sg: 'rslv, 'rslv, LABEL, DATA, CMPL, DWF, LO, DEq>
    |      ^^^^^^^^
107 |     ResolutionContext<'storage, 'sg, 'rslv, LABEL, DATA, CMPL, DWF, LO, DEq>
    |                       ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
106 ~ impl<'sg: 'rslv, 'rslv, LABEL, DATA, CMPL, DWF, LO, DEq>
107 ~     ResolutionContext<'_, 'sg, 'rslv, LABEL, DATA, CMPL, DWF, LO, DEq>
    |

Check failure on line 33 in scopegraphs/src/future_wrapper.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'fut

error: the following explicit lifetimes could be elided: 'fut
  --> scopegraphs/src/future_wrapper.rs:33:6
   |
33 | impl<'fut, T: Clone> Future for FutureWrapper<'fut, T> {
   |      ^^^^                                     ^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
33 - impl<'fut, T: Clone> Future for FutureWrapper<'fut, T> {
33 + impl<T: Clone> Future for FutureWrapper<'_, T> {
   |

Check failure on line 14 in scopegraphs/src/future_wrapper.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'fut

error: the following explicit lifetimes could be elided: 'fut
  --> scopegraphs/src/future_wrapper.rs:14:6
   |
14 | impl<'fut, T> Clone for FutureWrapper<'fut, T> {
   |      ^^^^                             ^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
14 - impl<'fut, T> Clone for FutureWrapper<'fut, T> {
14 + impl<T> Clone for FutureWrapper<'_, T> {
   |

Check failure on line 202 in scopegraphs/src/completeness/explicit.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
   --> scopegraphs/src/completeness/explicit.rs:202:6
    |
202 | impl<'sg, LABEL: Hash + Eq + Copy, DATA> ScopeGraph<'sg, LABEL, DATA, FutureCompleteness<LABEL>> {
    |      ^^^                                            ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
202 - impl<'sg, LABEL: Hash + Eq + Copy, DATA> ScopeGraph<'sg, LABEL, DATA, FutureCompleteness<LABEL>> {
202 + impl<LABEL: Hash + Eq + Copy, DATA> ScopeGraph<'_, LABEL, DATA, FutureCompleteness<LABEL>> {
    |

Check failure on line 112 in scopegraphs/src/completeness/explicit.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
   --> scopegraphs/src/completeness/explicit.rs:112:6
    |
112 | impl<'sg, LABEL: Hash + Eq, DATA> ScopeGraph<'sg, LABEL, DATA, ExplicitClose<LABEL>> {
    |      ^^^                                     ^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
112 - impl<'sg, LABEL: Hash + Eq, DATA> ScopeGraph<'sg, LABEL, DATA, ExplicitClose<LABEL>> {
112 + impl<LABEL: Hash + Eq, DATA> ScopeGraph<'_, LABEL, DATA, ExplicitClose<LABEL>> {
    |

Check failure on line 94 in scopegraphs/src/completeness/critical_edge.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
  --> scopegraphs/src/completeness/critical_edge.rs:94:6
   |
94 | impl<'sg, LABEL: Hash + Eq, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
   |      ^^^                                           ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
94 - impl<'sg, LABEL: Hash + Eq, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
94 + impl<LABEL: Hash + Eq, DATA, CMPL> ScopeGraph<'_, LABEL, DATA, CMPL>
   |

Check failure on line 71 in scopegraphs/src/completeness/critical_edge.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
  --> scopegraphs/src/completeness/critical_edge.rs:71:6
   |
71 | impl<'sg, LABEL: Hash + Eq, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
   |      ^^^                                           ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
71 - impl<'sg, LABEL: Hash + Eq, DATA, CMPL> ScopeGraph<'sg, LABEL, DATA, CMPL>
71 + impl<LABEL: Hash + Eq, DATA, CMPL> ScopeGraph<'_, LABEL, DATA, CMPL>
   |

Check failure on line 47 in scopegraphs/src/render/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
  --> scopegraphs/src/render/mod.rs:47:6
   |
47 | impl<'sg, LABEL, DATA> Default for RenderSettings<'sg, LABEL, DATA> {
   |      ^^^                                          ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
47 - impl<'sg, LABEL, DATA> Default for RenderSettings<'sg, LABEL, DATA> {
47 + impl<LABEL, DATA> Default for RenderSettings<'_, LABEL, DATA> {
   |

Check failure on line 39 in scopegraphs/src/render/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'sg

error: the following explicit lifetimes could be elided: 'sg
  --> scopegraphs/src/render/mod.rs:39:6
   |
39 | impl<'sg, LABEL, DATA> RenderSettings<'sg, LABEL, DATA> {
   |      ^^^                              ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
   |
39 - impl<'sg, LABEL, DATA> RenderSettings<'sg, LABEL, DATA> {
39 + impl<LABEL, DATA> RenderSettings<'_, LABEL, DATA> {
   |

Check failure on line 647 in scopegraphs/src/resolve/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

elided lifetime has a name

error: elided lifetime has a name
   --> scopegraphs/src/resolve/mod.rs:647:9
    |
642 |     pub fn query<'sg>(
    |                  --- lifetime `'sg` declared here
...
647 |         '_,
    |         ^^ this elided lifetime gets resolved as `'sg`
    |
    = note: `-D elided-named-lifetimes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(elided_named_lifetimes)]`