mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Make NamedEntityInterface non-movable (#946)
This commit is contained in:
@@ -29,8 +29,9 @@ void Declaration::Print(llvm::raw_ostream& out) const {
|
||||
case Kind::ChoiceDeclaration: {
|
||||
const auto& choice = cast<ChoiceDeclaration>(*this);
|
||||
out << "choice " << choice.name() << " {\n";
|
||||
for (const auto& alt : choice.alternatives()) {
|
||||
out << "alt " << alt.name() << " " << alt.signature() << ";\n";
|
||||
for (Nonnull<const ChoiceDeclaration::Alternative*> alt :
|
||||
choice.alternatives()) {
|
||||
out << "alt " << alt->name() << " " << alt->signature() << ";\n";
|
||||
}
|
||||
out << "}\n";
|
||||
break;
|
||||
@@ -49,12 +50,12 @@ void FunctionDeclaration::PrintDepth(int depth, llvm::raw_ostream& out) const {
|
||||
if (!deduced_parameters_.empty()) {
|
||||
out << "[";
|
||||
unsigned int i = 0;
|
||||
for (const auto& deduced : deduced_parameters_) {
|
||||
for (Nonnull<const GenericBinding*> deduced : deduced_parameters_) {
|
||||
if (i != 0) {
|
||||
out << ", ";
|
||||
}
|
||||
out << deduced.name() << ":! ";
|
||||
deduced.type().Print(out);
|
||||
out << deduced->name() << ":! ";
|
||||
deduced->type().Print(out);
|
||||
++i;
|
||||
}
|
||||
out << "]";
|
||||
|
||||
Reference in New Issue
Block a user