blob: 247d68ef2a1f0edd078cf7fe2ee4e54a0e7e65b8 [file] [log] [blame]
error: at least one trait must be specified
--> $DIR/generic_underconstrained2.rs:5:45
|
LL | type Underconstrained<T: std::fmt::Debug> = impl 'static;
| ^^^^^^^^^^^^
error: at least one trait must be specified
--> $DIR/generic_underconstrained2.rs:14:46
|
LL | type Underconstrained2<T: std::fmt::Debug> = impl 'static;
| ^^^^^^^^^^^^
error[E0277]: `U` doesn't implement `std::fmt::Debug`
--> $DIR/generic_underconstrained2.rs:5:45
|
LL | type Underconstrained<T: std::fmt::Debug> = impl 'static;
| ^^^^^^^^^^^^ `U` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
...
LL | 5u32
| ---- this returned value is of type `u32`
|
= help: the trait `std::fmt::Debug` is not implemented for `U`
= note: the return type of a function must have a statically known size
help: consider restricting type parameter `U`
|
LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
| ^^^^^^^^^^^^^^^^^
error[E0277]: `V` doesn't implement `std::fmt::Debug`
--> $DIR/generic_underconstrained2.rs:14:46
|
LL | type Underconstrained2<T: std::fmt::Debug> = impl 'static;
| ^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
...
LL | 5u32
| ---- this returned value is of type `u32`
|
= help: the trait `std::fmt::Debug` is not implemented for `V`
= note: the return type of a function must have a statically known size
help: consider restricting type parameter `V`
|
LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained2<V> {
| ^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0277`.