Skip to content

Commit ed430a9

Browse files
committed
remove implicit self injection
1 parent 56dc8f1 commit ed430a9

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -97,23 +97,6 @@ TopLevel::visit (AST::Module &module)
9797
void
9898
TopLevel::visit (AST::Trait &trait)
9999
{
100-
// FIXME: This Self injection is dodgy. It even lead to issues with metadata
101-
// export in the past (#2349). We cannot tell appart injected parameters from
102-
// regular ones. Dumping generic parameters highlights this Self in metadata,
103-
// during debug or proc macro collection. This is clearly a hack.
104-
//
105-
// For now I'll keep it here in the new name resolver even if it should
106-
// probably not be there. We need to find another way to solve this.
107-
// Maybe an additional attribute to Trait ?
108-
//
109-
// From old resolver:
110-
//// we need to inject an implicit self TypeParam here
111-
//// FIXME: which location should be used for Rust::Identifier `Self`?
112-
AST::TypeParam *implicit_self
113-
= new AST::TypeParam ({"Self"}, trait.get_locus ());
114-
trait.insert_implict_self (
115-
std::unique_ptr<AST::GenericParam> (implicit_self));
116-
117100
insert_or_error_out (trait.get_identifier (), trait,
118101
Namespace::Types);
119102

0 commit comments

Comments
 (0)