summaryrefslogtreecommitdiffstats
path: root/tests/ui/specialization
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/specialization')
-rw-r--r--tests/ui/specialization/defaultimpl/specialization-no-default.stderr10
-rw-r--r--tests/ui/specialization/issue-50452-fail.stderr2
-rw-r--r--tests/ui/specialization/non-defaulted-item-fail.stderr12
-rw-r--r--tests/ui/specialization/specialization-default-types.stderr4
-rw-r--r--tests/ui/specialization/specialization-no-default.stderr10
5 files changed, 19 insertions, 19 deletions
diff --git a/tests/ui/specialization/defaultimpl/specialization-no-default.stderr b/tests/ui/specialization/defaultimpl/specialization-no-default.stderr
index 770be2af2..f9e62a99b 100644
--- a/tests/ui/specialization/defaultimpl/specialization-no-default.stderr
+++ b/tests/ui/specialization/defaultimpl/specialization-no-default.stderr
@@ -15,7 +15,7 @@ LL | impl<T> Foo for T {
| ----------------- parent `impl` is here
...
LL | fn foo(&self) {}
- | ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
+ | ^^^^^^^^^^^^^ cannot specialize default item `foo`
|
= note: to specialize, `foo` in the parent `impl` must be marked `default`
@@ -26,7 +26,7 @@ LL | impl<T> Foo for T {
| ----------------- parent `impl` is here
...
LL | fn bar(&self) {}
- | ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
+ | ^^^^^^^^^^^^^ cannot specialize default item `bar`
|
= note: to specialize, `bar` in the parent `impl` must be marked `default`
@@ -37,7 +37,7 @@ LL | impl<T> Bar for T {
| ----------------- parent `impl` is here
...
LL | type T = ();
- | ^^^^^^^^^^^^ cannot specialize default item `T`
+ | ^^^^^^ cannot specialize default item `T`
|
= note: to specialize, `T` in the parent `impl` must be marked `default`
@@ -48,7 +48,7 @@ LL | impl<T: Clone> Baz for T {
| ------------------------ parent `impl` is here
...
LL | fn baz(&self) {}
- | ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
+ | ^^^^^^^^^^^^^ cannot specialize default item `baz`
|
= note: to specialize, `baz` in the parent `impl` must be marked `default`
@@ -59,7 +59,7 @@ LL | impl<T: Clone> Redundant for T {
| ------------------------------ parent `impl` is here
...
LL | fn redundant(&self) {}
- | ^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
+ | ^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
|
= note: to specialize, `redundant` in the parent `impl` must be marked `default`
diff --git a/tests/ui/specialization/issue-50452-fail.stderr b/tests/ui/specialization/issue-50452-fail.stderr
index 5c136adc4..3fc29fff2 100644
--- a/tests/ui/specialization/issue-50452-fail.stderr
+++ b/tests/ui/specialization/issue-50452-fail.stderr
@@ -12,7 +12,7 @@ error[E0520]: `foo` specializes an item from a parent `impl`, but that item is n
--> $DIR/issue-50452-fail.rs:10:5
|
LL | fn foo() {}
- | ^^^^^^^^^^^ cannot specialize default item `foo`
+ | ^^^^^^^^ cannot specialize default item `foo`
...
LL | impl<T> Foo for T {
| ----------------- parent `impl` is here
diff --git a/tests/ui/specialization/non-defaulted-item-fail.stderr b/tests/ui/specialization/non-defaulted-item-fail.stderr
index faa14555a..9d62a353d 100644
--- a/tests/ui/specialization/non-defaulted-item-fail.stderr
+++ b/tests/ui/specialization/non-defaulted-item-fail.stderr
@@ -15,7 +15,7 @@ LL | impl<T> Foo for Box<T> {
| ---------------------- parent `impl` is here
...
LL | type Ty = Vec<()>;
- | ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
+ | ^^^^^^^ cannot specialize default item `Ty`
|
= note: to specialize, `Ty` in the parent `impl` must be marked `default`
@@ -26,7 +26,7 @@ LL | impl<T> Foo for Box<T> {
| ---------------------- parent `impl` is here
...
LL | const CONST: u8 = 42;
- | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
+ | ^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
|
= note: to specialize, `CONST` in the parent `impl` must be marked `default`
@@ -37,7 +37,7 @@ LL | impl<T> Foo for Box<T> {
| ---------------------- parent `impl` is here
...
LL | fn foo(&self) -> bool { true }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
+ | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
|
= note: to specialize, `foo` in the parent `impl` must be marked `default`
@@ -48,7 +48,7 @@ LL | impl<T> Foo for Vec<T> {}
| ---------------------- parent `impl` is here
...
LL | type Ty = Vec<()>;
- | ^^^^^^^^^^^^^^^^^^ cannot specialize default item `Ty`
+ | ^^^^^^^ cannot specialize default item `Ty`
|
= note: to specialize, `Ty` in the parent `impl` must be marked `default`
@@ -59,7 +59,7 @@ LL | impl<T> Foo for Vec<T> {}
| ---------------------- parent `impl` is here
...
LL | const CONST: u8 = 42;
- | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
+ | ^^^^^^^^^^^^^^^ cannot specialize default item `CONST`
|
= note: to specialize, `CONST` in the parent `impl` must be marked `default`
@@ -70,7 +70,7 @@ LL | impl<T> Foo for Vec<T> {}
| ---------------------- parent `impl` is here
...
LL | fn foo(&self) -> bool { true }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
+ | ^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
|
= note: to specialize, `foo` in the parent `impl` must be marked `default`
diff --git a/tests/ui/specialization/specialization-default-types.stderr b/tests/ui/specialization/specialization-default-types.stderr
index 61a556a93..ecccf29a1 100644
--- a/tests/ui/specialization/specialization-default-types.stderr
+++ b/tests/ui/specialization/specialization-default-types.stderr
@@ -16,7 +16,7 @@ LL | default type Output = Box<T>;
LL | default fn generate(self) -> Self::Output {
| ------------ expected `<T as Example>::Output` because of return type
LL | Box::new(self)
- | ^^^^^^^^^^^^^^ expected associated type, found struct `Box`
+ | ^^^^^^^^^^^^^^ expected associated type, found `Box<T>`
|
= note: expected associated type `<T as Example>::Output`
found struct `Box<T>`
@@ -27,7 +27,7 @@ error[E0308]: mismatched types
LL | fn trouble<T>(t: T) -> Box<T> {
| ------ expected `Box<T>` because of return type
LL | Example::generate(t)
- | ^^^^^^^^^^^^^^^^^^^^ expected struct `Box`, found associated type
+ | ^^^^^^^^^^^^^^^^^^^^ expected `Box<T>`, found associated type
|
= note: expected struct `Box<T>`
found associated type `<T as Example>::Output`
diff --git a/tests/ui/specialization/specialization-no-default.stderr b/tests/ui/specialization/specialization-no-default.stderr
index 842cec9c7..695a3f6cc 100644
--- a/tests/ui/specialization/specialization-no-default.stderr
+++ b/tests/ui/specialization/specialization-no-default.stderr
@@ -15,7 +15,7 @@ LL | impl<T> Foo for T {
| ----------------- parent `impl` is here
...
LL | fn foo(&self) {}
- | ^^^^^^^^^^^^^^^^ cannot specialize default item `foo`
+ | ^^^^^^^^^^^^^ cannot specialize default item `foo`
|
= note: to specialize, `foo` in the parent `impl` must be marked `default`
@@ -26,7 +26,7 @@ LL | impl<T> Foo for T {
| ----------------- parent `impl` is here
...
LL | fn bar(&self) {}
- | ^^^^^^^^^^^^^^^^ cannot specialize default item `bar`
+ | ^^^^^^^^^^^^^ cannot specialize default item `bar`
|
= note: to specialize, `bar` in the parent `impl` must be marked `default`
@@ -37,7 +37,7 @@ LL | impl<T> Bar for T {
| ----------------- parent `impl` is here
...
LL | type T = ();
- | ^^^^^^^^^^^^ cannot specialize default item `T`
+ | ^^^^^^ cannot specialize default item `T`
|
= note: to specialize, `T` in the parent `impl` must be marked `default`
@@ -48,7 +48,7 @@ LL | impl<T: Clone> Baz for T {
| ------------------------ parent `impl` is here
...
LL | fn baz(&self) {}
- | ^^^^^^^^^^^^^^^^ cannot specialize default item `baz`
+ | ^^^^^^^^^^^^^ cannot specialize default item `baz`
|
= note: to specialize, `baz` in the parent `impl` must be marked `default`
@@ -59,7 +59,7 @@ LL | impl<T: Clone> Redundant for T {
| ------------------------------ parent `impl` is here
...
LL | default fn redundant(&self) {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot specialize default item `redundant`
|
= note: to specialize, `redundant` in the parent `impl` must be marked `default`