summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-type-bounds
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/associated-type-bounds
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/associated-type-bounds')
-rw-r--r--tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr2
-rw-r--r--tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr2
-rw-r--r--tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr2
-rw-r--r--tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr2
-rw-r--r--tests/ui/associated-type-bounds/binder-on-bound.stderr2
-rw-r--r--tests/ui/associated-type-bounds/const-projection-err.gce.stderr2
-rw-r--r--tests/ui/associated-type-bounds/const-projection-err.stock.stderr2
-rw-r--r--tests/ui/associated-type-bounds/consts.rs2
-rw-r--r--tests/ui/associated-type-bounds/consts.stderr14
-rw-r--r--tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-102335-ty.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-104916.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-71443-1.stderr2
-rw-r--r--tests/ui/associated-type-bounds/issue-99828.rs2
-rw-r--r--tests/ui/associated-type-bounds/issue-99828.stderr10
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.rs2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.stderr7
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr2
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr2
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr2
26 files changed, 43 insertions, 34 deletions
diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr
index f2604f0ba..9b077a4d3 100644
--- a/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr
+++ b/tests/ui/associated-type-bounds/ambiguous-associated-type2.stderr
@@ -12,6 +12,6 @@ LL | trait Baz: Foo + Bar<Self::Item> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr
index a32ab4531..794299287 100644
--- a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr
+++ b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr
@@ -4,6 +4,6 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
LL | fn func() -> Self::Out {
| ^^^^^^^^^ the trait `Copy` is not implemented for `String`
-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/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr
index 6fa266d23..fe300a7de 100644
--- a/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr
+++ b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr
@@ -4,5 +4,5 @@ error: associated type bounds are only allowed in where clauses and function sig
LL | dyn for<'j> B<AssocType: 'j>:,
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr
index 8b66627d5..7bdb2c5a7 100644
--- a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr
+++ b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr
@@ -4,5 +4,5 @@ error: associated type bounds are only allowed in where clauses and function sig
LL | impl dyn Trait<Item: Trait2> {}
| ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/binder-on-bound.stderr b/tests/ui/associated-type-bounds/binder-on-bound.stderr
index f71f72bfb..d09ad73a6 100644
--- a/tests/ui/associated-type-bounds/binder-on-bound.stderr
+++ b/tests/ui/associated-type-bounds/binder-on-bound.stderr
@@ -4,5 +4,5 @@ error: `for<...>` is not allowed on associated type bounds
LL | fn foo() where Trait<for<'a> Bound<'a> = &'a ()> {
| ^^^^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/const-projection-err.gce.stderr b/tests/ui/associated-type-bounds/const-projection-err.gce.stderr
index 0f1ec9ad0..0b6207074 100644
--- a/tests/ui/associated-type-bounds/const-projection-err.gce.stderr
+++ b/tests/ui/associated-type-bounds/const-projection-err.gce.stderr
@@ -19,6 +19,6 @@ note: required by a bound in `foo`
LL | fn foo<T: TraitWAssocConst<A = 1>>() {}
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-type-bounds/const-projection-err.stock.stderr b/tests/ui/associated-type-bounds/const-projection-err.stock.stderr
index bf0824259..e782571c7 100644
--- a/tests/ui/associated-type-bounds/const-projection-err.stock.stderr
+++ b/tests/ui/associated-type-bounds/const-projection-err.stock.stderr
@@ -12,6 +12,6 @@ note: required by a bound in `foo`
LL | fn foo<T: TraitWAssocConst<A = 1>>() {}
| ^^^^^ required by this bound in `foo`
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0271`.
diff --git a/tests/ui/associated-type-bounds/consts.rs b/tests/ui/associated-type-bounds/consts.rs
index 9b95b1b52..8f90c36ed 100644
--- a/tests/ui/associated-type-bounds/consts.rs
+++ b/tests/ui/associated-type-bounds/consts.rs
@@ -1,7 +1,7 @@
#![feature(associated_type_bounds)]
pub fn accept(_: impl Trait<K: Copy>) {}
-//~^ ERROR expected associated type, found associated constant
+//~^ ERROR expected type, found constant
pub trait Trait {
const K: i32;
diff --git a/tests/ui/associated-type-bounds/consts.stderr b/tests/ui/associated-type-bounds/consts.stderr
index ddfb6612b..7f9fe5e50 100644
--- a/tests/ui/associated-type-bounds/consts.stderr
+++ b/tests/ui/associated-type-bounds/consts.stderr
@@ -1,10 +1,16 @@
-error: expected associated type, found associated constant
+error: expected type, found constant
--> $DIR/consts.rs:3:29
|
LL | pub fn accept(_: impl Trait<K: Copy>) {}
- | ^
+ | ^------ bounds are not allowed on associated constants
+ | |
+ | unexpected constant
|
- = note: trait bounds not allowed on associated constant
+note: the associated constant is defined here
+ --> $DIR/consts.rs:7:5
+ |
+LL | const K: i32;
+ | ^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
index 78bf93c32..1f99d7db0 100644
--- a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
+++ b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
@@ -13,6 +13,6 @@ LL | let _low = self.lows.remove(low.identify()).unwrap();
note: method defined here
--> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
-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/associated-type-bounds/issue-102335-ty.stderr b/tests/ui/associated-type-bounds/issue-102335-ty.stderr
index 8777b2965..561ca15ab 100644
--- a/tests/ui/associated-type-bounds/issue-102335-ty.stderr
+++ b/tests/ui/associated-type-bounds/issue-102335-ty.stderr
@@ -4,6 +4,6 @@ error[E0229]: associated type bindings are not allowed here
LL | type A: S<C<i32 = u32> = ()>;
| ^^^^^^^^^ associated type not allowed here
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0229`.
diff --git a/tests/ui/associated-type-bounds/issue-104916.stderr b/tests/ui/associated-type-bounds/issue-104916.stderr
index 35435962f..65c89735c 100644
--- a/tests/ui/associated-type-bounds/issue-104916.stderr
+++ b/tests/ui/associated-type-bounds/issue-104916.stderr
@@ -4,5 +4,5 @@ error: associated type bounds are only allowed in where clauses and function sig
LL | dyn for<'j> B<AssocType: 'j>:,
| ^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to 1 previous error
diff --git a/tests/ui/associated-type-bounds/issue-71443-1.stderr b/tests/ui/associated-type-bounds/issue-71443-1.stderr
index 09c8ec2e2..6abaaf8e1 100644
--- a/tests/ui/associated-type-bounds/issue-71443-1.stderr
+++ b/tests/ui/associated-type-bounds/issue-71443-1.stderr
@@ -6,6 +6,6 @@ LL | fn hello<F: for<'a> Iterator<Item: 'a>>() {
LL | Incorrect
| ^^^^^^^^^ expected `()`, found `Incorrect`
-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/associated-type-bounds/issue-99828.rs b/tests/ui/associated-type-bounds/issue-99828.rs
index 7b711283f..67ba50f3c 100644
--- a/tests/ui/associated-type-bounds/issue-99828.rs
+++ b/tests/ui/associated-type-bounds/issue-99828.rs
@@ -1,5 +1,5 @@
fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
- //~^ ERROR expected associated type bound, found constant
+ //~^ ERROR expected type, found constant
//~| ERROR associated const equality is incomplete
vec.iter()
}
diff --git a/tests/ui/associated-type-bounds/issue-99828.stderr b/tests/ui/associated-type-bounds/issue-99828.stderr
index dc93c47da..8813baf84 100644
--- a/tests/ui/associated-type-bounds/issue-99828.stderr
+++ b/tests/ui/associated-type-bounds/issue-99828.stderr
@@ -7,13 +7,15 @@ LL | fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
= note: see issue #92827 <https://github.com/rust-lang/rust/issues/92827> for more information
= help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
-error: expected associated type bound, found constant
- --> $DIR/issue-99828.rs:1:43
+error: expected type, found constant
+ --> $DIR/issue-99828.rs:1:50
|
LL | fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ {
- | ^^^^^^^^^
+ | ---- ^^ unexpected constant
+ | |
+ | expected a type because of this associated type
|
-note: associated type defined here
+note: the associated type is defined here
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
error: aborting due to 2 previous errors
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
index 6c2645ae5..3666007e3 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.current_without.stderr
@@ -25,5 +25,5 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
index 6c2645ae5..3666007e3 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.next_without.stderr
@@ -25,5 +25,5 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
index 5b96676d0..f576cc9c9 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
@@ -25,5 +25,5 @@ note: required by a bound in `is_send`
LL | fn is_send(_: impl Send) {}
| ^^^^ required by this bound in `is_send`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
index d2a445f33..26b4d935a 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.current.stderr
@@ -13,5 +13,5 @@ error: return type notation is not allowed to use type equality
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
index d2a445f33..26b4d935a 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.next.stderr
@@ -13,5 +13,5 @@ error: return type notation is not allowed to use type equality
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
index 1a2f84715..d432e9577 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
@@ -13,5 +13,5 @@ error: return type notation is not allowed to use type equality
LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.rs b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
index 0679b96f6..e6270ec31 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
@@ -8,6 +8,6 @@ trait Trait {
}
fn bar<T: Trait<methid(): Send>>() {}
-//~^ ERROR cannot find associated function `methid` for `Trait`
+//~^ ERROR associated function `methid` not found for `Trait`
fn main() {}
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
index fb6538fa0..db9cb9f49 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
@@ -7,11 +7,12 @@ LL | #![feature(return_type_notation)]
= note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
= note: `#[warn(incomplete_features)]` on by default
-error: cannot find associated function `methid` for `Trait`
+error[E0220]: associated function `methid` not found for `Trait`
--> $DIR/missing.rs:10:17
|
LL | fn bar<T: Trait<methid(): Send>>() {}
- | ^^^^^^^^^^^^^^
+ | ^^^^^^ help: there is an associated function with a similar name: `method`
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
+For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr
index 31b793995..3e307c5f4 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/non-rpitit.stderr
@@ -18,5 +18,5 @@ LL | fn test<T: Trait<method(): Send>>() {}
|
= note: function returns `()`, which is not compatible with associated type return bounds
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to 1 previous error; 1 warning emitted
diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr
index 77e015b41..f27603e37 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr
@@ -7,6 +7,6 @@ LL | fn foo<T: Trait<method(i32): Send>>() {}
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/52662> for more information
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
index b104f38ce..7ca9aff43 100644
--- a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
@@ -11,6 +11,6 @@ help: consider constraining the associated type `<C as O>::M` to `u8`
LL | impl<C: O<M = u8>> U<C> for u16 {
| ++++++++
-error: aborting due to previous error
+error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.