mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
13 lines
210 B
Rust
13 lines
210 B
Rust
use std::cell::RefCell;
|
|
|
|
struct TheDarkKnight;
|
|
|
|
impl TheDarkKnight {
|
|
fn nothing_is_true(self) {}
|
|
}
|
|
|
|
fn main() {
|
|
let x = RefCell::new(TheDarkKnight);
|
|
|
|
x.borrow().nothing_is_true(); //~ ERROR E0507
|
|
}
|