title: How to assign function return value to a variable in Rust?
body: <p>I just started to play around with Rust. Trying to run the code snippet below will result in a compile time error with the message: <code>type ascription is experimental</code>.</p>
  
  <pre><code>use std::env;
  
  fn main() {
      let arguments: Args = env:args();
  }
  </code></pre>
  
  <p>The docs for <a href="https://doc.rust-lang.org/std/env/fn.args.html" rel="nofollow"><code>env:args</code></a> shows that the function returns an <code>Args</code> struct and the <a href="https://doc.rust-lang.org/book/variable-bindings.html#type-annotations" rel="nofollow">Variable Binding section</a> shows that I can set type of the variables with <code>let varname: type = value</code>. How I can properly assign a return value of a function to a variable? </p>