1
Fork 0

update tests

This commit is contained in:
lcnr 2021-03-15 23:10:24 +01:00
parent 42150fb8a1
commit e461dddf58
5 changed files with 11 additions and 11 deletions

View file

@ -423,9 +423,9 @@ pub fn super_relate_tys<R: TypeRelation<'tcx>>(
let sz_a = sz_a.try_eval_usize(tcx, relation.param_env());
let sz_b = sz_b.try_eval_usize(tcx, relation.param_env());
match (sz_a, sz_b) {
(Some(sz_a_val), Some(sz_b_val)) => Err(TypeError::FixedArraySize(
expected_found(relation, sz_a_val, sz_b_val),
)),
(Some(sz_a_val), Some(sz_b_val)) if sz_a_val != sz_b_val => Err(
TypeError::FixedArraySize(expected_found(relation, sz_a_val, sz_b_val)),
),
_ => Err(err),
}
}

View file

@ -14,5 +14,5 @@ where
fn main() {
Foo::foo();
//~^ ERROR no function or associated item
//~^ ERROR the function or associated item
}

View file

@ -1,13 +1,13 @@
error[E0599]: no function or associated item named `foo` found for struct `Foo<{_: usize}>` in the current scope
error[E0599]: the function or associated item `foo` exists for struct `Foo<{_: usize}>`, but its trait bounds were not satisfied
--> $DIR/issue-69654-run-pass.rs:16:10
|
LL | struct Foo<const N: usize> {}
| -------------------------- function or associated item `foo` not found for this
...
LL | Foo::foo();
| ^^^ function or associated item not found in `Foo<{_: usize}>`
| ^^^ function or associated item cannot be called on `Foo<{_: usize}>` due to unsatisfied trait bounds
|
= note: the method `foo` exists but the following trait bounds were not satisfied:
= note: the following trait bounds were not satisfied:
`[u8; _]: Bar<[(); _]>`
error: aborting due to previous error

View file

@ -15,5 +15,5 @@ where
fn main() {
Foo::foo();
//~^ ERROR no function or associated item
//~^ ERROR the function or associated item
}

View file

@ -4,16 +4,16 @@ error[E0423]: expected value, found type parameter `T`
LL | impl<T> Bar<T> for [u8; T] {}
| ^ not a value
error[E0599]: no function or associated item named `foo` found for struct `Foo<{_: usize}>` in the current scope
error[E0599]: the function or associated item `foo` exists for struct `Foo<{_: usize}>`, but its trait bounds were not satisfied
--> $DIR/issue-69654.rs:17:10
|
LL | struct Foo<const N: usize> {}
| -------------------------- function or associated item `foo` not found for this
...
LL | Foo::foo();
| ^^^ function or associated item not found in `Foo<{_: usize}>`
| ^^^ function or associated item cannot be called on `Foo<{_: usize}>` due to unsatisfied trait bounds
|
= note: the method `foo` exists but the following trait bounds were not satisfied:
= note: the following trait bounds were not satisfied:
`[u8; _]: Bar<[(); _]>`
error: aborting due to 2 previous errors