Rollup merge of #45122 - jean-lourenco:master, r=nikomatsakis

Better compile error output when using arguments instead of types

Following @estebank sugestion on issue https://github.com/rust-lang/rust/issues/18945#issuecomment-331251436
This commit is contained in:
kennytm 2017-10-13 23:37:54 +08:00 committed by GitHub
commit 9eab4ec823
3 changed files with 7 additions and 1 deletions

View file

@ -2960,6 +2960,7 @@ impl<'a> Parser<'a> {
{ // Foo<Bar<Baz<Qux, ()>>>
err.help(
"use `::<...>` instead of `<...>` if you meant to specify type arguments");
err.help("or use `(...)` if you meant to specify fn arguments");
}
err.emit();
}