2019-10-05 18:57:14 -05:00
|
|
|
use std::cell::RefCell;
|
|
|
|
|
|
|
|
struct HasAssocMethod;
|
|
|
|
|
|
|
|
impl HasAssocMethod {
|
|
|
|
fn hello() {}
|
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
let shared_state = RefCell::new(HasAssocMethod);
|
|
|
|
let state = shared_state.borrow_mut();
|
|
|
|
state.hello();
|
2020-01-08 10:05:31 -06:00
|
|
|
//~^ ERROR no method named `hello` found
|
2019-10-05 18:57:14 -05:00
|
|
|
}
|