Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

update to rustc 1.17.0-nightly (485358400 2017-03-18) #132

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use syntax::ext::expand;
use syntax::ext::quote::rt::ToTokens;
use syntax::parse::ParseSess;
use syntax::ptr::P;
use syntax::tokenstream::TokenTree;
use syntax::tokenstream::{TokenTree, TokenStream};

use expr::ExprBuilder;
use invoke::{Invoke, Identity};
Expand Down Expand Up @@ -107,7 +107,7 @@ impl<F> MacPathBuilder<F>
pub fn build(self) -> F::Result {
let mac = ast::Mac_ {
path: self.path,
tts: self.tokens,
tts: TokenStream::concat(self.tokens.into_iter().map(|x| TokenStream::from(x)).collect()).into()
};
self.callback.invoke(respan(self.span, mac))
}
Expand Down
2 changes: 2 additions & 0 deletions src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ impl<F> PathSegmentBuilder<F>
self.callback.invoke(ast::PathSegment {
identifier: self.id,
parameters: parameters,
span: self.span,
})
}

Expand All @@ -324,6 +325,7 @@ impl<F> PathSegmentBuilder<F>
self.callback.invoke(ast::PathSegment {
identifier: self.id,
parameters: parameters,
span: self.span,
})
}
}
Expand Down
11 changes: 11 additions & 0 deletions tests/test_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fn test_id() {
ast::PathSegment {
identifier: builder.id("isize"),
parameters: None,
span: DUMMY_SP,
},
]
}
Expand All @@ -38,6 +39,7 @@ fn test_single_segment() {
ast::PathSegment {
identifier: builder.id("isize"),
parameters: None,
span: DUMMY_SP,
},
]
}
Expand All @@ -62,14 +64,17 @@ fn test_multiple_segments() {
ast::PathSegment {
identifier: builder.id("std"),
parameters: None,
span: DUMMY_SP,
},
ast::PathSegment {
identifier: builder.id("thread"),
parameters: None,
span: DUMMY_SP,
},
ast::PathSegment {
identifier: builder.id("Thread"),
parameters: None,
span: DUMMY_SP,
},
]
}
Expand All @@ -96,10 +101,12 @@ fn test_option() {
ast::PathSegment {
identifier: builder.id("std"),
parameters: None,
span: DUMMY_SP,
},
ast::PathSegment {
identifier: builder.id("option"),
parameters: None,
span: DUMMY_SP,
},
ast::PathSegment {
identifier: builder.id("Option"),
Expand All @@ -110,6 +117,7 @@ fn test_option() {
],
bindings: vec![],
}))),
span: DUMMY_SP,
},
]
}
Expand Down Expand Up @@ -139,6 +147,7 @@ fn test_lifetimes() {
types: vec![],
bindings: vec![],
}))),
span: DUMMY_SP,
},
]
}
Expand All @@ -164,6 +173,7 @@ fn test_parenthesized_no_return() {
output: None,
}
))),
span: DUMMY_SP,
},
]
}
Expand All @@ -189,6 +199,7 @@ fn test_parenthesized_with_return() {
output: Some(builder.ty().u32()),
}
))),
span: DUMMY_SP,
},
]
}
Expand Down