*dust dust*

This commit is contained in:
Ellen 2021-10-21 00:16:49 +01:00
parent c75d8cb212
commit e7a9e820d2
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ fn bar<const N: u8>(arg: &dyn Traitor<N>) -> u8 {
fn main() {
assert_eq!(foo(&10_u32), 12);
assert_eq!(foo(&3_u64), 3);
assert_eq!(bar(&true), 2);
assert_eq!(bar(&1_u8), 1);
}

View File

@ -11,7 +11,7 @@ struct WhereClause<const N: u8 = 2> where (): Trait<N>;
trait Traitor<T, const N: u8> {}
struct WhereClauseTooGeneric<T = u32, const N: u8 = 2>(T) where (): Traitor<T, N>;
// no error on struct def
// no error on struct def
struct DependentDefaultWfness<const N: u8 = 1, T = WhereClause<N>>(T);
fn foo() -> DependentDefaultWfness {
//~^ error: the trait bound `(): Trait<1_u8>` is not satisfied