Rollup merge of #138403 - Bryanskiy:delegation-ice-2, r=petrochenkov
Delegation: one more ICE fix for `MethodCall` generation self-explanatory Fixes https://github.com/rust-lang/rust/issues/138362 r? `@petrochenkov`
This commit is contained in:
commit
8d28328049
3 changed files with 35 additions and 0 deletions
15
tests/ui/delegation/ice-issue-138362.rs
Normal file
15
tests/ui/delegation/ice-issue-138362.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait HasSelf {
|
||||
fn method(self);
|
||||
}
|
||||
trait NoSelf {
|
||||
fn method();
|
||||
}
|
||||
impl NoSelf for u8 {
|
||||
reuse HasSelf::method;
|
||||
//~^ ERROR this function takes 1 argument but 0 arguments were supplied
|
||||
}
|
||||
|
||||
fn main() {}
|
19
tests/ui/delegation/ice-issue-138362.stderr
Normal file
19
tests/ui/delegation/ice-issue-138362.stderr
Normal file
|
@ -0,0 +1,19 @@
|
|||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> $DIR/ice-issue-138362.rs:11:20
|
||||
|
|
||||
LL | reuse HasSelf::method;
|
||||
| ^^^^^^ argument #1 is missing
|
||||
|
|
||||
note: method defined here
|
||||
--> $DIR/ice-issue-138362.rs:5:8
|
||||
|
|
||||
LL | fn method(self);
|
||||
| ^^^^^^ ----
|
||||
help: provide the argument
|
||||
|
|
||||
LL | reuse HasSelf::method(/* value */);
|
||||
| +++++++++++++
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0061`.
|
Loading…
Add table
Add a link
Reference in a new issue