Add support for char keyword per #5903. (#6078)

Make inst namer and stringify print `Core.Char` and `Core.String` as
`char` and `str` respectively. Plus a few cleanups.
This commit is contained in:
Richard Smith
2025-09-16 20:45:01 +00:00
committed by GitHub
parent 59c4cbcaf1
commit bac828d244
21 changed files with 351 additions and 106 deletions
@@ -327,7 +327,7 @@ import Cpp library "plus_with_string_view_conversion.h";
fn F() {
let s1: str = "hello";
let s2: str = "world";
// CHECK:STDERR: fail_todo_import_plus_with_string_view_conversion.carbon:[[@LINE+4]]:18: error: cannot access member of interface `Core.AddWith(Core.String)` in type `Core.String` that does not implement that interface [MissingImplInMemberAccess]
// CHECK:STDERR: fail_todo_import_plus_with_string_view_conversion.carbon:[[@LINE+4]]:18: error: cannot access member of interface `Core.AddWith(str)` in type `str` that does not implement that interface [MissingImplInMemberAccess]
// CHECK:STDERR: let c: Cpp.C = s1 + s2;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: