title: Could not find an implementation of the query pattern on IEnumerable<T>
body: <p>
  I've got an <code>IEnumerable&lt;T&gt;</code> as a parameter of a method, where <code>T</code> is a struct type:</p>
  
  <pre class="lang-cs prettyprint-override"><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using ...
  
  public static class Foo
  {
      internal struct CellDiff
      {
          public int RefX;
          public int RefY;
          public object OldValue;
          public object NewValue;
      }
  
      private static void ItemChanged(IEnumerable&lt;CellDiff&gt; diffs, int cellX, int cellY)
      {
          var change = from CellDiff diff in diffs
                       where diff.RefX == cellX &amp;&amp; diff.RefY == cellY
                       select diff;
  
          ...
      }
  }
  </code></pre>
  
  <p>This results in the following error:</p>
  
  <blockquote>
    <p>(parameter) <code>IEnumerable&lt;CellDiff&gt; diffs</code></p>
    
    <p>Error:<br />
    Could not find an implementation of the query pattern for source type '<code>CellDiff</code>'. '<code>Where</code>' not found.</p>
  </blockquote>
  
  <p>I've also tried doing <code>diffs.AsQueryable()</code>, to no avail.</p>
  
  <p>I usually have no problem doing LINQ queries on <code>IEnumerable&lt;T&gt;</code>. I'm a bit lost as to what's happening here.</p>