rust/tests/ui/const-generics/issues/issue-56445-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
386 B
Rust
Raw Normal View History

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