这段程序会输出哪两行?

来自 Box、Rc 与 Arc
Rust 1.98 入门 2分钟

这段程序会输出哪两行?

Rust
use std::rc::Rc;

fn main() {
    let config = Rc::new(7);
    {
        let view = Rc::clone(&config);
        println!("inside: {}", Rc::strong_count(&view));
    }
    println!("outside: {}", Rc::strong_count(&config));
}
在试验场中打开
报告错误