From d37e6dfee8afcf0482dd12dbe82d2caf26606675 Mon Sep 17 00:00:00 2001 From: Zachary S Date: Sat, 9 Nov 2024 00:18:47 -0600 Subject: [PATCH] Add str to "expected primitive, found type" diagnostic --- compiler/rustc_middle/src/ty/sty.rs | 1 + 1 file changed, 1 insertion(+) 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 @@ pub fn primitive_symbol(self) -> Option { ty::UintTy::U64 => Some(sym::u64), ty::UintTy::U128 => Some(sym::u128), }, + ty::Str => Some(sym::str), _ => None, } }