mirror of https://github.com/rust-lang/rust.git
Use a trait instead of the now disallowed missing trait there
This commit is contained in:
parent
d488de82f3
commit
df8a64327c
|
@ -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
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
error: at least one trait must be specified
|
||||
--> $DIR/unused_generic_param.rs:5:28
|
||||
|
|
||||
LL | type PartiallyDefined<T> = impl 'static;
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: at least one trait must be specified
|
||||
--> $DIR/unused_generic_param.rs:12:29
|
||||
|
|
||||
LL | type PartiallyDefined2<T> = impl 'static;
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
Loading…
Reference in New Issue