Fix compilation and tests after the roll-up

This commit is contained in:
Jakub Bukaj 2014-11-18 00:24:27 +01:00
parent 9673365b37
commit 330a1afae8
3 changed files with 5 additions and 4 deletions

View File

@ -47,6 +47,7 @@
use clone::Clone; use clone::Clone;
use kinds::Sized; use kinds::Sized;
use ops::Deref; use ops::Deref;
use self::Cow::*;
/// A trait for borrowing data. /// A trait for borrowing data.
pub trait BorrowFrom<Sized? Owned> for Sized? { pub trait BorrowFrom<Sized? Owned> for Sized? {

View File

@ -836,7 +836,7 @@ r#"digraph syntax_tree {
#[test] #[test]
fn simple_id_construction() { fn simple_id_construction() {
let id1 = dot::Id::new("hello"); let id1 = Id::new("hello");
match id1 { match id1 {
Ok(_) => {;}, Ok(_) => {;},
Err(_) => panic!("'hello' is not a valid value for id anymore") Err(_) => panic!("'hello' is not a valid value for id anymore")
@ -845,7 +845,7 @@ r#"digraph syntax_tree {
#[test] #[test]
fn badly_formatted_id() { fn badly_formatted_id() {
let id2 = dot::Id::new("Weird { struct : ure } !!!"); let id2 = Id::new("Weird { struct : ure } !!!");
match id2 { match id2 {
Ok(_) => panic!("graphviz id suddenly allows spaces, brackets and stuff"), Ok(_) => panic!("graphviz id suddenly allows spaces, brackets and stuff"),
Err(_) => {;} Err(_) => {;}

View File

@ -79,8 +79,8 @@ impl<'v> Visitor<'v> for Annotator {
} }
} }
fn visit_fn(&mut self, fk: FnKind<'v>, fd: &'v FnDecl, fn visit_fn(&mut self, fk: FnKind<'v>, _: &'v FnDecl,
b: &'v Block, s: Span, _: NodeId) { _: &'v Block, _: Span, _: NodeId) {
match fk { match fk {
FkMethod(_, _, meth) => { FkMethod(_, _, meth) => {
// Methods are not already annotated, so we annotate it // Methods are not already annotated, so we annotate it