This commit is contained in:
flip1995 2019-08-30 09:33:03 +02:00
parent 2bff3d87d5
commit 3c11406c1f
No known key found for this signature in database
GPG Key ID: 693086869D506637

View File

@ -15,7 +15,7 @@ use rustc::{declare_lint_pass, declare_tool_lint};
use rustc_errors::Applicability;
use syntax::ast;
use syntax::source_map::Span;
use syntax::symbol::LocalInternedString;
use syntax::symbol::{sym, LocalInternedString};
use crate::utils::sugg;
use crate::utils::usage::mutated_variables;
@ -2682,7 +2682,7 @@ fn get_error_type<'a>(cx: &LateContext<'_, '_>, ty: Ty<'a>) -> Option<Ty<'a>> {
/// This checks whether a given type is known to implement Debug.
fn has_debug_impl<'a, 'b>(ty: Ty<'a>, cx: &LateContext<'b, 'a>) -> bool {
match cx.tcx.lang_items().debug_trait() {
match cx.tcx.get_diagnostic_item(sym::debug_trait) {
Some(debug) => implements_trait(cx, ty, debug, &[]),
None => false,
}