forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#121323 - compiler-errors:raw-param-types, r=oli-obk Don't use raw parameter types in `find_builder_fn` We shouldn't really ever be using `EarlyBinder::skip_binder` then performing type equality, since param types will never be equal to other types. When checking compatibility with the signature, we instead create some fresh args. Fixes rust-lang#121314
- Loading branch information
Showing
4 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |