rust/tests/ui/const-generics/issues/issue-56445-2.rs
2023-01-11 09:32:08 +00:00

12 lines
386 B
Rust

// 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() {}