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
{{ message }}
Repository navigation
check_for_deref_method suggestion can still introduce a parse error #104379
warning: unnecessary parentheses around type
--> epi.rs:2:19
|
2 | let length = <(&[u32])>::len;
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
2 - let length = <(&[u32])>::len;
2 + let length = <&[u32]>::len;
|
error[E0599]: the function or associated item `len` exists for reference `&[u32]`, but its trait bounds were not satisfied
--> epi.rs:2:30
|
2 | let length = <(&[u32])>::len;
| ^^^ function or associated item cannot be called on `&[u32]` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`&[u32]: ExactSizeIterator`
which is required by `&mut &[u32]: ExactSizeIterator`
help: the function `len` is implemented on `[u32]`
|
2 | let length = <(<[u32]>)>::len;
| ~~~~~~~
The suggestion isn't quite right, because introducing angle brackets here (already within angle brackets) produces a parse error.
Activity
lyming2007 commentedon Nov 14, 2022
@rustbot claim
Rollup merge of rust-lang#104497 - lyming2007:issue-104379-fix, r=fee…