mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 14:11:04 +01:00
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:
@@ -37,7 +37,7 @@ static auto BuildFunctionDecl(Context& context, bool is_definition)
|
||||
std::string);
|
||||
return context.emitter().Build(
|
||||
return_node_copy, IncompleteTypeInFunctionReturnType,
|
||||
context.sem_ir().StringifyType(return_type_id, true));
|
||||
context.sem_ir().StringifyType(return_type_id));
|
||||
})) {
|
||||
return_type_id = SemIR::TypeId::Error;
|
||||
} else if (!SemIR::GetInitializingRepresentation(context.sem_ir(),
|
||||
@@ -202,7 +202,7 @@ auto HandleFunctionDefinitionStart(Context& context, Parse::NodeId parse_node)
|
||||
std::string);
|
||||
return context.emitter().Build(
|
||||
param.parse_node(), IncompleteTypeInFunctionParam,
|
||||
context.sem_ir().StringifyType(param.type_id(), true));
|
||||
context.sem_ir().StringifyType(param.type_id()));
|
||||
});
|
||||
|
||||
if (auto fn_param = param.TryAs<SemIR::Param>()) {
|
||||
|
||||
Reference in New Issue
Block a user