update tests
This commit is contained in:
parent
42150fb8a1
commit
e461dddf58
5 changed files with 11 additions and 11 deletions
|
@ -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_a = sz_a.try_eval_usize(tcx, relation.param_env());
|
||||||
let sz_b = sz_b.try_eval_usize(tcx, relation.param_env());
|
let sz_b = sz_b.try_eval_usize(tcx, relation.param_env());
|
||||||
match (sz_a, sz_b) {
|
match (sz_a, sz_b) {
|
||||||
(Some(sz_a_val), Some(sz_b_val)) => Err(TypeError::FixedArraySize(
|
(Some(sz_a_val), Some(sz_b_val)) if sz_a_val != sz_b_val => Err(
|
||||||
expected_found(relation, sz_a_val, sz_b_val),
|
TypeError::FixedArraySize(expected_found(relation, sz_a_val, sz_b_val)),
|
||||||
)),
|
),
|
||||||
_ => Err(err),
|
_ => Err(err),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,5 +14,5 @@ where
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
Foo::foo();
|
Foo::foo();
|
||||||
//~^ ERROR no function or associated item
|
//~^ ERROR the function or associated item
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
--> $DIR/issue-69654-run-pass.rs:16:10
|
||||||
|
|
|
|
||||||
LL | struct Foo<const N: usize> {}
|
LL | struct Foo<const N: usize> {}
|
||||||
| -------------------------- function or associated item `foo` not found for this
|
| -------------------------- function or associated item `foo` not found for this
|
||||||
...
|
...
|
||||||
LL | Foo::foo();
|
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<[(); _]>`
|
`[u8; _]: Bar<[(); _]>`
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
|
@ -15,5 +15,5 @@ where
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
Foo::foo();
|
Foo::foo();
|
||||||
//~^ ERROR no function or associated item
|
//~^ ERROR the function or associated item
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,16 +4,16 @@ error[E0423]: expected value, found type parameter `T`
|
||||||
LL | impl<T> Bar<T> for [u8; T] {}
|
LL | impl<T> Bar<T> for [u8; T] {}
|
||||||
| ^ not a value
|
| ^ 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
|
--> $DIR/issue-69654.rs:17:10
|
||||||
|
|
|
|
||||||
LL | struct Foo<const N: usize> {}
|
LL | struct Foo<const N: usize> {}
|
||||||
| -------------------------- function or associated item `foo` not found for this
|
| -------------------------- function or associated item `foo` not found for this
|
||||||
...
|
...
|
||||||
LL | Foo::foo();
|
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<[(); _]>`
|
`[u8; _]: Bar<[(); _]>`
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue