Skip to content

Commit f54263a

Browse files
committed
Adjust according to 2024-10-30 lang feedback
Co-authored-by: zachs18
1 parent c4cc0a8 commit f54263a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text/0000-supertrait-item-shadowing-v2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ When this happens, the sub-trait method is selected instead of reporting an ambi
4949

5050
Note that this only happens when *both* traits are in scope since this is required for the ambiguity to occur in the first place.
5151

52-
When an ambiguity is resolved in this way, a lint warning is also emitted to warn the user about the potential ambiguity. The aim of this lint is to discourage reliance on this mechanism in normal code usage: it should only be used for backwards-compatibilty and the lint can be silenced by having users change their code. We can always later change this lint to be allowed by default if we consider that there are valid use cases for this feature other than backwards-compatiblity.
52+
We will provide an allow-by-default lint to let users opt in to being notified when an ambiguity is resolved in this way.
5353

5454
### Type inference
5555

@@ -73,7 +73,7 @@ Today that example will give an ambiguity error because `method` is provided by
7373
# Drawbacks
7474
[drawbacks]: #drawbacks
7575

76-
This behavior can be surprising: adding a method to a sub-trait can change which function is called in unrelated code. This is mitigated by the lint which warns users about the potential ambiguity.
76+
This behavior might be surprising as adding a method to a subtrait can change which function is called in unrelated code. This is somewhat mitigated by the opt-in lint which, when enabled, warns users about the potential ambiguity.
7777

7878
# Rationale and alternatives
7979
[rationale-and-alternatives]: #rationale-and-alternatives
@@ -144,7 +144,7 @@ RFC 2845 was a previous attempt to address this problem, but it has several draw
144144
# Unresolved questions
145145
[unresolved-questions]: #unresolved-questions
146146

147-
None
147+
- Should we have a warn-by-default lint that fires at the definition-site of a subtrait that shadows a supertrait item?
148148

149149
# Future possibilities
150150
[future-possibilities]: #future-possibilities

0 commit comments

Comments
 (0)