fn foo() {} const BAR: usize = 42; fn a() { foo::(); //~ ERROR expected one of } fn b() { // FIXME(const_generics): these diagnostics are awful, because trait objects without `dyn` were // a terrible mistake. foo::(); //~^ ERROR expected trait, found constant `BAR` //~| ERROR expected trait, found constant `BAR` //~| ERROR type provided when a constant was expected } fn c() { foo::<3 + 3>(); //~ ERROR expressions must be enclosed in braces } fn d() { foo::(); //~ ERROR expected one of } fn e() { foo::(); //~ ERROR expected one of } fn f() { foo::<100 - BAR>(); //~ ERROR expressions must be enclosed in braces } fn g() { foo::()>(); //~ ERROR expected one of } fn h() { foo::()>(); //~ ERROR expected one of } fn i() { foo::() + BAR>(); //~ ERROR expected one of } fn j() { foo::() - BAR>(); //~ ERROR expected one of } fn k() { foo::()>(); //~ ERROR expected one of } fn l() { foo::()>(); //~ ERROR expected one of } const fn bar() -> usize { C } fn main() {}