diff options
Diffstat (limited to 'tests')
17 files changed, 26 insertions, 26 deletions
diff --git a/tests/mir-opt/instsimplify/combine_transmutes.rs b/tests/mir-opt/instsimplify/combine_transmutes.rs index 23f10b71f3c..8a670301825 100644 --- a/tests/mir-opt/instsimplify/combine_transmutes.rs +++ b/tests/mir-opt/instsimplify/combine_transmutes.rs @@ -5,7 +5,7 @@ #![feature(custom_mir)] use std::intrinsics::mir::*; -use std::mem::{transmute, ManuallyDrop, MaybeUninit}; +use std::mem::{ManuallyDrop, MaybeUninit, transmute}; // EMIT_MIR combine_transmutes.identity_transmutes.InstSimplify-after-simplifycfg.diff pub unsafe fn identity_transmutes() { diff --git a/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs b/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs index 0a959c3bd88..bcaef33344e 100644 --- a/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs +++ b/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs @@ -1,7 +1,7 @@ #![crate_type = "staticlib"] #![feature(c_variadic)] -use std::ffi::{c_char, c_double, c_int, c_long, c_longlong, CStr, CString, VaList}; +use std::ffi::{CStr, CString, VaList, c_char, c_double, c_int, c_long, c_longlong}; macro_rules! continue_if { ($cond:expr) => { diff --git a/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs index 42d3efa82d6..07d89251aa6 100644 --- a/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs +++ b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs @@ -3,7 +3,7 @@ //! This test triggers a panic in a Rust library that our foreign function invokes. This shows //! that we can unwind through the C code in that library, and catch the underlying panic. -use std::panic::{catch_unwind, AssertUnwindSafe}; +use std::panic::{AssertUnwindSafe, catch_unwind}; fn main() { // Call `add_small_numbers`, passing arguments that will NOT trigger a panic. diff --git a/tests/run-make/c-unwind-abi-catch-panic/main.rs b/tests/run-make/c-unwind-abi-catch-panic/main.rs index 1903be9561c..3c523b6cc69 100644 --- a/tests/run-make/c-unwind-abi-catch-panic/main.rs +++ b/tests/run-make/c-unwind-abi-catch-panic/main.rs @@ -2,7 +2,7 @@ //! //! This test triggers a panic when calling a foreign function that calls *back* into Rust. -use std::panic::{catch_unwind, AssertUnwindSafe}; +use std::panic::{AssertUnwindSafe, catch_unwind}; fn main() { // Call `add_small_numbers`, passing arguments that will NOT trigger a panic. diff --git a/tests/run-make/compiler-builtins/rmake.rs b/tests/run-make/compiler-builtins/rmake.rs index 3b05fe2055c..daa12d2986e 100644 --- a/tests/run-make/compiler-builtins/rmake.rs +++ b/tests/run-make/compiler-builtins/rmake.rs @@ -17,8 +17,8 @@ use std::collections::HashSet; use std::path::PathBuf; -use run_make_support::object::read::archive::ArchiveFile; use run_make_support::object::read::Object; +use run_make_support::object::read::archive::ArchiveFile; use run_make_support::object::{ObjectSection, ObjectSymbol, RelocationTarget}; use run_make_support::rfs::{read, read_dir}; use run_make_support::{cmd, env_var, object}; diff --git a/tests/run-make/compressed-debuginfo-zstd/rmake.rs b/tests/run-make/compressed-debuginfo-zstd/rmake.rs index 8356373e949..cd8cf223047 100644 --- a/tests/run-make/compressed-debuginfo-zstd/rmake.rs +++ b/tests/run-make/compressed-debuginfo-zstd/rmake.rs @@ -8,7 +8,7 @@ //@ only-linux //@ ignore-cross-compile -use run_make_support::{llvm_readobj, run_in_tmpdir, Rustc}; +use run_make_support::{Rustc, llvm_readobj, run_in_tmpdir}; fn check_compression(compression: &str, to_find: &str) { // check compressed debug sections via rustc flag diff --git a/tests/run-make/crate-loading/multiple-dep-versions.rs b/tests/run-make/crate-loading/multiple-dep-versions.rs index 8ef042bf418..113af9c3025 100644 --- a/tests/run-make/crate-loading/multiple-dep-versions.rs +++ b/tests/run-make/crate-loading/multiple-dep-versions.rs @@ -1,7 +1,7 @@ extern crate dep_2_reexport; extern crate dependency; use dep_2_reexport::Type; -use dependency::{do_something, Trait}; +use dependency::{Trait, do_something}; fn main() { do_something(Type); diff --git a/tests/run-make/extern-fn-explicit-align/test.rs b/tests/run-make/extern-fn-explicit-align/test.rs index 81991b5919c..8933a2d07f5 100644 --- a/tests/run-make/extern-fn-explicit-align/test.rs +++ b/tests/run-make/extern-fn-explicit-align/test.rs @@ -1,6 +1,6 @@ // Issue #80127: Passing structs via FFI should work with explicit alignment. -use std::ffi::{c_char, CStr}; +use std::ffi::{CStr, c_char}; use std::ptr::null_mut; #[repr(C)] diff --git a/tests/run-make/foreign-exceptions/foo.rs b/tests/run-make/foreign-exceptions/foo.rs index ccf858d8587..208c5f407e9 100644 --- a/tests/run-make/foreign-exceptions/foo.rs +++ b/tests/run-make/foreign-exceptions/foo.rs @@ -2,7 +2,7 @@ // are caught by catch_unwind. Also tests that Rust panics can unwind through // C++ code. -use std::panic::{catch_unwind, AssertUnwindSafe}; +use std::panic::{AssertUnwindSafe, catch_unwind}; struct DropCheck<'a>(&'a mut bool); impl<'a> Drop for DropCheck<'a> { diff --git a/tests/run-make/naked-symbol-visibility/rmake.rs b/tests/run-make/naked-symbol-visibility/rmake.rs index 07ff253788d..d026196f43b 100644 --- a/tests/run-make/naked-symbol-visibility/rmake.rs +++ b/tests/run-make/naked-symbol-visibility/rmake.rs @@ -1,7 +1,7 @@ //@ ignore-windows //@ only-x86_64 -use run_make_support::object::read::{File, Object, Symbol}; use run_make_support::object::ObjectSymbol; +use run_make_support::object::read::{File, Object, Symbol}; use run_make_support::targets::is_windows; use run_make_support::{dynamic_lib_name, rfs, rustc}; diff --git a/tests/run-make/rustdoc-shared-flags/rmake.rs b/tests/run-make/rustdoc-shared-flags/rmake.rs index d9a16d78a34..4adb5b5a2eb 100644 --- a/tests/run-make/rustdoc-shared-flags/rmake.rs +++ b/tests/run-make/rustdoc-shared-flags/rmake.rs @@ -1,4 +1,4 @@ -use run_make_support::{rustc, rustdoc, Diff}; +use run_make_support::{Diff, rustc, rustdoc}; fn compare_outputs(args: &[&str]) { let rustc_output = rustc().args(args).run().stdout_utf8(); diff --git a/tests/run-make/split-debuginfo/main.rs b/tests/run-make/split-debuginfo/main.rs index e815672fa81..21fa16e40a4 100644 --- a/tests/run-make/split-debuginfo/main.rs +++ b/tests/run-make/split-debuginfo/main.rs @@ -1,6 +1,6 @@ extern crate bar; -use bar::{make_bar, Bar}; +use bar::{Bar, make_bar}; fn main() { let b = make_bar(3); diff --git a/tests/run-make/type-mismatch-same-crate-name/crateA.rs b/tests/run-make/type-mismatch-same-crate-name/crateA.rs index 0dccfbb4bed..7ad8fd2a648 100644 --- a/tests/run-make/type-mismatch-same-crate-name/crateA.rs +++ b/tests/run-make/type-mismatch-same-crate-name/crateA.rs @@ -12,5 +12,5 @@ mod bar { // This makes the publicly accessible path // differ from the internal one. -pub use bar::{bar, Bar}; +pub use bar::{Bar, bar}; pub use foo::Foo; diff --git a/tests/run-make/wasm-export-all-symbols/rmake.rs b/tests/run-make/wasm-export-all-symbols/rmake.rs index 4148cc29ec2..0c0a785c67c 100644 --- a/tests/run-make/wasm-export-all-symbols/rmake.rs +++ b/tests/run-make/wasm-export-all-symbols/rmake.rs @@ -20,16 +20,13 @@ fn test(args: &[&str]) { rustc().input("main.rs").target("wasm32-wasip1").args(args).run(); verify_exports(Path::new("foo.wasm"), &[("foo", Func), ("FOO", Global), ("memory", Memory)]); - verify_exports( - Path::new("main.wasm"), - &[ - ("foo", Func), - ("FOO", Global), - ("_start", Func), - ("__main_void", Func), - ("memory", Memory), - ], - ); + verify_exports(Path::new("main.wasm"), &[ + ("foo", Func), + ("FOO", Global), + ("_start", Func), + ("__main_void", Func), + ("memory", Memory), + ]); } fn verify_exports(path: &Path, exports: &[(&str, wasmparser::ExternalKind)]) { diff --git a/tests/run-pass-valgrind/exit-flushes.rs b/tests/run-pass-valgrind/exit-flushes.rs index c2072cf0bf8..4e25ef76d39 100644 --- a/tests/run-pass-valgrind/exit-flushes.rs +++ b/tests/run-pass-valgrind/exit-flushes.rs @@ -4,7 +4,7 @@ // https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679 use std::env; -use std::process::{exit, Command}; +use std::process::{Command, exit}; fn main() { if env::args().len() > 1 { diff --git a/tests/rustdoc-json/reexport/same_name_different_types.rs b/tests/rustdoc-json/reexport/same_name_different_types.rs index e9bc4a5ac40..760e2c6f775 100644 --- a/tests/rustdoc-json/reexport/same_name_different_types.rs +++ b/tests/rustdoc-json/reexport/same_name_different_types.rs @@ -17,6 +17,6 @@ pub mod nested { //@ ismany "$.index[*].inner[?(@.use.name == 'Bar')].use.id" $foo_fn $foo_struct //@ count "$.index[*].inner[?(@.use.name == 'Foo')]" 2 -pub use nested::Foo; //@ count "$.index[*].inner[?(@.use.name == 'Bar')]" 2 pub use Foo as Bar; +pub use nested::Foo; diff --git a/tests/rustdoc-json/type/inherent_associated_type_bound.rs b/tests/rustdoc-json/type/inherent_associated_type_bound.rs index d0a88b1970f..cb008291b72 100644 --- a/tests/rustdoc-json/type/inherent_associated_type_bound.rs +++ b/tests/rustdoc-json/type/inherent_associated_type_bound.rs @@ -16,5 +16,8 @@ pub struct Carrier<'a>(&'a ()); pub fn user(_: for<'b> fn(Carrier<'b>::Focus<i32>)) {} impl<'a> Carrier<'a> { - pub type Focus<T> = &'a mut T where T: 'a; + pub type Focus<T> + = &'a mut T + where + T: 'a; } |
