diff options
| author | lcnr <rust@lcnr.de> | 2021-03-15 23:10:24 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2021-03-27 16:38:23 +0100 |
| commit | e461dddf5828d729b872e27d1a7a7335437ce413 (patch) | |
| tree | 465f9170c1cadec9f36f7d8f5e99da6ca5b3f9b7 | |
| parent | 42150fb8a12cae86ebee3a7734c2d14ed6b1d0a8 (diff) | |
| download | rust-e461dddf5828d729b872e27d1a7a7335437ce413.tar.gz rust-e461dddf5828d729b872e27d1a7a7335437ce413.zip | |
update tests
5 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_middle/src/ty/relate.rs b/compiler/rustc_middle/src/ty/relate.rs index 32a713beef8..bc979b885b4 100644 --- a/compiler/rustc_middle/src/ty/relate.rs +++ b/compiler/rustc_middle/src/ty/relate.rs @@ -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), } } diff --git a/src/test/ui/const-generics/issues/issue-69654-run-pass.rs b/src/test/ui/const-generics/issues/issue-69654-run-pass.rs index 8c0398e8a13..45318ca68fc 100644 --- a/src/test/ui/const-generics/issues/issue-69654-run-pass.rs +++ b/src/test/ui/const-generics/issues/issue-69654-run-pass.rs @@ -14,5 +14,5 @@ where fn main() { Foo::foo(); - //~^ ERROR no function or associated item + //~^ ERROR the function or associated item } diff --git a/src/test/ui/const-generics/issues/issue-69654-run-pass.stderr b/src/test/ui/const-generics/issues/issue-69654-run-pass.stderr index a95cc0f2a1c..a82a60696b3 100644 --- a/src/test/ui/const-generics/issues/issue-69654-run-pass.stderr +++ b/src/test/ui/const-generics/issues/issue-69654-run-pass.stderr @@ -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 diff --git a/src/test/ui/const-generics/issues/issue-69654.rs b/src/test/ui/const-generics/issues/issue-69654.rs index 38fca98ad4f..b1214b12a14 100644 --- a/src/test/ui/const-generics/issues/issue-69654.rs +++ b/src/test/ui/const-generics/issues/issue-69654.rs @@ -15,5 +15,5 @@ where fn main() { Foo::foo(); - //~^ ERROR no function or associated item + //~^ ERROR the function or associated item } diff --git a/src/test/ui/const-generics/issues/issue-69654.stderr b/src/test/ui/const-generics/issues/issue-69654.stderr index 69cd0806fcd..0ce7640f685 100644 --- a/src/test/ui/const-generics/issues/issue-69654.stderr +++ b/src/test/ui/const-generics/issues/issue-69654.stderr @@ -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 |
