diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-46964.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-46964.rs b/src/test/ui/issues/issue-46964.rs new file mode 100644 index 000000000..28fa92f20 --- /dev/null +++ b/src/test/ui/issues/issue-46964.rs @@ -0,0 +1,19 @@ +// check-pass +mod my_mod { + #[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Ord, Hash)] + pub struct Name<'a> { + source: &'a str, + } + + pub const JSON: Name = Name { source: "JSON" }; +} + +pub fn crash() -> bool { + match (my_mod::JSON, None) { + (_, Some(my_mod::JSON)) => true, + (my_mod::JSON, None) => true, + _ => false, + } +} + +fn main() {} |