Hey all

I am still learning but i just tried something which i expected to give an
error but works:

fn test () -> int {
  1
}

fn main () {
  let test = test ();
  println (format! ("{}", test));
}

I guess on compilation the names are mangled against their types or
something so you can differentiate between test the function and test the
variable. Not sure would be nice to get some clarification what this
behavior is.

Thanks

--Phil
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to