<p dir="auto">I tried this code:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    let st = &quot;this is a string&quot;;
    let a: Vec(&amp;str) = st.split(' ').collect();
    println!(&quot;{:?}&quot;, a);
}"><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> st = <span class="pl-s">"this is a string"</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> a<span class="pl-kos">:</span> <span class="pl-smi">Vec</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">str</span><span class="pl-kos">)</span> = st<span class="pl-kos">.</span><span class="pl-en">split</span><span class="pl-kos">(</span><span class="pl-s">' '</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">collect</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{:?}"</span>, a<span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">and got this compiler output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc str.rs
str.rs:3:12: 3:21 error: parenthesized parameters may only be used with a trait [E0214]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                    ^~~~~~~~~
str.rs:3:15: 3:21 error: associated type bindings are not allowed here [E0229]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                       ^~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !predicates.has_escaping_regions()', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/librustc_typeck/check/mod.rs:1885"><pre class="notranslate"><code class="notranslate">$ rustc str.rs
str.rs:3:12: 3:21 error: parenthesized parameters may only be used with a trait [E0214]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                    ^~~~~~~~~
str.rs:3:15: 3:21 error: associated type bindings are not allowed here [E0229]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                       ^~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !predicates.has_escaping_regions()', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/librustc_typeck/check/mod.rs:1885
</code></pre></div>
<p dir="auto">so here is my bug report!</p>
<h2 dir="auto">Meta</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --verbose --version
rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)
binary: rustc
commit-hash: 9854143cba679834bc4ef932858cd5303f015a0e
commit-date: 2015-04-02
build-date: 2015-04-02
host: x86_64-apple-darwin
release: 1.0.0-beta"><pre class="notranslate"><code class="notranslate">$ rustc --verbose --version
rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)
binary: rustc
commit-hash: 9854143cba679834bc4ef932858cd5303f015a0e
commit-date: 2015-04-02
build-date: 2015-04-02
host: x86_64-apple-darwin
release: 1.0.0-beta
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ RUST_BACKTRACE=1 rustc str.rs
str.rs:3:12: 3:21 error: parenthesized parameters may only be used with a trait [E0214]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                    ^~~~~~~~~
str.rs:3:15: 3:21 error: associated type bindings are not allowed here [E0229]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                       ^~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !predicates.has_escaping_regions()', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/librustc_typeck/check/mod.rs:1885

stack backtrace:
   1:        0x109886f77 - sys::backtrace::write::h799ab135045ca9ca1LC
   2:        0x1098b4e4d - panicking::on_panic::h9502e488a92fc8bcHAI
   3:        0x1097d92de - rt::unwind::begin_unwind_inner::hf0537788ee16eadbiiI
   4:        0x105def32f - rt::unwind::begin_unwind::h4512943908055748573
   5:        0x105e654c9 - check::FnCtxt&lt;'a, 'tcx&gt;::add_obligations_for_parameters::hce6795515219f2632Ep
   6:        0x105eac589 - check::wf::BoundsChecker&lt;'cx, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h64128c0bf80f4889MBl
   7:        0x105ed7a92 - check::GatherLocalsVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'tcx&gt;::visit_local::h83d3d99027249c87yUn
   8:        0x105eb5d85 - check::check_fn::h410d0ffafb47f675l1n
   9:        0x105ed432e - check::check_bare_fn::h05c77be534ada2cfUQn
  10:        0x105ecdee2 - check::check_item::h9d89bedf29e4fe82F9n
  11:        0x105faa676 - check_crate::closure.36302
  12:        0x105fa4ae7 - check_crate::h09aa7856a322fd44bwC
  13:        0x105cc7355 - driver::phase_3_run_analysis_passes::h1af60e7c926ca39dgGa
  14:        0x105caba85 - driver::compile_input::h27cf4320fd56e5cbQba
  15:        0x105d69a15 - run_compiler::h93c68a2a3c26052bV4b
  16:        0x105d671e2 - boxed::F.FnBox&lt;A&gt;::call_box::h4498816167135712709
  17:        0x105d666d7 - rt::unwind::try::try_fn::h2387014819904265058
  18:        0x10993eea8 - rust_try_inner
  19:        0x10993ee95 - rust_try
  20:        0x105d669ca - boxed::F.FnBox&lt;A&gt;::call_box::h4850138824497903476
  21:        0x10989e37d - sys::thread::create::thread_start::h42d6d904fce5365aihH
  22:     0x7fff9112f267 - _pthread_body
  23:     0x7fff9112f1e4 - _pthread_start
