Remove support for disambiguating a stringified type as being a type. (#3456)

Most of the calls to `StringifyType` already passed `true` for
`in_type_context`. Checking the rest, I found that every one of them was
already sufficiently clear that they were printing a type, or could be
made so with a very small change to the diagnostic text.
This commit is contained in:
Richard Smith
2023-12-05 17:34:04 +00:00
committed by GitHub
parent 433d626b04
commit 22dff46ed2
22 changed files with 42 additions and 65 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ auto HandleBindingPattern(Context& context, Parse::NodeId parse_node) -> bool {
type_node_copy, IncompleteTypeInVarDecl,
enclosing_class_decl ? llvm::StringLiteral("Field")
: llvm::StringLiteral("Variable"),
context.sem_ir().StringifyType(cast_type_id, true));
context.sem_ir().StringifyType(cast_type_id));
})) {
cast_type_id = SemIR::TypeId::Error;
}
@@ -130,7 +130,7 @@ auto HandleBindingPattern(Context& context, Parse::NodeId parse_node) -> bool {
std::string);
return context.emitter().Build(
type_node_copy, IncompleteTypeInLetDecl,
context.sem_ir().StringifyType(cast_type_id, true));
context.sem_ir().StringifyType(cast_type_id));
})) {
cast_type_id = SemIR::TypeId::Error;
}