]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/fn-defined-using-func.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / parser / fn-defined-using-func.rs
1 // Check what happens when `func` is used to define a function, instead of `fn`
2 // edition:2021
3
4 #![allow(dead_code)]
5
6 func foo() {}
7 //~^ ERROR expected one of `!` or `::`, found `foo`
8 //~^^ HELP write `fn` instead of `func` to declare a function
9
10 fn main() {}