Skip to content

Ch5/ch5-impossible-add.rs can not compile #64

@ghost

Description

#[allow(arithmetic_overflow)]    <1>

fn main() {
  let (a, b) = (200, 200);
  let c: u8 = a + b;             <2>
  println!("200 + 200 = {}", c);
}

In this source code, there are two marks <1>/<2> the author might forget to comment, making the rustc reject to compile it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions