summary refs log tree commit diff
path: root/tests/ui/borrowck/refcell-borrow-comparison-12033.rs
blob: de22cedd5b94a846259b6b588b165c44afbe9828 (plain)
1
2
3
4
5
6
7
8
9
//! Regression test for https://github.com/rust-lang/rust/issues/12033

//@ run-pass
use std::cell::RefCell;

fn main() {
    let x = RefCell::new(0);
    if *x.borrow() == 0 {} else {}
}