diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/traits/method-private.stderr | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/traits/method-private.stderr b/src/test/ui/traits/method-private.stderr new file mode 100644 index 000000000..8e991ec01 --- /dev/null +++ b/src/test/ui/traits/method-private.stderr @@ -0,0 +1,18 @@ +error[E0624]: associated function `method` is private + --> $DIR/method-private.rs:19:9 + | +LL | fn method(&self) {} + | ---------------- private associated function defined here +... +LL | foo.method(); + | ^^^^^^ private associated function + | + = help: items from traits can only be used if the trait is in scope +help: the following trait is implemented but not in scope; perhaps add a `use` for it: + | +LL | use inner::Bar; + | + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0624`. |