title: Why can I call the last method on a fixed-size array while this type doesn't implement that function?
body: <p>I have a fixed-size array I want to get the last element:</p>
  <pre><code>let array = [1, 2, 3];
  </code></pre>
  <p>According to the <a href="https://doc.rust-lang.org/std/primitive.array.html" rel="nofollow noreferrer">documentation page</a> of the fixed-size array, there is no <code>last</code> method directly implemented for that type.</p>
  <p>After a quick research, I have noticed the <a href="https://doc.rust-lang.org/std/primitive.slice.html" rel="nofollow noreferrer">slice type</a> implements the <code>last</code> method. All I have to do now is to find a way to convert my array to a slice. I can do that using the <code>iter</code> method:</p>
  <pre><code>let last = array.iter().last();
  </code></pre>
  <p>But I also have noted that I can omit the call to <code>iter</code> and get the exactly same behavior:</p>
  <pre><code>let last = array.last();
  </code></pre>
  <p>Why is this possible? How can the fixed-size array type call a method it doesn't implement? I have taken a look to all the traits implemented for that type and none of them have a <code>last</code> method.</p>
  <p><em>While I was writing this question, I also noticed the <code>iter</code> function is not defined for the fixed-size array type. Is the documentation partial? Or am I bad at reading it?</em></p>