mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 03:57:37 +00:00
18 lines
338 B
Rust
18 lines
338 B
Rust
![]() |
#![feature(deref_patterns)]
|
||
|
//~^ WARN the feature `deref_patterns` is incomplete
|
||
|
|
||
|
use std::rc::Rc;
|
||
|
|
||
|
fn main() {
|
||
|
match &mut vec![1] {
|
||
|
deref!(x) => {}
|
||
|
_ => {}
|
||
|
}
|
||
|
|
||
|
match &mut Rc::new(1) {
|
||
|
deref!(x) => {}
|
||
|
//~^ ERROR the trait bound `Rc<{integer}>: DerefMut` is not satisfied
|
||
|
_ => {}
|
||
|
}
|
||
|
}
|