diff options
Diffstat (limited to '')
4 files changed, 31 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-3585/extern_crate.rs b/src/tools/rustfmt/tests/target/issue-3585/extern_crate.rs new file mode 100644 index 000000000..dc7c9e024 --- /dev/null +++ b/src/tools/rustfmt/tests/target/issue-3585/extern_crate.rs @@ -0,0 +1,10 @@ +// rustfmt-inline_attribute_width: 100 + +#[macro_use] extern crate static_assertions; + +#[cfg(unix)] extern crate static_assertions; + +// a comment before the attribute +#[macro_use] +// some comment after +extern crate static_assertions; diff --git a/src/tools/rustfmt/tests/target/issue-3585/reorder_imports_disabled.rs b/src/tools/rustfmt/tests/target/issue-3585/reorder_imports_disabled.rs new file mode 100644 index 000000000..f9637729b --- /dev/null +++ b/src/tools/rustfmt/tests/target/issue-3585/reorder_imports_disabled.rs @@ -0,0 +1,8 @@ +// rustfmt-inline_attribute_width: 100 +// rustfmt-reorder_imports: false + +#[cfg(unix)] extern crate crateb; +#[cfg(unix)] extern crate cratea; + +#[cfg(unix)] use crateb; +#[cfg(unix)] use cratea; diff --git a/src/tools/rustfmt/tests/target/issue-3585/reorder_imports_enabled.rs b/src/tools/rustfmt/tests/target/issue-3585/reorder_imports_enabled.rs new file mode 100644 index 000000000..d040d0ed3 --- /dev/null +++ b/src/tools/rustfmt/tests/target/issue-3585/reorder_imports_enabled.rs @@ -0,0 +1,8 @@ +// rustfmt-inline_attribute_width: 100 +// rustfmt-reorder_imports: true + +#[cfg(unix)] extern crate cratea; +#[cfg(unix)] extern crate crateb; + +#[cfg(unix)] use cratea; +#[cfg(unix)] use crateb; diff --git a/src/tools/rustfmt/tests/target/issue-3585/use.rs b/src/tools/rustfmt/tests/target/issue-3585/use.rs new file mode 100644 index 000000000..c76a9eaac --- /dev/null +++ b/src/tools/rustfmt/tests/target/issue-3585/use.rs @@ -0,0 +1,5 @@ +// rustfmt-inline_attribute_width: 100 + +#[macro_use] use static_assertions; + +#[cfg(unix)] use static_assertions; |