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:
parent
4c371bb6de
commit
bd01175234
4 changed files with 17 additions and 19 deletions
|
|
@ -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)>;
|
||||
|
|
|
|||
|
|
@ -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() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue