Skip to content

Commit

Permalink
Add test description
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 4, 2024
1 parent 8189506 commit ffb1b2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/ui/privacy/ufc-method-call.different_name.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions tests/ui/privacy/ufc-method-call.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/privacy/ufc-method-call.same_name.stderr
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ffb1b2c

Please sign in to comment.