Skip to content

Commit 483b109

Browse files
committed
cargo dev fmt
1 parent b6d56c4 commit 483b109

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clippy_lints/src/types/vec_box.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use clippy_utils::diagnostics::span_lint_and_sugg;
2-
use clippy_utils::{last_path_segment, match_def_path};
32
use clippy_utils::paths::ALLOCATOR_GLOBAL;
43
use clippy_utils::source::snippet;
4+
use clippy_utils::{last_path_segment, match_def_path};
55
use rustc_errors::Applicability;
66
use rustc_hir::def_id::DefId;
77
use rustc_hir::{self as hir, GenericArg, QPath, TyKind};

clippy_utils/src/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ pub const OPTION_UNWRAP: [&str; 4] = ["core", "option", "Option", "unwrap"];
9999
pub const OPTION_EXPECT: [&str; 4] = ["core", "option", "Option", "expect"];
100100
#[expect(clippy::invalid_paths)] // not sure why it thinks this, it works so
101101
pub const BOOL_THEN: [&str; 4] = ["core", "bool", "<impl bool>", "then"];
102-
pub const ALLOCATOR_GLOBAL: [&str; 3] = ["alloc", "alloc", "Global"];
102+
pub const ALLOCATOR_GLOBAL: [&str; 3] = ["alloc", "alloc", "Global"];

tests/ui/vec_box_sized.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#![allow(dead_code)]
44
#![feature(allocator_api)]
55

6-
use std::alloc::{Layout, AllocError, Allocator};
6+
use std::alloc::{AllocError, Allocator, Layout};
77
use std::ptr::NonNull;
88

99
struct SizedStruct(i32);
@@ -22,7 +22,7 @@ unsafe impl Allocator for DummyAllocator {
2222

2323
/// The following should trigger the lint
2424
mod should_trigger {
25-
use super::{SizedStruct, DummyAllocator};
25+
use super::{DummyAllocator, SizedStruct};
2626
const C: Vec<Box<i32>> = Vec::new();
2727
static S: Vec<Box<i32>> = Vec::new();
2828

@@ -46,7 +46,7 @@ mod should_trigger {
4646

4747
/// The following should not trigger the lint
4848
mod should_not_trigger {
49-
use super::{BigStruct, UnsizedStruct, DummyAllocator};
49+
use super::{BigStruct, DummyAllocator, UnsizedStruct};
5050

5151
struct C(Vec<Box<UnsizedStruct>>);
5252
struct D(Vec<Box<BigStruct>>);

0 commit comments

Comments
 (0)