Add until
modifier to within
pattern
#441
clippy
8 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 8 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.77.2 (25ef9e3d8 2024-04-09)
- cargo 1.77.2 (e52e36006 2024-03-26)
- clippy 0.1.77 (25ef9e3 2024-04-09)
Annotations
Check failure on line 36 in crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs
github-actions / clippy
type mismatch resolving `<Q as QueryContext>::Node<'_> == &<Q as QueryContext>::Node<'a>`
error[E0271]: type mismatch resolving `<Q as QueryContext>::Node<'_> == &<Q as QueryContext>::Node<'a>`
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:36:28
|
36 | Self::from_binding(Binding::from_node(node))
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found `&<Q as QueryContext>::Node<'_>`
|
= note: expected associated type `<Q as context::QueryContext>::Node<'_>`
found reference `&<Q as context::QueryContext>::Node<'a>`
Check failure on line 80 in crates/grit-pattern-matcher/src/pattern/list_index.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> crates/grit-pattern-matcher/src/pattern/list_index.rs:80:72
|
80 | ... ResolvedPattern::from_node_binding(n),
| ---------------------------------- ^ expected `&_`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected reference `&_`
found associated type `<Q as context::QueryContext>::Node<'a>`
= help: consider constraining the associated type `<Q as context::QueryContext>::Node<'a>` to `&_`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
note: associated function defined here
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:35:8
|
35 | fn from_node_binding(node: &Q::Node<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^ ------------------
help: consider using `as_ref` instead
|
78 | .as_ref().map(|n| {
| +++++++++
Check failure on line 112 in crates/grit-pattern-matcher/src/pattern/contains.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> crates/grit-pattern-matcher/src/pattern/contains.rs:112:61
|
112 | &ResolvedPattern::from_node_binding(item),
| ---------------------------------- ^^^^ expected `&_`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected reference `&_`
found associated type `<Q as context::QueryContext>::Node<'a>`
note: associated function defined here
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:35:8
|
35 | fn from_node_binding(node: &Q::Node<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^ ------------------
help: consider constraining the associated type `<Q as context::QueryContext>::Node<'a>` to `&_`
|
88 | impl<Q: QueryContext<Node<'a> = &_>> Matcher<Q> for Contains<Q> {
| +++++++++++++++
help: consider borrowing here
|
112 | &ResolvedPattern::from_node_binding(&item),
| +
Check failure on line 48 in crates/grit-pattern-matcher/src/pattern/contains.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> crates/grit-pattern-matcher/src/pattern/contains.rs:48:59
|
48 | let node_lhs = ResolvedPattern::from_node_binding(node);
| ---------------------------------- ^^^^ expected `&_`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected reference `&_`
found associated type `<Q as context::QueryContext>::Node<'a>`
note: associated function defined here
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:35:8
|
35 | fn from_node_binding(node: &Q::Node<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^ ------------------
help: consider constraining the associated type `<Q as context::QueryContext>::Node<'a>` to `&_`
|
34 | fn execute_until<'a, Q: QueryContext<Node<'a> = &_>>(
| +++++++++++++++
help: consider borrowing here
|
48 | let node_lhs = ResolvedPattern::from_node_binding(&node);
| +
Check failure on line 75 in crates/grit-pattern-matcher/src/pattern/before.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> crates/grit-pattern-matcher/src/pattern/before.rs:75:49
|
75 | &ResolvedPattern::from_node_binding(next_node),
| ---------------------------------- ^^^^^^^^^ expected `&_`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected reference `&_`
found associated type `<Q as context::QueryContext>::Node<'_>`
note: associated function defined here
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:35:8
|
35 | fn from_node_binding(node: &Q::Node<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^ ------------------
help: consider constraining the associated type `<Q as context::QueryContext>::Node<'_>` to `&_`
|
55 | impl<Q: QueryContext<Node<'_> = &_>> Matcher<Q> for Before<Q> {
| +++++++++++++++
help: consider borrowing here
|
75 | &ResolvedPattern::from_node_binding(&next_node),
| +
Check failure on line 36 in crates/grit-pattern-matcher/src/pattern/before.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> crates/grit-pattern-matcher/src/pattern/before.rs:36:51
|
36 | Ok(ResolvedPattern::from_node_binding(prev))
| ---------------------------------- ^^^^ expected `&_`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected reference `&_`
found associated type `<Q as context::QueryContext>::Node<'_>`
note: associated function defined here
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:35:8
|
35 | fn from_node_binding(node: &Q::Node<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^ ------------------
help: consider constraining the associated type `<Q as context::QueryContext>::Node<'_>` to `&_`
|
19 | impl<Q: QueryContext<Node<'_> = &_>> Before<Q> {
| +++++++++++++++
help: consider borrowing here
|
36 | Ok(ResolvedPattern::from_node_binding(&prev))
| +
Check failure on line 76 in crates/grit-pattern-matcher/src/pattern/after.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> crates/grit-pattern-matcher/src/pattern/after.rs:76:49
|
76 | &ResolvedPattern::from_node_binding(prev_node),
| ---------------------------------- ^^^^^^^^^ expected `&_`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected reference `&_`
found associated type `<Q as context::QueryContext>::Node<'_>`
note: associated function defined here
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:35:8
|
35 | fn from_node_binding(node: &Q::Node<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^ ------------------
help: consider constraining the associated type `<Q as context::QueryContext>::Node<'_>` to `&_`
|
56 | impl<Q: QueryContext<Node<'_> = &_>> Matcher<Q> for After<Q> {
| +++++++++++++++
help: consider borrowing here
|
76 | &ResolvedPattern::from_node_binding(&prev_node),
| +
Check failure on line 37 in crates/grit-pattern-matcher/src/pattern/after.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> crates/grit-pattern-matcher/src/pattern/after.rs:37:54
|
37 | Ok(Q::ResolvedPattern::from_node_binding(next))
| ------------------------------------- ^^^^ expected `&<Q as QueryContext>::Node<'_>`, found associated type
| |
| arguments to this function are incorrect
|
= note: expected reference `&<Q as context::QueryContext>::Node<'_>`
found associated type `<Q as context::QueryContext>::Node<'_>`
note: associated function defined here
--> crates/grit-pattern-matcher/src/pattern/resolved_pattern.rs:35:8
|
35 | fn from_node_binding(node: &Q::Node<'a>) -> Self {
| ^^^^^^^^^^^^^^^^^ ------------------
help: consider constraining the associated type `<Q as context::QueryContext>::Node<'_>` to `&<Q as context::QueryContext>::Node<'_>`
|
20 | impl<Q: QueryContext<Node<'_> = &<Q as context::QueryContext>::Node<'_>>> After<Q> {
| ++++++++++++++++++++++++++++++++++++++++++++++++++++
help: consider borrowing here
|
37 | Ok(Q::ResolvedPattern::from_node_binding(&next))
| +