Auto merge of #27353 - arielb1:parenthetical-error, r=steveklabnik

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

Fixes #26970 

r? @steveklabnik
This commit is contained in:
bors 2015-07-29 18:10:48 +00:00
commit 523ee8d37c
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() { }