]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/fn-defined-using-function.rs
Account for ADT bodies and struct expressions
[rust.git] / src / test / ui / parser / fn-defined-using-function.rs
1 // Check what happens when `function` is used to define a function, instead of `fn`
2 // edition:2021
3
4 #![allow(dead_code)]
5
6 function foo() {}
7 //~^ ERROR expected one of `!` or `::`, found `foo`
8 //~^^ HELP write `fn` instead of `function` to declare a function
9
10 fn main() {}