Test aller things
This commit is contained in:
parent
ed10a5ba01
commit
0d25ff8842
@ -0,0 +1,15 @@
|
||||
#![feature(existential_type)]
|
||||
|
||||
fn main() {}
|
||||
|
||||
// test that unused generic parameters are ok
|
||||
existential type Two<T, U>: 'static;
|
||||
|
||||
fn one<T: 'static>(t: T) -> Two<T, T> {
|
||||
t
|
||||
}
|
||||
|
||||
fn two<T: 'static, U: 'static>(t: T, _: U) -> Two<U, T> {
|
||||
//~^ ERROR defining existential type use differs from previous
|
||||
t
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
error: defining existential type use differs from previous
|
||||
--> $DIR/generic_duplicate_param_use5.rs:12:1
|
||||
|
|
||||
LL | / fn two<T: 'static, U: 'static>(t: T, _: U) -> Two<U, T> {
|
||||
LL | | //~^ ERROR defining existential type use differs from previous
|
||||
LL | | t
|
||||
LL | | }
|
||||
| |_^
|
||||
|
|
||||
note: previous use here
|
||||
--> $DIR/generic_duplicate_param_use5.rs:8:1
|
||||
|
|
||||
LL | / fn one<T: 'static>(t: T) -> Two<T, T> {
|
||||
LL | | t
|
||||
LL | | }
|
||||
| |_^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Reference in New Issue
Block a user