Skip to content

Commit de6a4cf

Browse files
committed
Clarify that this only triggers when both traits are in scope
1 parent b32c37e commit de6a4cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Summary
77
[summary]: #summary
88

9-
When name resolution encounters an ambiguity between 2 trait methods, if one trait is a sub-trait of the other then select that method instead of reporting an ambiguity error.
9+
When name resolution encounters an ambiguity between 2 trait methods when both traits are in scope, if one trait is a sub-trait of the other then select that method instead of reporting an ambiguity error.
1010

1111
# Motivation
1212
[motivation]: #motivation
@@ -47,6 +47,8 @@ This RFC proposes to change name resolution to resolve the ambiguity in the foll
4747

4848
When this happens, the sub-trait method is selected instead of reporting an ambiguity error.
4949

50+
Note that this only happens when *both* traits are in scope since this is required for the ambiguity to occur in the first place.
51+
5052
# Drawbacks
5153
[drawbacks]: #drawbacks
5254

0 commit comments

Comments
 (0)