about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZachary S <zasample18+github@gmail.com>2024-11-09 00:18:47 -0600
committerZachary S <zasample18+github@gmail.com>2024-11-09 00:18:47 -0600
commitd37e6dfee8afcf0482dd12dbe82d2caf26606675 (patch)
treecab9b26d1cff8fba2ad1fa8dca3993996c449343
parent328b759142ddeae96da83176f103200009d3e3f1 (diff)
downloadrust-d37e6dfee8afcf0482dd12dbe82d2caf26606675.tar.gz
rust-d37e6dfee8afcf0482dd12dbe82d2caf26606675.zip
Add str to "expected primitive, found type" diagnostic
-rw-r--r--compiler/rustc_middle/src/ty/sty.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs
index e27bb2fd135..142db8a17f0 100644
--- a/compiler/rustc_middle/src/ty/sty.rs
+++ b/compiler/rustc_middle/src/ty/sty.rs
@@ -1933,6 +1933,7 @@ impl<'tcx> Ty<'tcx> {
                 ty::UintTy::U64 => Some(sym::u64),
                 ty::UintTy::U128 => Some(sym::u128),
             },
+            ty::Str => Some(sym::str),
             _ => None,
         }
     }