summaryrefslogtreecommitdiffstats
path: root/tests/ui/generics
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/generics
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/generics')
-rw-r--r--tests/ui/generics/generic-extern.stderr2
-rw-r--r--tests/ui/generics/generic-function-item-where-type.stderr2
-rw-r--r--tests/ui/generics/generic-impl-less-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-impl-more-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-lifetime-trait-impl.stderr2
-rw-r--r--tests/ui/generics/generic-type-less-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-type-more-params-with-defaults.stderr2
-rw-r--r--tests/ui/generics/generic-type-params-forward-mention.stderr2
-rw-r--r--tests/ui/generics/issue-59508-1.stderr2
-rw-r--r--tests/ui/generics/issue-59508.stderr2
-rw-r--r--tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr2
-rw-r--r--tests/ui/generics/issue-79605.stderr2
-rw-r--r--tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr2
-rw-r--r--tests/ui/generics/issue-83556.stderr2
-rw-r--r--tests/ui/generics/issue-95208-ignore-qself.stderr2
-rw-r--r--tests/ui/generics/issue-95208.stderr2
-rw-r--r--tests/ui/generics/issue-98432.stderr2
-rw-r--r--tests/ui/generics/param-in-ct-in-ty-param-default.stderr4
-rw-r--r--tests/ui/generics/single-colon-path-not-const-generics.stderr2
-rw-r--r--tests/ui/generics/slightly-nice-generic-literal-messages.stderr2
-rw-r--r--tests/ui/generics/unclosed-generics-in-impl-def.rs2
-rw-r--r--tests/ui/generics/unclosed-generics-in-impl-def.stderr13
22 files changed, 36 insertions, 21 deletions
diff --git a/tests/ui/generics/generic-extern.stderr b/tests/ui/generics/generic-extern.stderr
index c90215b61..4d9f6fede 100644
--- a/tests/ui/generics/generic-extern.stderr
+++ b/tests/ui/generics/generic-extern.stderr
@@ -6,6 +6,6 @@ LL | fn foo<T>();
|
= help: replace the type parameters with concrete types like `u32`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0044`.
diff --git a/tests/ui/generics/generic-function-item-where-type.stderr b/tests/ui/generics/generic-function-item-where-type.stderr
index 88594129c..00e62843c 100644
--- a/tests/ui/generics/generic-function-item-where-type.stderr
+++ b/tests/ui/generics/generic-function-item-where-type.stderr
@@ -7,6 +7,6 @@ LL | foo::<main>()
= help: `main` is a function item, not a type
= help: function item types cannot be named directly
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/generics/generic-impl-less-params-with-defaults.stderr b/tests/ui/generics/generic-impl-less-params-with-defaults.stderr
index 262561fa8..11227328e 100644
--- a/tests/ui/generics/generic-impl-less-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-impl-less-params-with-defaults.stderr
@@ -16,6 +16,6 @@ help: add missing generic argument
LL | Foo::<isize, B>::new();
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
index 2f4682c4e..c5812abfd 100644
--- a/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-impl-more-params-with-defaults.stderr
@@ -12,6 +12,6 @@ note: struct defined here, with at most 2 generic parameters: `T`, `A`
LL | struct Vec<T, A = Heap>(
| ^^^ - --------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-lifetime-trait-impl.stderr b/tests/ui/generics/generic-lifetime-trait-impl.stderr
index 4ae5098a1..6974c8ad0 100644
--- a/tests/ui/generics/generic-lifetime-trait-impl.stderr
+++ b/tests/ui/generics/generic-lifetime-trait-impl.stderr
@@ -7,6 +7,6 @@ LL | fn bar<'b, T: Bar<'b>>(self) -> &'b str;
LL | fn bar<T: Bar<'a>>(self) -> &'a str { panic!() }
| ^^^^^^^^^^^^ lifetimes do not match method in trait
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/generics/generic-type-less-params-with-defaults.stderr b/tests/ui/generics/generic-type-less-params-with-defaults.stderr
index 6450bbd8b..6f79b09f6 100644
--- a/tests/ui/generics/generic-type-less-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-type-less-params-with-defaults.stderr
@@ -14,6 +14,6 @@ help: add missing generic argument
LL | let _: Vec<T>;
| +++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-type-more-params-with-defaults.stderr b/tests/ui/generics/generic-type-more-params-with-defaults.stderr
index 4d01ba1f4..c44f6b7dd 100644
--- a/tests/ui/generics/generic-type-more-params-with-defaults.stderr
+++ b/tests/ui/generics/generic-type-more-params-with-defaults.stderr
@@ -12,6 +12,6 @@ note: struct defined here, with at most 2 generic parameters: `T`, `A`
LL | struct Vec<T, A = Heap>(
| ^^^ - --------
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/generics/generic-type-params-forward-mention.stderr b/tests/ui/generics/generic-type-params-forward-mention.stderr
index fa661c274..d7a6faa19 100644
--- a/tests/ui/generics/generic-type-params-forward-mention.stderr
+++ b/tests/ui/generics/generic-type-params-forward-mention.stderr
@@ -4,6 +4,6 @@ error[E0128]: generic parameters with a default cannot use forward declared iden
LL | struct Foo<T = Option<U>, U = bool>(T, U);
| ^ defaulted generic parameters cannot be forward declared
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0128`.
diff --git a/tests/ui/generics/issue-59508-1.stderr b/tests/ui/generics/issue-59508-1.stderr
index 1c510044f..7d4fdb2d8 100644
--- a/tests/ui/generics/issue-59508-1.stderr
+++ b/tests/ui/generics/issue-59508-1.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | pub fn do_things<T, 'a, 'b: 'a>() {
| ----^^--^^----- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b: 'a, T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-59508.stderr b/tests/ui/generics/issue-59508.stderr
index fd23b6276..aeaf0187e 100644
--- a/tests/ui/generics/issue-59508.stderr
+++ b/tests/ui/generics/issue-59508.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | pub fn do_things<T, 'a, 'b: 'a>() {
| ----^^--^^----- help: reorder the parameters: lifetimes, then consts and types: `<'a, 'b: 'a, T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr b/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr
index 679118223..3f4f50562 100644
--- a/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr
+++ b/tests/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr
@@ -11,6 +11,6 @@ note: required by a bound in `Tsized`
LL | trait Tsized<P: Sized = [Self]> {}
| ^^^^^^^^^^^^^^^^^ required by this bound in `Tsized`
-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/generics/issue-79605.stderr b/tests/ui/generics/issue-79605.stderr
index c5584962d..67fed200f 100644
--- a/tests/ui/generics/issue-79605.stderr
+++ b/tests/ui/generics/issue-79605.stderr
@@ -9,6 +9,6 @@ help: use type parameters instead
LL | impl<T> X<'_, T> {}
| +++ ~
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0121`.
diff --git a/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr b/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr
index 70793a9c9..d7e12f07e 100644
--- a/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr
+++ b/tests/ui/generics/issue-80512-param-reordering-with-defaults.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | struct S<T = (), 'a>(&'a T);
| ---------^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T = ()>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-83556.stderr b/tests/ui/generics/issue-83556.stderr
index 93affaffe..0c5a65f0c 100644
--- a/tests/ui/generics/issue-83556.stderr
+++ b/tests/ui/generics/issue-83556.stderr
@@ -4,5 +4,5 @@ error: lifetime parameters must be declared prior to type and const parameters
LL | struct Foo<T, 'a>(&'a ());
| ----^^- help: reorder the parameters: lifetimes, then consts and types: `<'a, T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-95208-ignore-qself.stderr b/tests/ui/generics/issue-95208-ignore-qself.stderr
index acbc1300d..cf40e857d 100644
--- a/tests/ui/generics/issue-95208-ignore-qself.stderr
+++ b/tests/ui/generics/issue-95208-ignore-qself.stderr
@@ -6,5 +6,5 @@ LL | impl<T: Iterator> Struct<T> where <T as std:: iter::Iterator>::Item:: std::
| |
| help: use single colon: `:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-95208.stderr b/tests/ui/generics/issue-95208.stderr
index 559527663..0d856d096 100644
--- a/tests/ui/generics/issue-95208.stderr
+++ b/tests/ui/generics/issue-95208.stderr
@@ -6,5 +6,5 @@ LL | impl<T> Struct<T> where T:: std::fmt::Display {
| |
| help: use single colon: `:`
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/issue-98432.stderr b/tests/ui/generics/issue-98432.stderr
index 0736d9410..2b09d4396 100644
--- a/tests/ui/generics/issue-98432.stderr
+++ b/tests/ui/generics/issue-98432.stderr
@@ -9,6 +9,6 @@ LL | struct _Obligation where T:;
| |
| help: try introducing a local generic parameter here: `<T>`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/generics/param-in-ct-in-ty-param-default.stderr b/tests/ui/generics/param-in-ct-in-ty-param-default.stderr
index ab09ebcae..03dbb3eb9 100644
--- a/tests/ui/generics/param-in-ct-in-ty-param-default.stderr
+++ b/tests/ui/generics/param-in-ct-in-ty-param-default.stderr
@@ -5,7 +5,7 @@ LL | struct Foo<T, U = [u8; std::mem::size_of::<T>()]>(T, U);
| ^ 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 previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/single-colon-path-not-const-generics.stderr b/tests/ui/generics/single-colon-path-not-const-generics.stderr
index 96f07e190..d61562bb1 100644
--- a/tests/ui/generics/single-colon-path-not-const-generics.stderr
+++ b/tests/ui/generics/single-colon-path-not-const-generics.stderr
@@ -8,5 +8,5 @@ LL | a: Vec<foo::bar:A>,
|
= note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/generics/slightly-nice-generic-literal-messages.stderr b/tests/ui/generics/slightly-nice-generic-literal-messages.stderr
index 83ef522ab..9811d30cf 100644
--- a/tests/ui/generics/slightly-nice-generic-literal-messages.stderr
+++ b/tests/ui/generics/slightly-nice-generic-literal-messages.stderr
@@ -9,6 +9,6 @@ LL | 1 => {}
= note: expected struct `Foo<{float}, _>`
found type `{integer}`
-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/generics/unclosed-generics-in-impl-def.rs b/tests/ui/generics/unclosed-generics-in-impl-def.rs
new file mode 100644
index 000000000..2ec99b16e
--- /dev/null
+++ b/tests/ui/generics/unclosed-generics-in-impl-def.rs
@@ -0,0 +1,2 @@
+impl<S: Into<std::borrow::Cow<'static, str>> From<S> for Canonical {} //~ ERROR expected
+fn main() {}
diff --git a/tests/ui/generics/unclosed-generics-in-impl-def.stderr b/tests/ui/generics/unclosed-generics-in-impl-def.stderr
new file mode 100644
index 000000000..aa1977ad8
--- /dev/null
+++ b/tests/ui/generics/unclosed-generics-in-impl-def.stderr
@@ -0,0 +1,13 @@
+error: expected one of `+`, `,`, `::`, `=`, or `>`, found `From`
+ --> $DIR/unclosed-generics-in-impl-def.rs:1:46
+ |
+LL | impl<S: Into<std::borrow::Cow<'static, str>> From<S> for Canonical {}
+ | ^^^^ expected one of `+`, `,`, `::`, `=`, or `>`
+ |
+help: you might have meant to end the type parameters here
+ |
+LL | impl<S: Into<std::borrow::Cow<'static, str>>> From<S> for Canonical {}
+ | +
+
+error: aborting due to 1 previous error
+