diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/privacy/priv-in-bad-locations.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/privacy/priv-in-bad-locations.rs b/src/test/ui/privacy/priv-in-bad-locations.rs new file mode 100644 index 000000000..76af8c6cd --- /dev/null +++ b/src/test/ui/privacy/priv-in-bad-locations.rs @@ -0,0 +1,17 @@ +pub extern "C" { //~ ERROR unnecessary visibility qualifier + pub fn bar(); +} + +trait A { + fn foo(&self) {} +} + +struct B; + +pub impl B {} //~ ERROR unnecessary visibility qualifier + +pub impl A for B { //~ ERROR unnecessary visibility qualifier + pub fn foo(&self) {} //~ ERROR unnecessary visibility qualifier +} + +pub fn main() {} |