summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/issues/issue-56445-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/issues/issue-56445-2.rs')
-rw-r--r--tests/ui/const-generics/issues/issue-56445-2.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/const-generics/issues/issue-56445-2.rs b/tests/ui/const-generics/issues/issue-56445-2.rs
new file mode 100644
index 000000000..e078c8487
--- /dev/null
+++ b/tests/ui/const-generics/issues/issue-56445-2.rs
@@ -0,0 +1,11 @@
+// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-502095133
+struct OnDiskDirEntry<'a> { _s: &'a usize }
+
+impl<'a> OnDiskDirEntry<'a> {
+ const LFN_FRAGMENT_LEN: usize = 2;
+
+ fn lfn_contents(&self) -> [char; Self::LFN_FRAGMENT_LEN] { loop { } }
+ //~^ ERROR: generic `Self` types are currently not permitted in anonymous constants
+}
+
+fn main() {}