You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the correct syntax for referring to a trait method with Clippy's disallowed-methods field in clippy.toml?
In this, heapless::index_map::IndexMap::extend is generic over multiple arguments impl<'a, K, V, S, const N: usize> Extend<(&'a K, &'a V)> for IndexMap<K, V, S, N> as well as having a second impl<K, V, S, const N: usize> Extend<(K, V)> for IndexMap<K, V, S, N>.
How do I write the fully qualified path for both of these (or some singular path that refers to both) that Clippy will understand?
If I force it to be an invalid path by changing the function name to something garbage, Clippy does not give me a warning that the path is invalid, so I know this syntax isn't correct.
disallowed-methods = [
{ path = "<heapless::index_map::IndexMap as core::iter::Extend>::invalid" }, # note: invalid method name to test whether this path syntax is correct
]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
What's the correct syntax for referring to a trait method with Clippy's
disallowed-methodsfield in clippy.toml?In this,
heapless::index_map::IndexMap::extendis generic over multiple argumentsimpl<'a, K, V, S, const N: usize> Extend<(&'a K, &'a V)> for IndexMap<K, V, S, N>as well as having a secondimpl<K, V, S, const N: usize> Extend<(K, V)> for IndexMap<K, V, S, N>.How do I write the fully qualified path for both of these (or some singular path that refers to both) that Clippy will understand?
If I force it to be an invalid path by changing the function name to something garbage, Clippy does not give me a warning that the path is invalid, so I know this syntax isn't correct.
Beta Was this translation helpful? Give feedback.
All reactions