"><pre class="notranslate"><code class="notranslate">$ RUST_BACKTRACE=1 rustc str.rs
str.rs:3:12: 3:21 error: parenthesized parameters may only be used with a trait [E0214]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                    ^~~~~~~~~
str.rs:3:15: 3:21 error: associated type bindings are not allowed here [E0229]
str.rs:3     let a: Vec(&amp;str) = st.split(' ').collect();
                       ^~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !predicates.has_escaping_regions()', /Users/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-mac/build/src/librustc_typeck/check/mod.rs:1885

stack backtrace:
   1:        0x109886f77 - sys::backtrace::write::h799ab135045ca9ca1LC
   2:        0x1098b4e4d - panicking::on_panic::h9502e488a92fc8bcHAI
   3:        0x1097d92de - rt::unwind::begin_unwind_inner::hf0537788ee16eadbiiI
   4:        0x105def32f - rt::unwind::begin_unwind::h4512943908055748573
   5:        0x105e654c9 - check::FnCtxt&lt;'a, 'tcx&gt;::add_obligations_for_parameters::hce6795515219f2632Ep
   6:        0x105eac589 - check::wf::BoundsChecker&lt;'cx, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h64128c0bf80f4889MBl
   7:        0x105ed7a92 - check::GatherLocalsVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'tcx&gt;::visit_local::h83d3d99027249c87yUn
   8:        0x105eb5d85 - check::check_fn::h410d0ffafb47f675l1n
   9:        0x105ed432e - check::check_bare_fn::h05c77be534ada2cfUQn
  10:        0x105ecdee2 - check::check_item::h9d89bedf29e4fe82F9n
  11:        0x105faa676 - check_crate::closure.36302
  12:        0x105fa4ae7 - check_crate::h09aa7856a322fd44bwC
  13:        0x105cc7355 - driver::phase_3_run_analysis_passes::h1af60e7c926ca39dgGa
  14:        0x105caba85 - driver::compile_input::h27cf4320fd56e5cbQba
  15:        0x105d69a15 - run_compiler::h93c68a2a3c26052bV4b
  16:        0x105d671e2 - boxed::F.FnBox&lt;A&gt;::call_box::h4498816167135712709
  17:        0x105d666d7 - rt::unwind::try::try_fn::h2387014819904265058
  18:        0x10993eea8 - rust_try_inner
  19:        0x10993ee95 - rust_try
  20:        0x105d669ca - boxed::F.FnBox&lt;A&gt;::call_box::h4850138824497903476
  21:        0x10989e37d - sys::thread::create::thread_start::h42d6d904fce5365aihH
  22:     0x7fff9112f267 - _pthread_body
  23:     0x7fff9112f1e4 - _pthread_start

</code></pre></div>
<p dir="auto">Minimal example to reproduce (using parenthesis instead of &lt;&gt; ):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() {
    let v: Vec(&amp;str) = vec!['1','2'];
}"><pre class="notranslate"><code class="notranslate">fn main() {
    let v: Vec(&amp;str) = vec!['1','2'];
}
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/D/s/o/test-rs git:master ❯❯❯ RUST_BACKTRACE=1 rustc src/main.rs                                                           
src/main.rs:2:12: 2:21 error: parenthesized parameters may only be used with a trait [E0214]
src/main.rs:2     let v: Vec(&amp;str) = vec!['1','2'];
                         ^~~~~~~~~
src/main.rs:2:15: 2:21 error: associated type bindings are not allowed here [E0229]
src/main.rs:2     let v: Vec(&amp;str) = vec!['1','2'];
                            ^~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !predicates.has_escaping_regions()', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/librustc_typeck/check/mod.rs:1887

