summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/defaults
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /tests/ui/const-generics/defaults
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-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/const-generics/defaults')
-rw-r--r--tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr4
-rw-r--r--tests/ui/const-generics/defaults/default-on-impl.stderr2
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr2
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr2
-rw-r--r--tests/ui/const-generics/defaults/default-param-wf-concrete.rs2
-rw-r--r--tests/ui/const-generics/defaults/doesnt_infer.stderr2
-rw-r--r--tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr2
-rw-r--r--tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr2
-rw-r--r--tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr2
-rw-r--r--tests/ui/const-generics/defaults/self-referential.stderr2
10 files changed, 11 insertions, 11 deletions
diff --git a/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr b/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr
index b836cfeae..199546c08 100644
--- a/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr
+++ b/tests/ui/const-generics/defaults/complex-generic-default-expr.min.stderr
@@ -5,7 +5,7 @@ LL | struct Foo<const N: usize, const M: usize = { N + 1 }>;
| ^ cannot perform const operation using `N`
|
= help: const parameters may only be used as standalone arguments, i.e. `N`
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: generic parameters may not be used in const operations
--> $DIR/complex-generic-default-expr.rs:9:62
@@ -14,7 +14,7 @@ LL | struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
| ^ cannot perform const operation using `T`
|
= note: type parameters may not be used in const expressions
- = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+ = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 2 previous errors
diff --git a/tests/ui/const-generics/defaults/default-on-impl.stderr b/tests/ui/const-generics/defaults/default-on-impl.stderr
index 4b2b05742..691e0354e 100644
--- a/tests/ui/const-generics/defaults/default-on-impl.stderr
+++ b/tests/ui/const-generics/defaults/default-on-impl.stderr
@@ -4,5 +4,5 @@ error: defaults for const parameters are only allowed in `struct`, `enum`, `type
LL | impl<const N: usize = 1> Foo<N> {}
| ^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr b/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
index 4259ce2b6..35aae4624 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.next.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | struct Foo<const N: u8 = { 255 + 1 }>;
| ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, 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`.
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr b/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
index 4259ce2b6..35aae4624 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.old.stderr
@@ -4,6 +4,6 @@ error[E0080]: evaluation of constant value failed
LL | struct Foo<const N: u8 = { 255 + 1 }>;
| ^^^^^^^ attempt to compute `u8::MAX + 1_u8`, 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`.
diff --git a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
index 09a00dd8e..aa3307b92 100644
--- a/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
+++ b/tests/ui/const-generics/defaults/default-param-wf-concrete.rs
@@ -1,5 +1,5 @@
// revisions: old next
-//[next] compile-flags: -Ztrait-solver=next
+//[next] compile-flags: -Znext-solver
struct Foo<const N: u8 = { 255 + 1 }>;
//~^ ERROR evaluation of constant value failed
diff --git a/tests/ui/const-generics/defaults/doesnt_infer.stderr b/tests/ui/const-generics/defaults/doesnt_infer.stderr
index a61411d6e..65ee0ecfd 100644
--- a/tests/ui/const-generics/defaults/doesnt_infer.stderr
+++ b/tests/ui/const-generics/defaults/doesnt_infer.stderr
@@ -9,6 +9,6 @@ help: consider giving `foo` an explicit type, where the value of const parameter
LL | let foo: Foo<N> = Foo::foo();
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr b/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr
index 61b355118..fbf1adfb7 100644
--- a/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr
+++ b/tests/ui/const-generics/defaults/generic-expr-default-concrete.stderr
@@ -7,6 +7,6 @@ LL | Foo::<10, 12>
= note: expected constant `11`
found constant `12`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr b/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr
index e83f89a60..25b3fed0d 100644
--- a/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr
+++ b/tests/ui/const-generics/defaults/generic-expr-default-mismatched-types.stderr
@@ -7,6 +7,6 @@ LL | Foo::<N, { N + 2 }>
= note: expected constant `{ N + 1 }`
found constant `{ N + 2 }`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr b/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr
index ba08b4646..bf2b21c01 100644
--- a/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr
+++ b/tests/ui/const-generics/defaults/param-order-err-pretty-prints-default.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | struct Foo<const M: usize = 10, 'a>(&'a u32);
| ----------------------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, const M: usize = 10>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/const-generics/defaults/self-referential.stderr b/tests/ui/const-generics/defaults/self-referential.stderr
index 170c1f7f7..be67ea3f5 100644
--- a/tests/ui/const-generics/defaults/self-referential.stderr
+++ b/tests/ui/const-generics/defaults/self-referential.stderr
@@ -6,6 +6,6 @@ LL | trait Foo<const M: u8, const M: u8 = M> {}
| |
| first use of `M`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0403`.