about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJacherr <jwc2002@outlook.com>2023-11-08 21:17:40 +0000
committerJacherr <jwc2002@outlook.com>2023-11-08 21:17:40 +0000
commit483b109e6e7f741f0827fde46c9263636498b12a (patch)
tree193734e322c1b7e7d3241c0f5336e369cd12e537
parentb6d56c47f9d62a456fc2affaad71f9120c1a8059 (diff)
downloadrust-483b109e6e7f741f0827fde46c9263636498b12a.tar.gz
rust-483b109e6e7f741f0827fde46c9263636498b12a.zip
cargo dev fmt
-rw-r--r--clippy_lints/src/types/vec_box.rs2
-rw-r--r--clippy_utils/src/paths.rs2
-rw-r--r--tests/ui/vec_box_sized.rs6
3 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/types/vec_box.rs b/clippy_lints/src/types/vec_box.rs
index 43f72f1031d..da4392418ca 100644
--- a/clippy_lints/src/types/vec_box.rs
+++ b/clippy_lints/src/types/vec_box.rs
@@ -1,7 +1,7 @@
 use clippy_utils::diagnostics::span_lint_and_sugg;
-use clippy_utils::{last_path_segment, match_def_path};
 use clippy_utils::paths::ALLOCATOR_GLOBAL;
 use clippy_utils::source::snippet;
+use clippy_utils::{last_path_segment, match_def_path};
 use rustc_errors::Applicability;
 use rustc_hir::def_id::DefId;
 use rustc_hir::{self as hir, GenericArg, QPath, TyKind};
diff --git a/clippy_utils/src/paths.rs b/clippy_utils/src/paths.rs
index bde8eb892e9..859bffd6c9c 100644
--- a/clippy_utils/src/paths.rs
+++ b/clippy_utils/src/paths.rs
@@ -99,4 +99,4 @@ pub const OPTION_UNWRAP: [&str; 4] = ["core", "option", "Option", "unwrap"];
 pub const OPTION_EXPECT: [&str; 4] = ["core", "option", "Option", "expect"];
 #[expect(clippy::invalid_paths)] // not sure why it thinks this, it works so
 pub const BOOL_THEN: [&str; 4] = ["core", "bool", "<impl bool>", "then"];
-pub const ALLOCATOR_GLOBAL: [&str; 3] = ["alloc", "alloc", "Global"];
\ No newline at end of file
+pub const ALLOCATOR_GLOBAL: [&str; 3] = ["alloc", "alloc", "Global"];
diff --git a/tests/ui/vec_box_sized.rs b/tests/ui/vec_box_sized.rs
index af471f1eb8d..e46f5bf2126 100644
--- a/tests/ui/vec_box_sized.rs
+++ b/tests/ui/vec_box_sized.rs
@@ -3,7 +3,7 @@
 #![allow(dead_code)]
 #![feature(allocator_api)]
 
-use std::alloc::{Layout, AllocError, Allocator};
+use std::alloc::{AllocError, Allocator, Layout};
 use std::ptr::NonNull;
 
 struct SizedStruct(i32);
@@ -22,7 +22,7 @@ unsafe impl Allocator for DummyAllocator {
 
 /// The following should trigger the lint
 mod should_trigger {
-    use super::{SizedStruct, DummyAllocator};
+    use super::{DummyAllocator, SizedStruct};
     const C: Vec<Box<i32>> = Vec::new();
     static S: Vec<Box<i32>> = Vec::new();
 
@@ -46,7 +46,7 @@ mod should_trigger {
 
 /// The following should not trigger the lint
 mod should_not_trigger {
-    use super::{BigStruct, UnsizedStruct, DummyAllocator};
+    use super::{BigStruct, DummyAllocator, UnsizedStruct};
 
     struct C(Vec<Box<UnsizedStruct>>);
     struct D(Vec<Box<BigStruct>>);