Skip to content
Snippets Groups Projects
Select Git revision
  • a7a5bf8d660a83636113ea67b541cc43d159df3c
  • master default protected
2 results

rtt-pwm-dma.rs

Blame
  • call3.rs 192 B
    fn f(mut x: i32, mut y: i32) -> i32 {
        x = x + 1; // mutable paramer
        x + y
    }
    
    fn main() -> i32 {
        let a = 1;
        let b = 2;
        f(a, a + b) + a // call by value, a does not change
    }