Rm diagnostic item, use lang item
This commit is contained in:
parent
c74f155b24
commit
64a17a09a8
32 changed files with 103 additions and 100 deletions
|
@ -1705,7 +1705,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
ty::Bool => Some(0),
|
||||
ty::Char => Some(1),
|
||||
ty::Str => Some(2),
|
||||
ty::Adt(def, _) if tcx.is_diagnostic_item(sym::String, def.did()) => Some(2),
|
||||
ty::Adt(def, _) if Some(def.did()) == tcx.lang_items().string() => Some(2),
|
||||
ty::Int(..)
|
||||
| ty::Uint(..)
|
||||
| ty::Float(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue