Fix #23589
This commit is contained in:
parent
7a13b93b00
commit
2bce9d0ff5
4 changed files with 20 additions and 5 deletions
14
src/test/compile-fail/issue-23589.rs
Normal file
14
src/test/compile-fail/issue-23589.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
let v: Vec(&str) = vec!['1', '2'];
|
||||
//~^ ERROR parenthesized parameters may only be used with a trait
|
||||
}
|
||||
|
|
@ -18,7 +18,6 @@ struct Bar<A> {
|
|||
fn bar() {
|
||||
let x: Box<Bar()> = panic!();
|
||||
//~^ ERROR parenthesized parameters may only be used with a trait
|
||||
//~^^ ERROR associated type bindings are not allowed here
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ struct Bar<A> {
|
|||
|
||||
fn foo(b: Box<Bar()>) {
|
||||
//~^ ERROR parenthesized parameters may only be used with a trait
|
||||
//~^^ ERROR associated type bindings are not allowed here
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue