rust/tests/ui/suggestions/deref-path-method.stderr
Esteban Küber f926031ea5 When not finding assoc fn on type, look for builder fn
When we have a resolution error when looking at a fully qualified path
on a type, look for all associated functions on inherent impls that
return `Self` and mention them to the user.

Fix #69512.
2023-11-07 00:54:10 +00:00

22 lines
764 B
Plaintext

error[E0599]: no function or associated item named `contains` found for struct `Vec<_, _>` in the current scope
--> $DIR/deref-path-method.rs:3:10
|
LL | Vec::contains(&vec, &0);
| ^^^^^^^^ function or associated item not found in `Vec<_, _>`
|
note: if you're trying to build a new `Vec<_, _>` consider using one of the following associated functions:
Vec::<T>::new
Vec::<T>::with_capacity
Vec::<T>::from_raw_parts
Vec::<T, A>::new_in
and 2 others
--> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
help: the function `contains` is implemented on `[_]`
|
LL | <[_]>::contains(&vec, &0);
| ~~~~~
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.