Why this code won't conmpil?. it compile until x using case but problem with z using case

⚓ Rust    📅 2025-07-02    👤 surdeus    👁️ 6      

surdeus

Warning

This post was published 36 days ago. The information described in this article may have changed.
fn main(){
   
   
    let mut z = 4;
    let mut x = &mut z;
    let mut f = &mut x;
  
    let mut q = 44;
    let mut s = &mut q;
    
    println!("{}",f);
    println!("{}",x);
    println!("{}",z);
    
    f= &mut s;
    
    
} 
([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=1e2ac2fa2084af45f7a7bd15510afe29))


2 posts - 2 participants

Read full topic

🏷️ rust_feed