stack backtrace:
   1:        0x103b1725b - sys::backtrace::write::hf72be5f813c90d15u5C
   2:        0x103b42918 - panicking::on_panic::h357b9ffd8bc8f79dSWI
   3:        0x103a5f7f7 - rt::unwind::begin_unwind_inner::h12b438ebbd8042edUFI
   4:        0x100184bbf - rt::unwind::begin_unwind::h4407626155523256809
   5:        0x1001f01b1 - check::FnCtxt&lt;'a, 'tcx&gt;::add_obligations_for_parameters::hedc68c4e9f8bb7eaR3o
   6:        0x1002348de - check::wf::BoundsChecker&lt;'cx, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h81005dd8c26ce0f4dxl
   7:        0x100259d85 - check::GatherLocalsVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'tcx&gt;::visit_local::hbbae7f527d661f07Jln
   8:        0x10023d4d5 - check::check_fn::h1d6196fc5f338991ssn
   9:        0x1002583ef - check::check_bare_fn::h866934e1757608268hn
  10:        0x100250650 - check::check_item::h403800fd4efc7443MAn
  11:        0x100328962 - check_crate::closure.36029
  12:        0x1003235ca - check_crate::hae957740b683eaa4IhC
  13:        0x10005b6e7 - driver::phase_3_run_analysis_passes::hdf5ccffdc8a743bcsGa
  14:        0x100041f96 - driver::compile_input::h7fdf739785f6d9d4Rba
  15:        0x1001027d3 - run_compiler::hb484336e43423a0fv2b
  16:        0x1001002f5 - thunk::F.Invoke&lt;A, R&gt;::invoke::h11654417678186204529
  17:        0x1000ff6b7 - rt::unwind::try::try_fn::h10741634765121132143
  18:        0x103bc6f68 - rust_try_inner
  19:        0x103bc6f55 - rust_try
  20:        0x1000ffa55 - thunk::F.Invoke&lt;A, R&gt;::invoke::h13457747256212984027
  21:        0x103b2d83d - sys::thread::create::thread_start::h937519545136f3ecJBH
  22:     0x7fff94a06267 - _pthread_body
  23:     0x7fff94a061e4 - _pthread_start"><pre class="notranslate"><code class="notranslate">~/D/s/o/test-rs git:master ❯❯❯ RUST_BACKTRACE=1 rustc src/main.rs                                                           
src/main.rs:2:12: 2:21 error: parenthesized parameters may only be used with a trait [E0214]
src/main.rs:2     let v: Vec(&amp;str) = vec!['1','2'];
                         ^~~~~~~~~
src/main.rs:2:15: 2:21 error: associated type bindings are not allowed here [E0229]
src/main.rs:2     let v: Vec(&amp;str) = vec!['1','2'];
                            ^~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !predicates.has_escaping_regions()', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/librustc_typeck/check/mod.rs:1887

stack backtrace:
   1:        0x103b1725b - sys::backtrace::write::hf72be5f813c90d15u5C
   2:        0x103b42918 - panicking::on_panic::h357b9ffd8bc8f79dSWI
   3:        0x103a5f7f7 - rt::unwind::begin_unwind_inner::h12b438ebbd8042edUFI
   4:        0x100184bbf - rt::unwind::begin_unwind::h4407626155523256809
   5:        0x1001f01b1 - check::FnCtxt&lt;'a, 'tcx&gt;::add_obligations_for_parameters::hedc68c4e9f8bb7eaR3o
   6:        0x1002348de - check::wf::BoundsChecker&lt;'cx, 'tcx&gt;.TypeFolder&lt;'tcx&gt;::fold_ty::h81005dd8c26ce0f4dxl
   7:        0x100259d85 - check::GatherLocalsVisitor&lt;'a, 'tcx&gt;.Visitor&lt;'tcx&gt;::visit_local::hbbae7f527d661f07Jln
   8:        0x10023d4d5 - check::check_fn::h1d6196fc5f338991ssn
   9:        0x1002583ef - check::check_bare_fn::h866934e1757608268hn
  10:        0x100250650 - check::check_item::h403800fd4efc7443MAn
  11:        0x100328962 - check_crate::closure.36029
  12:        0x1003235ca - check_crate::hae957740b683eaa4IhC
  13:        0x10005b6e7 - driver::phase_3_run_analysis_passes::hdf5ccffdc8a743bcsGa
  14:        0x100041f96 - driver::compile_input::h7fdf739785f6d9d4Rba
  15:        0x1001027d3 - run_compiler::hb484336e43423a0fv2b
  16:        0x1001002f5 - thunk::F.Invoke&lt;A, R&gt;::invoke::h11654417678186204529
  17:        0x1000ff6b7 - rt::unwind::try::try_fn::h10741634765121132143
  18:        0x103bc6f68 - rust_try_inner
  19:        0x103bc6f55 - rust_try
  20:        0x1000ffa55 - thunk::F.Invoke&lt;A, R&gt;::invoke::h13457747256212984027
  21:        0x103b2d83d - sys::thread::create::thread_start::h937519545136f3ecJBH
  22:     0x7fff94a06267 - _pthread_body
  23:     0x7fff94a061e4 - _pthread_start
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" rustc --version                                                                              
rustc 1.0.0-nightly (f4e0ce66a 2015-03-19) (built 2015-03-20)"><pre class="notranslate"><code class="notranslate"> rustc --version                                                                              
rustc 1.0.0-nightly (f4e0ce66a 2015-03-19) (built 2015-03-20)
</code></pre></div>