about summary refs log tree commit diff
path: root/src/test/ui/self
diff options
context:
space:
mode:
authorFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-09-18 00:07:41 +0200
committerFabian Wolff <fabian.wolff@alumni.ethz.ch>2021-09-26 19:22:20 +0200
commit750018e16eb34f8b37477689fbd231bb720c8aaa (patch)
tree137531f83861633fc1f59b7e2b48c72971d56fa0 /src/test/ui/self
parent65eb381dec051e31d1fb17a5a7629bdee1eb9922 (diff)
downloadrust-750018e16eb34f8b37477689fbd231bb720c8aaa.tar.gz
rust-750018e16eb34f8b37477689fbd231bb720c8aaa.zip
Improve diagnostics for inaccessible items
Diffstat (limited to 'src/test/ui/self')
-rw-r--r--src/test/ui/self/self_type_keyword.stderr7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/ui/self/self_type_keyword.stderr b/src/test/ui/self/self_type_keyword.stderr
index 57b46058777..aca08d81163 100644
--- a/src/test/ui/self/self_type_keyword.stderr
+++ b/src/test/ui/self/self_type_keyword.stderr
@@ -66,8 +66,11 @@ error[E0531]: cannot find unit struct, unit variant or constant `Self` in this s
 LL |         mut Self => (),
    |             ^^^^ not found in this scope
    |
-   = note: this unit struct exists but is inaccessible:
-           foo::Self
+note: unit struct `foo::Self` exists but is inaccessible
+  --> $DIR/self_type_keyword.rs:2:3
+   |
+LL |   struct Self;
+   |   ^^^^^^^^^^^^ not accessible
 
 error[E0392]: parameter `'Self` is never used
   --> $DIR/self_type_keyword.rs:6:12