Add test description

This commit is contained in:
Oli Scherer 2024-05-28 09:34:16 +00:00
parent 81895065bb
commit ffb1b2c148
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
error[E0599]: no function or associated item named `foo` found for struct `Foo<B>` in the current scope
--> $DIR/ufc-method-call.rs:21:27
--> $DIR/ufc-method-call.rs:27:27
|
LL | pub struct Foo<T>(T);
| ----------------- function or associated item `foo` not found for this struct

View File

@ -1,3 +1,9 @@
//! This test used to report that the method call cannot
//! call the private method `Foo<A>::foo`, even though the user
//! explicitly selected `Foo<B>::foo`. This is because we only
//! looked for methods of the right name, without properly checking
//! the `Self` type
//@ revisions: same_name different_name
pub mod test {

View File

@ -1,5 +1,5 @@
error[E0624]: associated function `foo` is private
--> $DIR/ufc-method-call.rs:21:27
--> $DIR/ufc-method-call.rs:27:27
|
LL | fn foo() {}
| -------- private associated function defined here