Skip to content

Commit ba6c758

Browse files
committed
Specify is #[fundamental]
1 parent 4a021aa commit ba6c758

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

text/0000-variadic-generics.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,13 @@ each element in the original tuple. For example,
7575
`(A, B, C)::AsRefs = (&A, &B, &C)` and
7676
`(A, B, C)::AsMuts = (&mut A, &mut B, &mut C)`
7777

78-
The `Tuple` trait should only be implemented for tuples. This would allow
79-
coherence and type-checking to be extended to assume that no implementations
80-
of `Tuple` will be added. This enables an increased level of negative
81-
reasoning making it easier to write blanket implementations of traits for
82-
tuples.
78+
The `Tuple` trait should only be implemented for tuples and marked with the
79+
`#[fundamental]` attribute described in
80+
[the coherence RFC](https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md).
81+
This would allow coherence and type-checking to be extended to assume that no
82+
implementations of `Tuple` will be added. This enables an increased level of
83+
negative reasoning making it easier to write blanket implementations of traits
84+
for tuples.
8385

8486
## The `(Head, ...Tail)` Type Syntax
8587
This syntax would allow for a `Cons`-cell-like representation of tuple types.
@@ -188,11 +190,6 @@ there is an expression immediately before the ellipsis.
188190
- Implement one of the other variadic designs, such as
189191
[#1582](https://github.com/rust-lang/rfcs/pull/1582) or
190192
[#1921](https://github.com/rust-lang/rfcs/pull/1921)
191-
- Implement this RFC, but leave out the extra-special coherence rules for
192-
`Tuple`. This would simplify the implementation of the `Tuple` intrinsic
193-
and remove some of the additional complexity it introduces. However, this
194-
also makes it much more challenging to write coherent blanket
195-
implementations for `Tuple`s.
196193

197194
# Unresolved questions
198195
[unresolved]: #unresolved-questions

0 commit comments

Comments
 (0)