]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/clippy_lints/src/utils/paths.rs
ca2c4ade15565bc0d45c1e3c607fb0c883a4b788
[rust.git] / src / tools / clippy / clippy_lints / src / utils / paths.rs
1 //! This module contains paths to types and functions Clippy needs to know
2 //! about.
3 //!
4 //! Whenever possible, please consider diagnostic items over hardcoded paths.
5 //! See <https://github.com/rust-lang/rust-clippy/issues/5393> for more information.
6
7 pub const ANY_TRAIT: [&str; 3] = ["std", "any", "Any"];
8 pub const ARC_PTR_EQ: [&str; 4] = ["alloc", "sync", "Arc", "ptr_eq"];
9 pub const ASMUT_TRAIT: [&str; 3] = ["core", "convert", "AsMut"];
10 pub const ASREF_TRAIT: [&str; 3] = ["core", "convert", "AsRef"];
11 pub const BEGIN_PANIC: [&str; 3] = ["std", "panicking", "begin_panic"];
12 pub const BEGIN_PANIC_FMT: [&str; 3] = ["std", "panicking", "begin_panic_fmt"];
13 pub const BINARY_HEAP: [&str; 4] = ["alloc", "collections", "binary_heap", "BinaryHeap"];
14 pub const BORROW_TRAIT: [&str; 3] = ["core", "borrow", "Borrow"];
15 pub const BOX: [&str; 3] = ["alloc", "boxed", "Box"];
16 pub const BTREEMAP: [&str; 5] = ["alloc", "collections", "btree", "map", "BTreeMap"];
17 pub const BTREEMAP_ENTRY: [&str; 5] = ["alloc", "collections", "btree", "map", "Entry"];
18 pub const BTREESET: [&str; 5] = ["alloc", "collections", "btree", "set", "BTreeSet"];
19 pub const CLONE_TRAIT: [&str; 3] = ["core", "clone", "Clone"];
20 pub const CLONE_TRAIT_METHOD: [&str; 4] = ["core", "clone", "Clone", "clone"];
21 pub const CMP_MAX: [&str; 3] = ["core", "cmp", "max"];
22 pub const CMP_MIN: [&str; 3] = ["core", "cmp", "min"];
23 pub const COW: [&str; 3] = ["alloc", "borrow", "Cow"];
24 pub const CSTRING: [&str; 4] = ["std", "ffi", "c_str", "CString"];
25 pub const CSTRING_AS_C_STR: [&str; 5] = ["std", "ffi", "c_str", "CString", "as_c_str"];
26 pub const DEFAULT_TRAIT: [&str; 3] = ["core", "default", "Default"];
27 pub const DEFAULT_TRAIT_METHOD: [&str; 4] = ["core", "default", "Default", "default"];
28 pub const DEREF_MUT_TRAIT_METHOD: [&str; 5] = ["core", "ops", "deref", "DerefMut", "deref_mut"];
29 pub const DEREF_TRAIT_METHOD: [&str; 5] = ["core", "ops", "deref", "Deref", "deref"];
30 pub const DISPLAY_FMT_METHOD: [&str; 4] = ["core", "fmt", "Display", "fmt"];
31 pub const DISPLAY_TRAIT: [&str; 3] = ["core", "fmt", "Display"];
32 pub const DOUBLE_ENDED_ITERATOR: [&str; 4] = ["core", "iter", "traits", "DoubleEndedIterator"];
33 pub const DROP: [&str; 3] = ["core", "mem", "drop"];
34 pub const DROP_TRAIT: [&str; 4] = ["core", "ops", "drop", "Drop"];
35 pub const DURATION: [&str; 3] = ["core", "time", "Duration"];
36 pub const EARLY_CONTEXT: [&str; 4] = ["rustc", "lint", "context", "EarlyContext"];
37 pub const EXIT: [&str; 3] = ["std", "process", "exit"];
38 pub const FILE: [&str; 3] = ["std", "fs", "File"];
39 pub const FILE_TYPE: [&str; 3] = ["std", "fs", "FileType"];
40 pub const FMT_ARGUMENTS_NEW_V1: [&str; 4] = ["core", "fmt", "Arguments", "new_v1"];
41 pub const FMT_ARGUMENTS_NEW_V1_FORMATTED: [&str; 4] = ["core", "fmt", "Arguments", "new_v1_formatted"];
42 pub const FMT_ARGUMENTV1_NEW: [&str; 4] = ["core", "fmt", "ArgumentV1", "new"];
43 pub const FROM_FROM: [&str; 4] = ["core", "convert", "From", "from"];
44 pub const FROM_TRAIT: [&str; 3] = ["core", "convert", "From"];
45 pub const HASH: [&str; 2] = ["hash", "Hash"];
46 pub const HASHMAP: [&str; 5] = ["std", "collections", "hash", "map", "HashMap"];
47 pub const HASHMAP_ENTRY: [&str; 5] = ["std", "collections", "hash", "map", "Entry"];
48 pub const HASHSET: [&str; 5] = ["std", "collections", "hash", "set", "HashSet"];
49 pub const INDEX: [&str; 3] = ["core", "ops", "Index"];
50 pub const INDEX_MUT: [&str; 3] = ["core", "ops", "IndexMut"];
51 pub const INTO: [&str; 3] = ["core", "convert", "Into"];
52 pub const INTO_ITERATOR: [&str; 5] = ["core", "iter", "traits", "collect", "IntoIterator"];
53 pub const IO_READ: [&str; 3] = ["std", "io", "Read"];
54 pub const IO_WRITE: [&str; 3] = ["std", "io", "Write"];
55 pub const ITERATOR: [&str; 5] = ["core", "iter", "traits", "iterator", "Iterator"];
56 pub const LATE_CONTEXT: [&str; 4] = ["rustc", "lint", "context", "LateContext"];
57 pub const LINKED_LIST: [&str; 4] = ["alloc", "collections", "linked_list", "LinkedList"];
58 pub const LINT: [&str; 3] = ["rustc_session", "lint", "Lint"];
59 pub const MEM_DISCRIMINANT: [&str; 3] = ["core", "mem", "discriminant"];
60 pub const MEM_FORGET: [&str; 3] = ["core", "mem", "forget"];
61 pub const MEM_MAYBEUNINIT: [&str; 4] = ["core", "mem", "maybe_uninit", "MaybeUninit"];
62 pub const MEM_MAYBEUNINIT_UNINIT: [&str; 5] = ["core", "mem", "maybe_uninit", "MaybeUninit", "uninit"];
63 pub const MEM_REPLACE: [&str; 3] = ["core", "mem", "replace"];
64 pub const MUTEX_GUARD: [&str; 4] = ["std", "sync", "mutex", "MutexGuard"];
65 pub const OPEN_OPTIONS: [&str; 3] = ["std", "fs", "OpenOptions"];
66 pub const OPS_MODULE: [&str; 2] = ["core", "ops"];
67 pub const OPTION: [&str; 3] = ["core", "option", "Option"];
68 pub const OPTION_NONE: [&str; 4] = ["core", "option", "Option", "None"];
69 pub const OPTION_SOME: [&str; 4] = ["core", "option", "Option", "Some"];
70 pub const ORD: [&str; 3] = ["core", "cmp", "Ord"];
71 pub const OS_STRING: [&str; 4] = ["std", "ffi", "os_str", "OsString"];
72 pub const OS_STRING_AS_OS_STR: [&str; 5] = ["std", "ffi", "os_str", "OsString", "as_os_str"];
73 pub const OS_STR_TO_OS_STRING: [&str; 5] = ["std", "ffi", "os_str", "OsStr", "to_os_string"];
74 pub const PARKING_LOT_MUTEX_GUARD: [&str; 2] = ["parking_lot", "MutexGuard"];
75 pub const PARKING_LOT_RWLOCK_READ_GUARD: [&str; 2] = ["parking_lot", "RwLockReadGuard"];
76 pub const PARKING_LOT_RWLOCK_WRITE_GUARD: [&str; 2] = ["parking_lot", "RwLockWriteGuard"];
77 pub const PATH: [&str; 3] = ["std", "path", "Path"];
78 pub const PATH_BUF: [&str; 3] = ["std", "path", "PathBuf"];
79 pub const PATH_BUF_AS_PATH: [&str; 4] = ["std", "path", "PathBuf", "as_path"];
80 pub const PATH_TO_PATH_BUF: [&str; 4] = ["std", "path", "Path", "to_path_buf"];
81 pub const PTR_EQ: [&str; 3] = ["core", "ptr", "eq"];
82 pub const PTR_NULL: [&str; 2] = ["ptr", "null"];
83 pub const PTR_NULL_MUT: [&str; 2] = ["ptr", "null_mut"];
84 pub const RANGE: [&str; 3] = ["core", "ops", "Range"];
85 pub const RANGE_ARGUMENT_TRAIT: [&str; 3] = ["core", "ops", "RangeBounds"];
86 pub const RANGE_FROM: [&str; 3] = ["core", "ops", "RangeFrom"];
87 pub const RANGE_FROM_STD: [&str; 3] = ["std", "ops", "RangeFrom"];
88 pub const RANGE_FULL: [&str; 3] = ["core", "ops", "RangeFull"];
89 pub const RANGE_FULL_STD: [&str; 3] = ["std", "ops", "RangeFull"];
90 pub const RANGE_INCLUSIVE_NEW: [&str; 4] = ["core", "ops", "RangeInclusive", "new"];
91 pub const RANGE_INCLUSIVE_STD_NEW: [&str; 4] = ["std", "ops", "RangeInclusive", "new"];
92 pub const RANGE_STD: [&str; 3] = ["std", "ops", "Range"];
93 pub const RANGE_TO: [&str; 3] = ["core", "ops", "RangeTo"];
94 pub const RANGE_TO_INCLUSIVE: [&str; 3] = ["core", "ops", "RangeToInclusive"];
95 pub const RANGE_TO_INCLUSIVE_STD: [&str; 3] = ["std", "ops", "RangeToInclusive"];
96 pub const RANGE_TO_STD: [&str; 3] = ["std", "ops", "RangeTo"];
97 pub const RC: [&str; 3] = ["alloc", "rc", "Rc"];
98 pub const RC_PTR_EQ: [&str; 4] = ["alloc", "rc", "Rc", "ptr_eq"];
99 pub const RECEIVER: [&str; 4] = ["std", "sync", "mpsc", "Receiver"];
100 pub const REGEX: [&str; 3] = ["regex", "re_unicode", "Regex"];
101 pub const REGEX_BUILDER_NEW: [&str; 5] = ["regex", "re_builder", "unicode", "RegexBuilder", "new"];
102 pub const REGEX_BYTES_BUILDER_NEW: [&str; 5] = ["regex", "re_builder", "bytes", "RegexBuilder", "new"];
103 pub const REGEX_BYTES_NEW: [&str; 4] = ["regex", "re_bytes", "Regex", "new"];
104 pub const REGEX_BYTES_SET_NEW: [&str; 5] = ["regex", "re_set", "bytes", "RegexSet", "new"];
105 pub const REGEX_NEW: [&str; 4] = ["regex", "re_unicode", "Regex", "new"];
106 pub const REGEX_SET_NEW: [&str; 5] = ["regex", "re_set", "unicode", "RegexSet", "new"];
107 pub const REPEAT: [&str; 3] = ["core", "iter", "repeat"];
108 pub const RESULT: [&str; 3] = ["core", "result", "Result"];
109 pub const RESULT_ERR: [&str; 4] = ["core", "result", "Result", "Err"];
110 pub const RESULT_OK: [&str; 4] = ["core", "result", "Result", "Ok"];
111 pub const RWLOCK_READ_GUARD: [&str; 4] = ["std", "sync", "rwlock", "RwLockReadGuard"];
112 pub const RWLOCK_WRITE_GUARD: [&str; 4] = ["std", "sync", "rwlock", "RwLockWriteGuard"];
113 pub const SERDE_DESERIALIZE: [&str; 2] = ["_serde", "Deserialize"];
114 pub const SERDE_DE_VISITOR: [&str; 3] = ["serde", "de", "Visitor"];
115 pub const SLICE_INTO_VEC: [&str; 4] = ["alloc", "slice", "<impl [T]>", "into_vec"];
116 pub const SLICE_ITER: [&str; 3] = ["core", "slice", "Iter"];
117 pub const STDERR: [&str; 4] = ["std", "io", "stdio", "stderr"];
118 pub const STDOUT: [&str; 4] = ["std", "io", "stdio", "stdout"];
119 pub const STD_CONVERT_IDENTITY: [&str; 3] = ["std", "convert", "identity"];
120 pub const STD_MEM_TRANSMUTE: [&str; 3] = ["std", "mem", "transmute"];
121 pub const STD_PTR_NULL: [&str; 3] = ["std", "ptr", "null"];
122 pub const STRING_AS_MUT_STR: [&str; 4] = ["alloc", "string", "String", "as_mut_str"];
123 pub const STRING_AS_STR: [&str; 4] = ["alloc", "string", "String", "as_str"];
124 pub const SYNTAX_CONTEXT: [&str; 3] = ["rustc_span", "hygiene", "SyntaxContext"];
125 pub const TO_OWNED: [&str; 3] = ["alloc", "borrow", "ToOwned"];
126 pub const TO_OWNED_METHOD: [&str; 4] = ["alloc", "borrow", "ToOwned", "to_owned"];
127 pub const TO_STRING: [&str; 3] = ["alloc", "string", "ToString"];
128 pub const TO_STRING_METHOD: [&str; 4] = ["alloc", "string", "ToString", "to_string"];
129 pub const TRANSMUTE: [&str; 4] = ["core", "intrinsics", "", "transmute"];
130 pub const TRY_FROM_ERROR: [&str; 4] = ["std", "ops", "Try", "from_error"];
131 pub const TRY_INTO_RESULT: [&str; 4] = ["std", "ops", "Try", "into_result"];
132 pub const VEC: [&str; 3] = ["alloc", "vec", "Vec"];
133 pub const VEC_AS_MUT_SLICE: [&str; 4] = ["alloc", "vec", "Vec", "as_mut_slice"];
134 pub const VEC_AS_SLICE: [&str; 4] = ["alloc", "vec", "Vec", "as_slice"];
135 pub const VEC_DEQUE: [&str; 4] = ["alloc", "collections", "vec_deque", "VecDeque"];
136 pub const VEC_FROM_ELEM: [&str; 3] = ["alloc", "vec", "from_elem"];
137 pub const VEC_NEW: [&str; 4] = ["alloc", "vec", "Vec", "new"];
138 pub const WEAK_ARC: [&str; 3] = ["alloc", "sync", "Weak"];
139 pub const WEAK_RC: [&str; 3] = ["alloc", "rc", "Weak"];