Add test description
This commit is contained in:
parent
81895065bb
commit
ffb1b2c148
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user