Skip to content

Commit

Permalink
Bump rustc-ap crates
Browse files Browse the repository at this point in the history
This also requires bumping the nightly toolchain version, since the
latest versions of the rustc-ap crates require some new nightly
features.
  • Loading branch information
Aaron1011 authored and calebcartwright committed Apr 28, 2021
1 parent 76ea9bf commit 99797dc
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 55 deletions.
102 changes: 59 additions & 43 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,32 +107,32 @@ lazy_static = "1.0.0"

[dependencies.rustc_ast]
package = "rustc-ap-rustc_ast"
version = "712.0.0"
version = "717.0.0"

[dependencies.rustc_ast_pretty]
package = "rustc-ap-rustc_ast_pretty"
version = "712.0.0"
version = "717.0.0"

[dependencies.rustc_data_structures]
package = "rustc-ap-rustc_data_structures"
version = "712.0.0"
version = "717.0.0"

[dependencies.rustc_errors]
package = "rustc-ap-rustc_errors"
version = "712.0.0"
version = "717.0.0"

[dependencies.rustc_expand]
package = "rustc-ap-rustc_expand"
version = "712.0.0"
version = "717.0.0"

[dependencies.rustc_parse]
package = "rustc-ap-rustc_parse"
version = "712.0.0"
version = "717.0.0"

[dependencies.rustc_session]
package = "rustc-ap-rustc_session"
version = "712.0.0"
version = "717.0.0"

[dependencies.rustc_span]
package = "rustc-ap-rustc_span"
version = "712.0.0"
version = "717.0.0"
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2021-03-26
nightly-2021-04-26
6 changes: 3 additions & 3 deletions src/formatting/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::collections::HashMap;
use std::panic::{catch_unwind, AssertUnwindSafe};

use rustc_ast::token::{BinOpToken, DelimToken, Token, TokenKind};
use rustc_ast::tokenstream::{Cursor, LazyTokenStream, TokenStream, TokenTree};
use rustc_ast::tokenstream::{Cursor, Spacing, TokenStream, TokenTree};
use rustc_ast::{ast, ptr};
use rustc_ast_pretty::pprust;
use rustc_parse::parser::{ForceCollect, Parser};
Expand Down Expand Up @@ -1233,7 +1233,7 @@ pub(crate) fn convert_try_mac(
kind: ast::ExprKind::Try(kind),
span: mac.span(), // incorrect span, but shouldn't matter too much
attrs: ast::AttrVec::new(),
tokens: Some(LazyTokenStream::new(ts)),
tokens: None,
})
} else {
None
Expand Down Expand Up @@ -1284,7 +1284,7 @@ impl MacroParser {
TokenTree::Token(..) => return None,
TokenTree::Delimited(delimited_span, d, _) => (delimited_span.open.lo(), d),
};
let args = tok.joint();
let args = TokenStream::new(vec![(tok, Spacing::Joint)]);
match self.toks.next()? {
TokenTree::Token(Token {
kind: TokenKind::FatArrow,
Expand Down
1 change: 1 addition & 0 deletions src/formatting/modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl<'a> Module<'a> {
}

impl<'a> AstLike for Module<'a> {
const SUPPORTS_CUSTOM_INNER_ATTRS: bool = true;
fn attrs(&self) -> &[ast::Attribute] {
&self.inner_attr
}
Expand Down

0 comments on commit 99797dc

Please sign in to comment.