diff options
Diffstat (limited to 'tests/ui/privacy/restricted/relative-2018.rs')
-rw-r--r-- | tests/ui/privacy/restricted/relative-2018.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/privacy/restricted/relative-2018.rs b/tests/ui/privacy/restricted/relative-2018.rs new file mode 100644 index 000000000..954169a9f --- /dev/null +++ b/tests/ui/privacy/restricted/relative-2018.rs @@ -0,0 +1,13 @@ +// edition:2018 + +mod m { + pub(in crate) struct S1; // OK + pub(in super) struct S2; // OK + pub(in self) struct S3; // OK + pub(in ::core) struct S4; + //~^ ERROR visibilities can only be restricted to ancestor modules + pub(in a::b) struct S5; + //~^ ERROR relative paths are not supported in visibilities in 2018 edition or later +} + +fn main() {} |