Skip to content

Commit 1095bb1

Browse files
Rollup merge of rust-lang#88159 - spastorino:fix-unused-generic-param-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`
2 parents bcc3b4e + df8a643 commit 1095bb1

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

src/test/ui/type-alias-impl-trait/unused_generic_param.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
// check-pass
2+
13
#![feature(type_alias_impl_trait)]
4+
#![allow(dead_code)]
25

36
fn main() {}
47

5-
type PartiallyDefined<T> = impl 'static;
6-
//~^ ERROR: at least one trait must be specified
8+
type PartiallyDefined<T> = impl Sized;
79

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

12-
type PartiallyDefined2<T> = impl 'static;
13-
//~^ ERROR: at least one trait must be specified
14+
type PartiallyDefined2<T> = impl Sized;
1415

1516
fn partially_defined2<T: std::fmt::Debug>(_: T) -> PartiallyDefined2<T> {
1617
4u32

src/test/ui/type-alias-impl-trait/unused_generic_param.stderr

-14
This file was deleted.

0 commit comments

Comments
 (0)