mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
21 lines
236 B
Rust
21 lines
236 B
Rust
fn foo(a: u32, b: u32) {
|
|
a + b;
|
|
}
|
|
|
|
fn bar(a: u32, b: u32) {
|
|
a + b;
|
|
}
|
|
|
|
fn main() {
|
|
let x = 1;
|
|
let y = 2;
|
|
let z = 3;
|
|
foo(1 as u32 + //~ ERROR cannot add `()` to `u32`
|
|
|
|
bar(x,
|
|
|
|
y),
|
|
|
|
z)
|
|
}
|