11error: use of a def path to a diagnostic item
2- --> $DIR/unnecessary_def_path.rs:36 :13
2+ --> $DIR/unnecessary_def_path.rs:37 :13
33 |
44LL | let _ = match_type(cx, ty, &OPTION);
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
@@ -12,87 +12,87 @@ LL | #![deny(clippy::internal)]
1212 = note: `#[deny(clippy::unnecessary_def_path)]` implied by `#[deny(clippy::internal)]`
1313
1414error: use of a def path to a diagnostic item
15- --> $DIR/unnecessary_def_path.rs:37 :13
15+ --> $DIR/unnecessary_def_path.rs:38 :13
1616 |
1717LL | let _ = match_type(cx, ty, RESULT);
1818 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
1919
2020error: use of a def path to a diagnostic item
21- --> $DIR/unnecessary_def_path.rs:38 :13
21+ --> $DIR/unnecessary_def_path.rs:39 :13
2222 |
2323LL | let _ = match_type(cx, ty, &["core", "result", "Result"]);
2424 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
2525
2626error: use of a def path to a diagnostic item
27- --> $DIR/unnecessary_def_path.rs:42 :13
27+ --> $DIR/unnecessary_def_path.rs:43 :13
2828 |
2929LL | let _ = clippy_utils::ty::match_type(cx, ty, rc_path);
3030 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Rc)`
3131
3232error: use of a def path to a diagnostic item
33- --> $DIR/unnecessary_def_path.rs:44 :13
33+ --> $DIR/unnecessary_def_path.rs:45 :13
3434 |
3535LL | let _ = match_type(cx, ty, &paths::OPTION);
3636 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
3737
3838error: use of a def path to a diagnostic item
39- --> $DIR/unnecessary_def_path.rs:45 :13
39+ --> $DIR/unnecessary_def_path.rs:46 :13
4040 |
4141LL | let _ = match_type(cx, ty, paths::RESULT);
4242 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
4343
4444error: use of a def path to a `LangItem`
45- --> $DIR/unnecessary_def_path.rs:47 :13
45+ --> $DIR/unnecessary_def_path.rs:48 :13
4646 |
4747LL | let _ = match_type(cx, ty, &["alloc", "boxed", "Box"]);
4848 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_lang_item(cx, ty, LangItem::OwnedBox)`
4949
5050error: use of a def path to a diagnostic item
51- --> $DIR/unnecessary_def_path.rs:48 :13
51+ --> $DIR/unnecessary_def_path.rs:49 :13
5252 |
5353LL | let _ = match_type(cx, ty, &["core", "mem", "maybe_uninit", "MaybeUninit", "uninit"]);
5454 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::maybe_uninit_uninit)`
5555
5656error: use of a def path to a `LangItem`
57- --> $DIR/unnecessary_def_path.rs:50 :13
57+ --> $DIR/unnecessary_def_path.rs:51 :13
5858 |
5959LL | let _ = match_def_path(cx, did, &["alloc", "boxed", "Box"]);
6060 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OwnedBox) == Some(did)`
6161
6262error: use of a def path to a diagnostic item
63- --> $DIR/unnecessary_def_path.rs:51 :13
63+ --> $DIR/unnecessary_def_path.rs:52 :13
6464 |
6565LL | let _ = match_def_path(cx, did, &["core", "option", "Option"]);
6666 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.is_diagnostic_item(sym::Option, did)`
6767
6868error: use of a def path to a `LangItem`
69- --> $DIR/unnecessary_def_path.rs:52 :13
69+ --> $DIR/unnecessary_def_path.rs:53 :13
7070 |
7171LL | let _ = match_def_path(cx, did, &["core", "option", "Option", "Some"]);
7272 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OptionSome) == Some(did)`
7373 |
7474 = help: if this `DefId` came from a constructor expression or pattern then the parent `DefId` should be used instead
7575
7676error: use of a def path to a diagnostic item
77- --> $DIR/unnecessary_def_path.rs:54 :13
77+ --> $DIR/unnecessary_def_path.rs:55 :13
7878 |
7979LL | let _ = match_trait_method(cx, expr, &["core", "convert", "AsRef"]);
8080 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_trait_method(cx, expr, sym::AsRef)`
8181
8282error: use of a def path to a diagnostic item
83- --> $DIR/unnecessary_def_path.rs:56 :13
83+ --> $DIR/unnecessary_def_path.rs:57 :13
8484 |
8585LL | let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option"]);
8686 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_path_diagnostic_item(cx, expr, sym::Option)`
8787
8888error: use of a def path to a `LangItem`
89- --> $DIR/unnecessary_def_path.rs:57 :13
89+ --> $DIR/unnecessary_def_path.rs:58 :13
9090 |
9191LL | let _ = is_expr_path_def_path(cx, expr, &["core", "iter", "traits", "Iterator", "next"]);
9292 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `path_res(cx, expr).opt_def_id().map_or(false, |id| cx.tcx.lang_items().get(LangItem::IteratorNext) == Some(id))`
9393
9494error: use of a def path to a `LangItem`
95- --> $DIR/unnecessary_def_path.rs:58 :13
95+ --> $DIR/unnecessary_def_path.rs:59 :13
9696 |
9797LL | let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option", "Some"]);
9898 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_res_lang_ctor(cx, path_res(cx, expr), LangItem::OptionSome)`
0 commit comments