mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 19:12:50 +00:00
fix interning-defined-symbol error
This commit is contained in:
parent
99f860768c
commit
83a955335f
@ -27,10 +27,10 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &hir::Expr<'_>, get_args
|
||||
} else if is_type_diagnostic_item(cx, expr_ty, sym::vec_type) {
|
||||
needs_ref = get_args_str.parse::<usize>().is_ok();
|
||||
"Vec"
|
||||
} else if is_type_diagnostic_item(cx, expr_ty, sym!(vecdeque_type)) {
|
||||
} else if is_type_diagnostic_item(cx, expr_ty, sym::vecdeque_type) {
|
||||
needs_ref = get_args_str.parse::<usize>().is_ok();
|
||||
"VecDeque"
|
||||
} else if !is_mut && is_type_diagnostic_item(cx, expr_ty, sym!(hashmap_type)) {
|
||||
} else if !is_mut && is_type_diagnostic_item(cx, expr_ty, sym::hashmap_type) {
|
||||
needs_ref = true;
|
||||
"HashMap"
|
||||
} else if !is_mut && match_type(cx, expr_ty, &paths::BTREEMAP) {
|
||||
|
@ -19,7 +19,7 @@ pub(super) fn check<'tcx>(
|
||||
"slice"
|
||||
} else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(&iter_args[0]), sym::vec_type) {
|
||||
"Vec"
|
||||
} else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(&iter_args[0]), sym!(vecdeque_type)) {
|
||||
} else if is_type_diagnostic_item(cx, cx.typeck_results().expr_ty(&iter_args[0]), sym::vecdeque_type) {
|
||||
"VecDeque"
|
||||
} else {
|
||||
let nth_args = nth_and_iter_args[0];
|
||||
|
Loading…
Reference in New Issue
Block a user