]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #14364 : alexcrichton/rust/libdebug, r=brson
authorbors <bors@rust-lang.org>
Wed, 28 May 2014 04:46:46 +0000 (21:46 -0700)
committerbors <bors@rust-lang.org>
Wed, 28 May 2014 04:46:46 +0000 (21:46 -0700)
This commit moves reflection (as well as the {:?} format modifier) to a new
libdebug crate, all of which is marked experimental.

This is a breaking change because it now requires the debug crate to be
explicitly linked if the :? format qualifier is used. This means that any code
using this feature will have to add `extern crate debug;` to the top of the
crate. Any code relying on reflection will also need to do this.

Closes #12019

[breaking-change]

1  2 
src/doc/guide-pointers.md

index 248142851b70915c043150cfe9f24efa7a1f2967,1ab981384920dc25218c6f1937ebc1011a8ebb47..97dd78234267dd4b06585157a1da53a5ca546c68
@@@ -274,10 -348,10 +276,10 @@@ fn compute_distance(p1: &Point, p2: &Po
  }
  
  fn main() {
 -    let origin =    @Point { x: 0.0, y: 0.0 };
 +    let origin =    &Point { x: 0.0, y: 0.0 };
      let p1     = box Point { x: 5.0, y: 3.0 };
  
-     println!("{:?}", compute_distance(origin, p1));
+     println!("{}", compute_distance(origin, p1));
  }
  ~~~