about summary refs log tree commit diff
path: root/tests/ui/feature-gates/feature-gate-deref_patterns.rs
blob: 53b4301f10c0c4b5b3f467ca35d7a175340c0fa0 (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    // We reuse the `box` syntax so this doesn't actually test the feature gate but eh.
    let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
    println!("x: {}", x);

    // `box` syntax is allowed to be cfg-ed out for historical reasons (#65742).
    #[cfg(false)]
    let box _x = Box::new('c');
}