Description
Rust version: 0.11
Platform: MacosX Mavericks
Error Message:
rustc src/pointer7.rs
ERROR:serialize::ebml::reader: failed to find block with tag 7
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with RUST_BACKTRACE=1
for a backtrace
task 'rustc' failed at 'explicit failure', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libserialize/ebml.rs:227
Program:
extern crate core;
use std::rc::Rc;
struct Point {x: f64, y: f64}
fn compute_distance(p1: Rc, p2: Rc) -> f64 {
let x_d = p1.x - p2.x;
let y_d = p1.y - p2.y;
::core::num::Float::sqrt(x_d * x_d + y_d * y_d)
}
fn main() {
println!("{}",
compute_distance(
Rc::new(Point {x: 1.0, y: 2.0}),
Rc::new(Point {x: 3.0, y: 4.0})));
}