Skip to content
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
99 changes: 43 additions & 56 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ env_logger = "0.5"
getopts = "0.2"
derive-new = "0.5"
cargo_metadata = "0.6"
rustc-ap-rustc_target = "297.0.0"
rustc-ap-syntax = "297.0.0"
rustc-ap-syntax_pos = "297.0.0"
rustc-ap-rustc_target = "307.0.0"
rustc-ap-syntax = "307.0.0"
rustc-ap-syntax_pos = "307.0.0"
failure = "0.1.1"
bytecount = "0.4"

Expand Down
4 changes: 2 additions & 2 deletions src/closures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ fn rewrite_closure_with_block(

let block = ast::Block {
stmts: vec![ast::Stmt {
id: ast::NodeId::new(0),
id: ast::NodeId::from_u32(0),
node: ast::StmtKind::Expr(ptr::P(body.clone())),
span: body.span,
}],
id: ast::NodeId::new(0),
id: ast::NodeId::from_u32(0),
rules: ast::BlockCheckMode::Default,
span: body.span,
recovered: false,
Expand Down
3 changes: 1 addition & 2 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,6 @@ fn next_space(tok: &Token) -> SpaceState {
| Token::DotDot
| Token::DotDotDot
| Token::DotDotEq
| Token::DotEq
| Token::Question => SpaceState::Punctuation,

Token::ModSep
Expand All @@ -1127,7 +1126,7 @@ pub fn convert_try_mac(mac: &ast::Mac, context: &RewriteContext) -> Option<ast::
let mut parser = new_parser_from_tts(context.parse_session, ts.trees().collect());

Some(ast::Expr {
id: ast::NodeId::new(0), // dummy value
id: ast::NodeId::from_u32(0), // dummy value
node: ast::ExprKind::Try(parser.parse_expr().ok()?),
span: mac.span, // incorrect span, but shouldn't matter too much
attrs: ThinVec::new(),
Expand Down
2 changes: 1 addition & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ where

for segment in iter {
// Indicates a global path, shouldn't be rendered.
if segment.ident.name == keywords::CrateRoot.name() {
if segment.ident.name == keywords::PathRoot.name() {
continue;
}
if first {
Expand Down