mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
17 lines
321 B
Rust
17 lines
321 B
Rust
#![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();
|
|
//~^ ERROR: cannot call
|
|
//~| ERROR: cannot call
|
|
//~| ERROR: the trait bound
|
|
}
|
|
}
|
|
|
|
fn main() {}
|