<p dir="auto">So I came across this, and the message I received asked me to create a bug report.</p>
<p dir="auto">Mac OSX 10.9.3, x86_64</p>
<p dir="auto">Original error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc -L /usr/local/lib/glfw -L lib/glfw-rs/lib -L lib/gl-rs/lib -L lib/cgmath-rs/lib -O --out-dir=target src/main.rs
src/main.rs:79:14: 79:22 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
src/main.rs:79  let size = (vertices.len() * mem::size_of::&lt;GLfloat&gt;()) as GLsizeiptr;
                            ^~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:112"><pre class="notranslate"><code class="notranslate">rustc -L /usr/local/lib/glfw -L lib/glfw-rs/lib -L lib/gl-rs/lib -L lib/cgmath-rs/lib -O --out-dir=target src/main.rs
src/main.rs:79:14: 79:22 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
src/main.rs:79  let size = (vertices.len() * mem::size_of::&lt;GLfloat&gt;()) as GLsizeiptr;
                            ^~~~~~~~
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box&lt;Any&gt;', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:112
</code></pre></div>
<p dir="auto">rustc version is <code class="notranslate">rustc 0.11.0-nightly (b57d272e9908e164a72bd1a688141031705e1208 2014-07-11 01:11:36 +0000)</code></p>
<p dir="auto">Code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#![feature(globs)]

extern crate native;
extern crate glfw;
extern crate cgmath;
extern crate gl;

use glfw::Context;
use gl::types::*;
use std::mem;

mod shader;


#[start]
fn start(argc: int, argv: *const *const u8) -&gt; int {
    native::start(argc, argv, main)
}


fn main() {
    // Init
    let context = glfw::init(glfw::FAIL_ON_ERRORS).unwrap();

    // Set window hints to load OpenGL 3.2 on OSX
    context.window_hint(glfw::ContextVersion(3, 2));
    context.window_hint(glfw::OpenglForwardCompat(true));
    context.window_hint(glfw::OpenglProfile(glfw::OpenGlCoreProfile));

    // Create a window
    let (window, events) = context.create_window(1100, 775, &quot;Post Processing Effects&quot;,
        glfw::Windowed).expect(&quot;Failed to create window!&quot;);

    window.set_key_polling(true);
    window.set_size_polling(true);
    window.make_current();

    gl::load_with(|s| context.get_proc_address(s));


    // Shaders
    let mut shader = shader::Shader::new();
    shader.attach_from_file(&quot;vertex_shader.glsl&quot;, gl::VERTEX_SHADER);
    shader.attach_from_file(&quot;fragment_shader.glsl&quot;, gl::FRAGMENT_SHADER);
    shader.link();
    shader.bind_frag_color_name(&quot;color&quot;);
    shader.set();


    // VAO and VBO
    let vertices = [
        -0.5, -0.5,
        0.5, -0.5,
        0.0, 0.5,
    ];

    let mut vao = 0;
    let mut vbo = 0;

    unsafe {
        // Create a vertex array object
        gl::GenVertexArrays(1, &amp;mut vao);
        gl::BindVertexArray(vao);

        // Create a vertex buffer object
        gl::GenBuffers(1, &amp;mut vbo);
        gl::BindBuffer(gl::ARRAY_BUFFER, vbo);
    }

    // Calculate the size of the vertex data in bytes
    let size = (vertices.len() * mem::size_of::&lt;GLfloat&gt;()) as GLsizeiptr;

    unsafe {
        gl::BufferData(
            gl::ARRAY_BUFFER,
            size,
            mem::transmute(&amp;(vertices[0])),
            gl::STATIC_DRAW
        );
    }


    // Shader attributes
    shader.layout_attribs(&quot;position_in&quot;);


    // Main loop
    while !window.should_close() {
        context.poll_events();
        for (_, event) in glfw::flush_messages(&amp;events) {
            match event {
                glfw::KeyEvent(glfw::KeyEscape, _, glfw::Press, _) =&gt; {
                    window.set_should_close(true);
                },
                _ =&gt; {},
            }
        }

        gl::ClearColor(0.0, 0.0, 0.0, 1.0);
        gl::Clear(gl::COLOR_BUFFER_BIT);

        let count = (vertices.len() / 2) as i32;
        gl::DrawArrays(gl::TRIANGLES, 0, count);

        window.swap_buffers();
    }
}"><pre class="notranslate"><code class="notranslate">#![feature(globs)]

