rust/tests/ui/typeck/remove-semi-but-confused-ch...

12 lines
321 B
Rust
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// Ensures our "remove semicolon" suggestion isn't hardcoded with a character width,
// in case it was accidentally mixed up with a greek question mark.
// issue: rust-lang/rust#123607
pub fn square(num: i32) -> i32 {
//~^ ERROR mismatched types
num * num;
//~^ ERROR unknown start of token
}
fn main() {}