]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui-internal/unnecessary_def_path.stderr
Rollup merge of #105768 - fee1-dead-contrib:iat-style, r=eholk
[rust.git] / src / tools / clippy / tests / ui-internal / unnecessary_def_path.stderr
1 error: use of a def path to a diagnostic item
2   --> $DIR/unnecessary_def_path.rs:37:13
3    |
4 LL |     let _ = match_type(cx, ty, &OPTION);
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
6    |
7 note: the lint level is defined here
8   --> $DIR/unnecessary_def_path.rs:3:9
9    |
10 LL | #![deny(clippy::internal)]
11    |         ^^^^^^^^^^^^^^^^
12    = note: `#[deny(clippy::unnecessary_def_path)]` implied by `#[deny(clippy::internal)]`
13
14 error: use of a def path to a diagnostic item
15   --> $DIR/unnecessary_def_path.rs:38:13
16    |
17 LL |     let _ = match_type(cx, ty, RESULT);
18    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
19
20 error: use of a def path to a diagnostic item
21   --> $DIR/unnecessary_def_path.rs:39:13
22    |
23 LL |     let _ = match_type(cx, ty, &["core", "result", "Result"]);
24    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
25
26 error: use of a def path to a diagnostic item
27   --> $DIR/unnecessary_def_path.rs:43:13
28    |
29 LL |     let _ = clippy_utils::ty::match_type(cx, ty, rc_path);
30    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Rc)`
31
32 error: use of a def path to a diagnostic item
33   --> $DIR/unnecessary_def_path.rs:45:13
34    |
35 LL |     let _ = match_type(cx, ty, &paths::OPTION);
36    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
37
38 error: use of a def path to a diagnostic item
39   --> $DIR/unnecessary_def_path.rs:46:13
40    |
41 LL |     let _ = match_type(cx, ty, paths::RESULT);
42    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
43
44 error: use of a def path to a `LangItem`
45   --> $DIR/unnecessary_def_path.rs:48:13
46    |
47 LL |     let _ = match_type(cx, ty, &["alloc", "boxed", "Box"]);
48    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_lang_item(cx, ty, LangItem::OwnedBox)`
49
50 error: use of a def path to a diagnostic item
51   --> $DIR/unnecessary_def_path.rs:49:13
52    |
53 LL |     let _ = match_type(cx, ty, &["core", "mem", "maybe_uninit", "MaybeUninit", "uninit"]);
54    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::maybe_uninit_uninit)`
55
56 error: use of a def path to a `LangItem`
57   --> $DIR/unnecessary_def_path.rs:51:13
58    |
59 LL |     let _ = match_def_path(cx, did, &["alloc", "boxed", "Box"]);
60    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OwnedBox) == Some(did)`
61
62 error: use of a def path to a diagnostic item
63   --> $DIR/unnecessary_def_path.rs:52:13
64    |
65 LL |     let _ = match_def_path(cx, did, &["core", "option", "Option"]);
66    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.is_diagnostic_item(sym::Option, did)`
67
68 error: use of a def path to a `LangItem`
69   --> $DIR/unnecessary_def_path.rs:53:13
70    |
71 LL |     let _ = match_def_path(cx, did, &["core", "option", "Option", "Some"]);
72    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OptionSome) == Some(did)`
73    |
74    = help: if this `DefId` came from a constructor expression or pattern then the parent `DefId` should be used instead
75
76 error: use of a def path to a diagnostic item
77   --> $DIR/unnecessary_def_path.rs:55:13
78    |
79 LL |     let _ = match_trait_method(cx, expr, &["core", "convert", "AsRef"]);
80    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_trait_method(cx, expr, sym::AsRef)`
81
82 error: use of a def path to a diagnostic item
83   --> $DIR/unnecessary_def_path.rs:57:13
84    |
85 LL |     let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option"]);
86    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_path_diagnostic_item(cx, expr, sym::Option)`
87
88 error: use of a def path to a `LangItem`
89   --> $DIR/unnecessary_def_path.rs:58:13
90    |
91 LL |     let _ = is_expr_path_def_path(cx, expr, &["core", "iter", "traits", "Iterator", "next"]);
92    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `path_res(cx, expr).opt_def_id().map_or(false, |id| cx.tcx.lang_items().get(LangItem::IteratorNext) == Some(id))`
93
94 error: use of a def path to a `LangItem`
95   --> $DIR/unnecessary_def_path.rs:59:13
96    |
97 LL |     let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option", "Some"]);
98    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_res_lang_ctor(cx, path_res(cx, expr), LangItem::OptionSome)`
99
100 error: aborting due to 15 previous errors
101