extern crate native;
extern crate glfw;
extern crate cgmath;
extern crate gl;

use glfw::Context;
use gl::types::*;
use std::mem;

mod shader;


#[start]
fn start(argc: int, argv: *const *const u8) -&gt; int {
    native::start(argc, argv, main)
}


fn main() {
    // Init
    let context = glfw::init(glfw::FAIL_ON_ERRORS).unwrap();

    // Set window hints to load OpenGL 3.2 on OSX
    context.window_hint(glfw::ContextVersion(3, 2));
    context.window_hint(glfw::OpenglForwardCompat(true));
    context.window_hint(glfw::OpenglProfile(glfw::OpenGlCoreProfile));

    // Create a window
    let (window, events) = context.create_window(1100, 775, "Post Processing Effects",
        glfw::Windowed).expect("Failed to create window!");

    window.set_key_polling(true);
    window.set_size_polling(true);
    window.make_current();

    gl::load_with(|s| context.get_proc_address(s));


    // Shaders
    let mut shader = shader::Shader::new();
    shader.attach_from_file("vertex_shader.glsl", gl::VERTEX_SHADER);
    shader.attach_from_file("fragment_shader.glsl", gl::FRAGMENT_SHADER);
    shader.link();
    shader.bind_frag_color_name("color");
    shader.set();


    // VAO and VBO
    let vertices = [
        -0.5, -0.5,
        0.5, -0.5,
        0.0, 0.5,
    ];

    let mut vao = 0;
    let mut vbo = 0;

    unsafe {
        // Create a vertex array object
        gl::GenVertexArrays(1, &amp;mut vao);
        gl::BindVertexArray(vao);

        // Create a vertex buffer object
        gl::GenBuffers(1, &amp;mut vbo);
        gl::BindBuffer(gl::ARRAY_BUFFER, vbo);
    }

    // Calculate the size of the vertex data in bytes
    let size = (vertices.len() * mem::size_of::&lt;GLfloat&gt;()) as GLsizeiptr;

    unsafe {
        gl::BufferData(
            gl::ARRAY_BUFFER,
            size,
            mem::transmute(&amp;(vertices[0])),
            gl::STATIC_DRAW
        );
    }


    // Shader attributes
    shader.layout_attribs("position_in");


    // Main loop
    while !window.should_close() {
        context.poll_events();
        for (_, event) in glfw::flush_messages(&amp;events) {
            match event {
                glfw::KeyEvent(glfw::KeyEscape, _, glfw::Press, _) =&gt; {
                    window.set_should_close(true);
                },
                _ =&gt; {},
            }
        }

        gl::ClearColor(0.0, 0.0, 0.0, 1.0);
        gl::Clear(gl::COLOR_BUFFER_BIT);

        let count = (vertices.len() / 2) as i32;
        gl::DrawArrays(gl::TRIANGLES, 0, count);

        window.swap_buffers();
    }
}
</code></pre></div>
<p dir="auto">I hope this is enough information, I can provide more if needed.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn main() {
    let v = &amp;[];
    let it = v.iter();
}"><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> v = <span class="pl-c1">&amp;</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
    <span class="pl-k">let</span> it = v<span class="pl-kos">.</span><span class="pl-en">iter</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="vec-ice.rs:3:13: 3:14 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
vec-ice.rs:3     let it = v.iter();
                          ^"><pre class="notranslate"><code class="notranslate">vec-ice.rs:3:13: 3:14 error: internal compiler error: borrow-vec associated with bad sty: &amp;ty_err
vec-ice.rs:3     let it = v.iter();
                          ^
</code></pre></div>
<p dir="auto">(Doesn't happen with <code class="notranslate">.slice</code>.)</p>