--- /dev/null
+#![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
+}
--- /dev/null
+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
+