diff options
Diffstat (limited to 'tests/ui/nll/issue-57280.rs')
-rw-r--r-- | tests/ui/nll/issue-57280.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/nll/issue-57280.rs b/tests/ui/nll/issue-57280.rs new file mode 100644 index 000000000..b9d336ec3 --- /dev/null +++ b/tests/ui/nll/issue-57280.rs @@ -0,0 +1,20 @@ +// check-pass + +trait Foo { + const BLAH: &'static str; +} + +struct Placeholder; + +impl Foo for Placeholder { + const BLAH: &'static str = "hi"; +} + +fn foo(x: &str) { + match x { + <Placeholder as Foo>::BLAH => { } + _ => { } + } +} + +fn main() {} |