summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/issues/issue-56445-2.rs
blob: e078c8487c7278093ec810aad3f4814715f41211 (plain)
1
2
3
4
5
6
7
8
9
10
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() {}