@@ -66,6 +66,13 @@ Once a method is looked up, if it can't be called for one (or more) of those rea
66
66
If a step is reached where there is more than one possible method , such as where generic methods or traits are considered the same , then it is a compiler error .
67
67
These cases require a [disambiguating function call syntax ] for method and function invocation .
68
68
69
+ > * * Edition Differences ** : Before the 2021 edition , during the search for visible methods , if the candidate receiver type is an [array type ], methods provided by the standard library [`IntoIterator `] trait are ignored .
70
+ >
71
+ > The edition used for this purpose is determined by the token representing the method name .
72
+ >
73
+ > This special case may be removed in the future .
74
+
75
+
69
76
<div class = " warning" >
70
77
71
78
** * Warning : *** For [trait objects ], if there is an inherent method of the same name as a trait method , it will give a compiler error when trying to call the method in a method call expression .
@@ -79,9 +86,11 @@ Just don't define inherent methods on trait objects with the same name as a trai
79
86
[_Expression_ ]: .. / expressions . md
80
87
[_PathExprSegment_ ]: .. / paths . md#paths - in - expressions
81
88
[visible ]: .. / visibility - and - privacy . md
89
+ [array type ]: .. / types / array . md
82
90
[trait objects ]: .. / types / trait - object . md
83
91
[disambiguate call ]: call - expr . md#disambiguating - function - calls
84
92
[disambiguating function call syntax ]: call - expr . md#disambiguating - function - calls
85
93
[dereference ]: operator - expr . md#the - dereference - operator
86
94
[methods ]: .. / items / associated - items . md#methods
87
95
[unsized coercion ]: .. / type - coercions . md#unsized - coercions
96
+ [`IntoIterator `]: .. / .. / std / iter / trait . IntoIterator . html
0 commit comments