rust/tests/ui/consts/issue-94675.rs

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

19 lines
363 B
Rust
Raw Normal View History

2023-07-27 15:51:02 +00:00
//@ known-bug: #103507
2022-03-07 02:38:42 +00:00
#![feature(const_trait_impl, const_mut_refs)]
struct Foo<'a> {
bar: &'a mut Vec<usize>,
}
impl<'a> Foo<'a> {
const fn spam(&mut self, baz: &mut Vec<u32>) {
self.bar[0] = baz.len();
2023-07-27 15:51:02 +00:00
//FIXME ~^ ERROR: cannot call
//FIXME ~| ERROR: cannot call
//FIXME ~| ERROR: the trait bound
2022-03-07 02:38:42 +00:00
}
}
fn main() {}