Closed
Description
In #100227, someone was a little confused by <&[T]>::contains
not being accessible asVec::<T>::contains
.
fn test() {
let vec = Vec::new();
Vec::contains(&vec, &0);
}
The current output is:
error[E0599]: no function or associated item named `contains` found for struct `Vec<_, _>` in the current scope
--> src/lib.rs:3:10
|
3 | Vec::contains(&vec, &0);
| ^^^^^^^^ function or associated item not found in `Vec<_, _>`
For more information about this error, try `rustc --explain E0599`.
Ideally, it would add a note about the method being found on a type that Vec<_, _>
can deref to.