Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f60e854

Browse files
committedFeb 6, 2024
Stabilize associated type position impl Trait (ATPIT)
1 parent f3b9d47 commit f60e854

File tree

135 files changed

+129
-358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+129
-358
lines changed
 

‎tests/ui/impl-trait/issue-55872-1.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(impl_trait_in_assoc_type)]
2-
31
pub trait Bar {
42
type E: Copy;
53

‎tests/ui/impl-trait/issue-55872-1.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0276]: impl has stricter requirements than trait
2-
--> $DIR/issue-55872-1.rs:12:15
2+
--> $DIR/issue-55872-1.rs:10:15
33
|
44
LL | fn foo<T>() -> Self::E;
55
| ----------------------- definition of `foo` from trait
@@ -8,7 +8,7 @@ LL | fn foo<T: Default>() -> Self::E {
88
| ^^^^^^^ impl has extra requirement `T: Default`
99

1010
error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
11-
--> $DIR/issue-55872-1.rs:12:29
11+
--> $DIR/issue-55872-1.rs:10:29
1212
|
1313
LL | fn foo<T: Default>() -> Self::E {
1414
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`, which is required by `(S, T): Copy`
@@ -20,7 +20,7 @@ LL | impl<S: Default + std::marker::Copy> Bar for S {
2020
| +++++++++++++++++++
2121

2222
error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
23-
--> $DIR/issue-55872-1.rs:12:29
23+
--> $DIR/issue-55872-1.rs:10:29
2424
|
2525
LL | fn foo<T: Default>() -> Self::E {
2626
| ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`, which is required by `(S, T): Copy`

‎tests/ui/impl-trait/issue-55872-2.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// edition:2018
22

3-
#![feature(impl_trait_in_assoc_type)]
4-
53
pub trait Bar {
64
type E: Send;
75

There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.