summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-111692.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/issues/issue-111692.rs')
-rw-r--r--tests/ui/parser/issues/issue-111692.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/ui/parser/issues/issue-111692.rs b/tests/ui/parser/issues/issue-111692.rs
new file mode 100644
index 000000000..56096f706
--- /dev/null
+++ b/tests/ui/parser/issues/issue-111692.rs
@@ -0,0 +1,32 @@
+mod module {
+ #[derive(Eq, PartialEq)]
+ pub struct Type {
+ pub x: u8,
+ pub y: u8,
+ }
+
+ pub const C: u8 = 32u8;
+}
+
+fn test(x: module::Type) {
+ if x == module::Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
+ }
+}
+
+fn test2(x: module::Type) {
+ if x ==module::Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
+ }
+}
+
+
+fn test3(x: module::Type) {
+ if x == Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
+ }
+}
+
+fn test4(x: module::Type) {
+ if x == demo_module::Type { x: module::C, y: 1 } { //~ ERROR invalid struct literal
+ }
+}
+
+fn main() { }