rust_impl/
main.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![doc(html_logo_url = "https://wiki.qt.io/skins/common/images/wiki.png")]

/// This is a general comment about the function `add_numbers`
/// It's expect to be called like:
/// ```rust
///     let x = 5;
///     let y = 4.1;
///     let z = add_numbers(x, y);
/// ```
fn add_numbers(a: i32, b: f64) -> f64 {
    f64::from(a) + b
}

fn main() {
    let x = 5;
    let y = 4.1;
    let z = add_numbers(x, y);
    println!("{}", z);
}