mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 09:04:18 +00:00
test
This commit is contained in:
parent
18fdf59bf5
commit
1c80aadb05
6
tests/ui/ufcs/bad-builder.rs
Normal file
6
tests/ui/ufcs/bad-builder.rs
Normal file
@ -0,0 +1,6 @@
|
||||
fn hello<Q>() -> Vec<Q> {
|
||||
Vec::<Q>::mew()
|
||||
//~^ ERROR no function or associated item named `mew` found for struct `Vec<Q>` in the current scope
|
||||
}
|
||||
|
||||
fn main() {}
|
20
tests/ui/ufcs/bad-builder.stderr
Normal file
20
tests/ui/ufcs/bad-builder.stderr
Normal file
@ -0,0 +1,20 @@
|
||||
error[E0599]: no function or associated item named `mew` found for struct `Vec<Q>` in the current scope
|
||||
--> $DIR/bad-builder.rs:2:15
|
||||
|
|
||||
LL | Vec::<Q>::mew()
|
||||
| ^^^
|
||||
| |
|
||||
| function or associated item not found in `Vec<Q>`
|
||||
| help: there is an associated function with a similar name: `new`
|
||||
|
|
||||
note: if you're trying to build a new `Vec<Q>` 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
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0599`.
|
Loading…
Reference in New Issue
Block a user