rust/tests/ui/cross-crate/auxiliary/cross-crate-refcell-match.rs
Trevor Gross 3b57db4d87 Give some UI tests more apropriate names
Prepare for rework done by the rest of RUST-142440.

Co-authored-by: Kivooeo <Kivooeo123@gmail.com>
2025-07-01 16:26:56 +05:00

21 lines
327 B
Rust

#![crate_type="lib"]
use std::cell::RefCell;
pub struct Window<Data>{
pub data: RefCell<Data>
}
impl<Data: Update> Window<Data> {
pub fn update(&self, e: i32) {
match e {
1 => self.data.borrow_mut().update(),
_ => {}
}
}
}
pub trait Update {
fn update(&mut self);
}