summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/fn-defined-using-function.rs
blob: fd8782728e2b9dce8828080d25919855e22be06a (plain)
1
2
3
4
5
6
7
8
9
10
// Check what happens when `function` is used to define a function, instead of `fn`
// edition:2021

#![allow(dead_code)]

function foo() {}
//~^ ERROR expected one of `!` or `::`, found `foo`
//~^^ HELP write `fn` instead of `function` to declare a function

fn main() {}