Run rustfmt on stable, delete rustfmt.toml (#619)

This commit switches CI to running `rustfmt` on the stable compiler (as
rustfmt is stable now!). Additionally it deletes `rustfmt.toml` to
ensure we're following the same style as the rest of the ecosystem.
This commit is contained in:
Alex Crichton
2018-12-13 17:26:22 -06:00
committed by GitHub
parent 80a3099792
commit 5a45175fe1
34 changed files with 920 additions and 1502 deletions

View File

@@ -18,7 +18,8 @@ fn string(s: &str) -> TokenTree {
#[proc_macro_attribute]
pub fn simd_test(
attr: proc_macro::TokenStream, item: proc_macro::TokenStream,
attr: proc_macro::TokenStream,
item: proc_macro::TokenStream,
) -> proc_macro::TokenStream {
let tokens = TokenStream::from(attr).into_iter().collect::<Vec<_>>();
if tokens.len() != 3 {
@@ -49,16 +50,18 @@ pub fn simd_test(
let item = TokenStream::from(item);
let name = find_name(item.clone());
let name: TokenStream = name.to_string().parse().unwrap_or_else(|_| {
panic!("failed to parse name: {}", name.to_string())
});
let name: TokenStream = name
.to_string()
.parse()
.unwrap_or_else(|_| panic!("failed to parse name: {}", name.to_string()));
let target = env::var("TARGET")
.expect("TARGET environment variable should be set for rustc");
let target = env::var("TARGET").expect("TARGET environment variable should be set for rustc");
let mut force_test = false;
let macro_test = match target.split('-').next().unwrap_or_else(|| {
panic!("target triple contained no \"-\": {}", target)
}) {
let macro_test = match target
.split('-')
.next()
.unwrap_or_else(|| panic!("target triple contained no \"-\": {}", target))
{
"i686" | "x86_64" | "i586" => "is_x86_feature_detected",
"arm" | "armv7" => "is_arm_feature_detected",
"aarch64" => "is_aarch64_feature_detected",