]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_parse/lib.rs
syntax: Use `ast::MacArgs` for attributes
[rust.git] / src / librustc_parse / lib.rs
index 3a983404220a4a60fbbd154c1efb4fd23477ef40..3924da5ca67d7bae85ea1227ae3469a23648721b 100644 (file)
@@ -25,6 +25,8 @@
 use parser::{Parser, emit_unclosed_delims, make_unclosed_delims_error};
 pub mod lexer;
 pub mod validate_attr;
+#[macro_use]
+pub mod config;
 
 #[derive(Clone)]
 pub struct Directory<'a> {
@@ -275,7 +277,7 @@ pub fn parse_in_attr<'a, T>(
 ) -> PResult<'a, T> {
     let mut parser = Parser::new(
         sess,
-        attr.get_normal_item().tokens.clone(),
+        attr.get_normal_item().args.outer_tokens(),
         None,
         false,
         false,
@@ -407,7 +409,7 @@ fn prepend_attrs(
             brackets.push(stream);
         }
 
-        brackets.push(item.tokens.clone());
+        brackets.push(item.args.outer_tokens());
 
         // The span we list here for `#` and for `[ ... ]` are both wrong in
         // that it encompasses more than each token, but it hopefully is "good