Do not permit type parameters on builtin bounds.
This commit is contained in:
parent
dcc6ce2c77
commit
3ebdbac265
3 changed files with 37 additions and 3 deletions
|
|
@ -0,0 +1,27 @@
|
|||
// 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 foo1<T:Copy<U>, U>(x: T) {}
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
|
||||
trait Trait: Copy<Send> {}
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
|
||||
struct MyStruct1<T: Copy<T>>;
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
|
||||
struct MyStruct2<'a, T: Copy<'a>>;
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
|
||||
fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
|
||||
fn main() {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue