clarify the parenthetical notation stability error message

This also calls the right API, which e.g. prevents a suggestion
for #![feature(unboxed_closures)] on stable.

Fixes #26970
This commit is contained in:
Ariel Ben-Yehuda 2015-07-28 19:21:24 +03:00
parent 4c371bb6de
commit bd01175234
4 changed files with 17 additions and 19 deletions

View file

@ -21,7 +21,7 @@ trait Foo<A> {
fn main() {
let x: Box<Foo(isize)>;
//~^ ERROR parenthetical notation is only stable when used with the `Fn` family
//~^ ERROR parenthetical notation is only stable when used with `Fn`-family
// No errors with these:
let x: Box<Fn(isize)>;

View file

@ -12,11 +12,11 @@
// Test that the `Fn` traits require `()` form without a feature gate.
fn bar1(x: &Fn<(), Output=()>) {
//~^ ERROR angle-bracket notation is not stable when used with the `Fn` family
//~^ ERROR of `Fn`-family traits' type parameters is subject to change
}
fn bar2<T>(x: &T) where T: Fn<()> {
//~^ ERROR angle-bracket notation is not stable when used with the `Fn` family
//~^ ERROR of `Fn`-family traits' type parameters is subject to change
}
fn main() { }