rust/tests/ui/const-generics/generic_const_exprs/issue-109141.rs

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

15 lines
450 B
Rust
Raw Normal View History

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
impl EntriesBuffer {
fn a(&self) -> impl Iterator {
self.0.iter_mut() //~ ERROR: cannot borrow `*self.0` as mutable, as it is behind a `&` reference
2024-03-20 12:24:07 -05:00
//~| ERROR captures lifetime that does not appear in bounds
}
}
struct EntriesBuffer(Box<[[u8; HashesEntryLEN]; 5]>);
//~^ ERROR: cannot find value `HashesEntryLEN` in this scope
fn main() {}