Remove various feature flags
This commit is contained in:
parent
3d07646858
commit
613dfcc521
@ -243,7 +243,7 @@ macro_rules! create_config {
|
||||
if !err.is_empty() {
|
||||
eprint!("{}", err);
|
||||
}
|
||||
Ok(Config::default().fill_from_parsed_config(parsed_config, dir: &Path))
|
||||
Ok(Config::default().fill_from_parsed_config(parsed_config, dir))
|
||||
}
|
||||
Err(e) => {
|
||||
err.push_str("Error: Decoding config file failed:\n");
|
||||
|
@ -925,19 +925,23 @@ mod test {
|
||||
parser.parse_in_list()
|
||||
}
|
||||
|
||||
macro parse_use_trees($($s:expr),* $(,)*) {
|
||||
vec![
|
||||
$(parse_use_tree($s),)*
|
||||
]
|
||||
macro_rules! parse_use_trees {
|
||||
($($s:expr),* $(,)*) => {
|
||||
vec![
|
||||
$(parse_use_tree($s),)*
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_use_tree_merge() {
|
||||
macro test_merge([$($input:expr),* $(,)*], [$($output:expr),* $(,)*]) {
|
||||
assert_eq!(
|
||||
merge_use_trees(parse_use_trees!($($input,)*)),
|
||||
parse_use_trees!($($output,)*),
|
||||
);
|
||||
macro_rules! test_merge {
|
||||
([$($input:expr),* $(,)*], [$($output:expr),* $(,)*]) => {
|
||||
assert_eq!(
|
||||
merge_use_trees(parse_use_trees!($($input,)*)),
|
||||
parse_use_trees!($($output,)*),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
test_merge!(["a::b::{c, d}", "a::b::{e, f}"], ["a::b::{c, d, e, f}"]);
|
||||
|
@ -8,10 +8,6 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(decl_macro)]
|
||||
#![allow(unused_attributes)]
|
||||
#![feature(type_ascription)]
|
||||
#![feature(unicode_internals)]
|
||||
#![feature(nll)]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -867,7 +867,8 @@ impl MacroArgParser {
|
||||
|
||||
/// Returns a collection of parsed macro def's arguments.
|
||||
pub fn parse(mut self, tokens: ThinTokenStream) -> Option<Vec<ParsedMacroArg>> {
|
||||
let mut iter = (tokens.into(): TokenStream).trees();
|
||||
let stream: TokenStream = tokens.into();
|
||||
let mut iter = stream.trees();
|
||||
|
||||
while let Some(ref tok) = iter.next() {
|
||||
match tok {
|
||||
@ -1398,21 +1399,23 @@ fn format_lazy_static(context: &RewriteContext, shape: Shape, ts: &TokenStream)
|
||||
result.push_str("lazy_static! {");
|
||||
result.push_str(&nested_shape.indent.to_string_with_newline(context.config));
|
||||
|
||||
macro parse_or($method:ident $(,)* $($arg:expr),* $(,)*) {
|
||||
match parser.$method($($arg,)*) {
|
||||
Ok(val) => {
|
||||
if parser.sess.span_diagnostic.has_errors() {
|
||||
macro_rules! parse_or {
|
||||
($method:ident $(,)* $($arg:expr),* $(,)*) => {
|
||||
match parser.$method($($arg,)*) {
|
||||
Ok(val) => {
|
||||
if parser.sess.span_diagnostic.has_errors() {
|
||||
parser.sess.span_diagnostic.reset_err_count();
|
||||
return None;
|
||||
} else {
|
||||
val
|
||||
}
|
||||
}
|
||||
Err(mut err) => {
|
||||
err.cancel();
|
||||
parser.sess.span_diagnostic.reset_err_count();
|
||||
return None;
|
||||
} else {
|
||||
val
|
||||
}
|
||||
}
|
||||
Err(mut err) => {
|
||||
err.cancel();
|
||||
parser.sess.span_diagnostic.reset_err_count();
|
||||
return None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ impl<'a, T: 'a + IntoOverflowableItem<'a>> IntoOverflowableItem<'a> for ptr::P<T
|
||||
}
|
||||
}
|
||||
|
||||
macro impl_into_overflowable_item_for_ast_node {
|
||||
macro_rules! impl_into_overflowable_item_for_ast_node {
|
||||
($($ast_node:ident),*) => {
|
||||
$(
|
||||
impl<'a> IntoOverflowableItem<'a> for ast::$ast_node {
|
||||
@ -212,7 +212,7 @@ macro impl_into_overflowable_item_for_ast_node {
|
||||
}
|
||||
}
|
||||
|
||||
macro impl_into_overflowable_item_for_rustfmt_types {
|
||||
macro_rules! impl_into_overflowable_item_for_rustfmt_types {
|
||||
([$($ty:ident),*], [$($ty_with_lifetime:ident),*]) => {
|
||||
$(
|
||||
impl<'a> IntoOverflowableItem<'a> for $ty {
|
||||
|
Loading…
x
Reference in New Issue
Block a user