diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/generic-const-items | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/generic-const-items')
8 files changed, 12 insertions, 12 deletions
diff --git a/tests/ui/generic-const-items/const-trait-impl.rs b/tests/ui/generic-const-items/const-trait-impl.rs index d30f7af17..43cdf818c 100644 --- a/tests/ui/generic-const-items/const-trait-impl.rs +++ b/tests/ui/generic-const-items/const-trait-impl.rs @@ -7,8 +7,8 @@ #![allow(incomplete_features)] #![crate_type = "lib"] -// FIXME(generic_const_items): Interpret `~const` as always-const. -const CREATE<T: ~const Create>: T = T::create(); +// FIXME(generic_const_items, effects): Introduce `const` bounds to make this work. +const CREATE<T: Create>: T = T::create(); pub const K0: i32 = CREATE::<i32>; pub const K1: i32 = CREATE; // arg inferred diff --git a/tests/ui/generic-const-items/const-trait-impl.stderr b/tests/ui/generic-const-items/const-trait-impl.stderr index 34360c581..e7e905427 100644 --- a/tests/ui/generic-const-items/const-trait-impl.stderr +++ b/tests/ui/generic-const-items/const-trait-impl.stderr @@ -1,11 +1,11 @@ error[E0015]: cannot call non-const fn `<T as Create>::create` in constants - --> $DIR/const-trait-impl.rs:11:37 + --> $DIR/const-trait-impl.rs:11:30 | -LL | const CREATE<T: ~const Create>: T = T::create(); - | ^^^^^^^^^^^ +LL | const CREATE<T: Create>: T = T::create(); + | ^^^^^^^^^^^ | = note: calls in constants are limited to constant functions, tuple structs and tuple variants -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0015`. diff --git a/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr b/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr index 930080f7c..1475d988e 100644 --- a/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr +++ b/tests/ui/generic-const-items/evaluatable-bounds.unconstrained.stderr @@ -6,5 +6,5 @@ LL | const ARRAY: [i32; Self::LEN]; | = help: try adding a `where` bound using this expression: `where [(); Self::LEN]:` -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/generic-const-items/parameter-defaults.stderr b/tests/ui/generic-const-items/parameter-defaults.stderr index 62da45e55..598622869 100644 --- a/tests/ui/generic-const-items/parameter-defaults.stderr +++ b/tests/ui/generic-const-items/parameter-defaults.stderr @@ -4,5 +4,5 @@ error: defaults for type parameters are only allowed in `struct`, `enum`, `type` LL | const NONE<T = ()>: Option<T> = None::<T>; | ^^^^^^ -error: aborting due to previous error +error: aborting due to 1 previous error diff --git a/tests/ui/generic-const-items/reference-outlives-referent.stderr b/tests/ui/generic-const-items/reference-outlives-referent.stderr index 2b57713b5..34553c516 100644 --- a/tests/ui/generic-const-items/reference-outlives-referent.stderr +++ b/tests/ui/generic-const-items/reference-outlives-referent.stderr @@ -15,6 +15,6 @@ note: but the referenced data is only valid for the lifetime `'b` as defined her LL | const Q<'a, 'b>: &'a &'b () = &&(); | ^^ -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0491`. diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr index c3ef94529..942e5dbd8 100644 --- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr +++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-0.stderr @@ -13,6 +13,6 @@ LL | where LL | String: Copy; | ^^^^ required by this bound in `UNUSABLE` -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr index a68400798..b8438a058 100644 --- a/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr +++ b/tests/ui/generic-const-items/trivially-unsatisfied-bounds-1.stderr @@ -6,6 +6,6 @@ LL | | where LL | | String: Copy; | |_________________^ entering unreachable code -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0080`. diff --git a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr index bed213b0c..f522190e8 100644 --- a/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr +++ b/tests/ui/generic-const-items/unsatisfied-evaluatable-bounds.stderr @@ -4,6 +4,6 @@ error[E0080]: evaluation of `POSITIVE::<0>::{constant#0}` failed LL | [(); N - 1]:; | ^^^^^ attempt to compute `0_usize - 1_usize`, which would overflow -error: aborting due to previous error +error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0080`. |