We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Contents of test.rs:
test.rs
fn main() { let x: Box<int> = box (2 + 2); }
in 0.11.0, this yields:
test.rs:2:31: 2:32 error: unexpected token: `;` test.rs:2 let x: Box<int> = box (2 + 2); ^
However, the following code compiles:
fn main() { let temp = 2 + 2; let x: Box<int> = box temp; }
Even doing box (2) is considered invalid syntax.
box (2)
EDIT: Apparently, box()(2) is valid syntax, but this isn't written down anywhere.
box()(2)