diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/resolve/privacy-enum-ctor.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/resolve/privacy-enum-ctor.rs')
-rw-r--r-- | src/test/ui/resolve/privacy-enum-ctor.rs | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/test/ui/resolve/privacy-enum-ctor.rs b/src/test/ui/resolve/privacy-enum-ctor.rs deleted file mode 100644 index f0d2cf8c0..000000000 --- a/src/test/ui/resolve/privacy-enum-ctor.rs +++ /dev/null @@ -1,71 +0,0 @@ -mod m { - pub enum E { - Fn(u8), - Struct { - s: u8, - }, - Unit, - } - - pub mod n { - pub(in m) enum Z { - Fn(u8), - Struct { - s: u8, - }, - Unit, - } - } - - use m::n::Z; // OK, only the type is imported - - fn f() { - n::Z; - //~^ ERROR expected value, found enum `n::Z` - Z; - //~^ ERROR expected value, found enum `Z` - let _: Z = Z::Fn; - //~^ ERROR mismatched types - let _: Z = Z::Struct; - //~^ ERROR expected value, found struct variant `Z::Struct` - let _ = Z::Unit(); - //~^ ERROR expected function, found enum variant `Z::Unit` - let _ = Z::Unit {}; - // This is ok, it is equivalent to not having braces - } -} - -use m::E; // OK, only the type is imported - -fn main() { - let _: E = m::E; - //~^ ERROR expected value, found enum `m::E` - let _: E = m::E::Fn; - //~^ ERROR mismatched types - let _: E = m::E::Struct; - //~^ ERROR expected value, found struct variant `m::E::Struct` - let _: E = m::E::Unit(); - //~^ ERROR expected function, found enum variant `m::E::Unit` - let _: E = E; - //~^ ERROR expected value, found enum `E` - let _: E = E::Fn; - //~^ ERROR mismatched types - let _: E = E::Struct; - //~^ ERROR expected value, found struct variant `E::Struct` - let _: E = E::Unit(); - //~^ ERROR expected function, found enum variant `E::Unit` - let _: Z = m::n::Z; - //~^ ERROR cannot find type `Z` in this scope - //~| ERROR expected value, found enum `m::n::Z` - //~| ERROR enum `Z` is private - let _: Z = m::n::Z::Fn; - //~^ ERROR cannot find type `Z` in this scope - //~| ERROR enum `Z` is private - let _: Z = m::n::Z::Struct; - //~^ ERROR cannot find type `Z` in this scope - //~| ERROR expected value, found struct variant `m::n::Z::Struct` - //~| ERROR enum `Z` is private - let _: Z = m::n::Z::Unit {}; - //~^ ERROR cannot find type `Z` in this scope - //~| ERROR enum `Z` is private -} |