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