Skip to content

Commit

Permalink
Rollup merge of rust-lang#88159 - spastorino:fix-unused-generic-param…
Browse files Browse the repository at this point in the history
…-test, r=oli-obk

Use a trait instead of the now disallowed missing trait there

To properly test the unused generic parameter and just that we need to use a trait in the tait. Missing the trait there is already tested and is not what we meant to test here.

r? `@oli-obk`
  • Loading branch information
GuillaumeGomez authored Aug 19, 2021
2 parents bcc3b4e + df8a643 commit 1095bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
9 changes: 5 additions & 4 deletions src/test/ui/type-alias-impl-trait/unused_generic_param.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// check-pass

#![feature(type_alias_impl_trait)]
#![allow(dead_code)]

fn main() {}

type PartiallyDefined<T> = impl 'static;
//~^ ERROR: at least one trait must be specified
type PartiallyDefined<T> = impl Sized;

fn partially_defined<T: std::fmt::Debug>(_: T) -> PartiallyDefined<T> {
4u32
}

type PartiallyDefined2<T> = impl 'static;
//~^ ERROR: at least one trait must be specified
type PartiallyDefined2<T> = impl Sized;

fn partially_defined2<T: std::fmt::Debug>(_: T) -> PartiallyDefined2<T> {
4u32
Expand Down
14 changes: 0 additions & 14 deletions src/test/ui/type-alias-impl-trait/unused_generic_param.stderr

This file was deleted.

0 comments on commit 1095bb1

Please sign in to comment.