<p dir="auto">It seems like the parser tries to read the type where it isn't:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    let a : u32 = 0;
    let b : usize = 0;

    a as usize &gt; b; // ok
    a as usize &lt; b; // error: expected one of `(`, `+`, `,`, `::`, `&lt;`, or `&gt;`, found `;`
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">let</span> a <span class="pl-kos">:</span> <span class="pl-smi">u32</span> = <span class="pl-c1">0</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> b <span class="pl-kos">:</span> <span class="pl-smi">usize</span> = <span class="pl-c1">0</span><span class="pl-kos">;</span>

    a <span class="pl-k">as</span> <span class="pl-smi">usize</span> &gt; b<span class="pl-kos">;</span> <span class="pl-c">// ok</span>
    a <span class="pl-k">as</span> <span class="pl-smi">usize</span> &lt; b<span class="pl-kos">;</span> <span class="pl-c">// error: expected one of `(`, `+`, `,`, `::`, `&lt;`, or `&gt;`, found `;`</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">I think it's rather strange that the operator <code class="notranslate">&gt;</code> works, but the operator <code class="notranslate">&lt;</code> doesn't at the same place.</p>
<p dir="auto"><code class="notranslate">rustc 1.0.0-nightly (522d09dfe 2015-02-19) (built 2015-02-20)</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="lib.rs:11:21: 11:23 error: expected type, found token LIT_INT_UNSUFFIXED(16i64)
lib.rs:11     if foo as int &lt; 16 {}"><pre class="notranslate"><code class="notranslate">lib.rs:11:21: 11:23 error: expected type, found token LIT_INT_UNSUFFIXED(16i64)
lib.rs:11     if foo as int &lt; 16 {}
</code></pre></div>
<p dir="auto">The solution is of course to parenthesize the cast so it doesn't get parsed as generics, but the error message does not help at all.</p>