Rust: rename TypeRef and *Type to *TypeRepr, ty to type_repr, and expand some abbreviations in generated docs#18174
Conversation
|
Why do we want to rename |
These are all instances of types written in the code (they are |
(a thing we don't have, yet) |
|
Thanks for the explanation @redsun82 👍 🙏 . I guess the name "Ref" wasn't immediately intuitive to me, but aside from that it makes sense. It's the distinction between syntax or notation representing a type and the actual type itself. |
we could also opt for using |
Yes, subjectively I think that would be better! That also avoids clashes/confusion with the Rust concept of a reference. For instance the current class name |
*Type to *TypeRef and expand some abbreviations in generated docsTypeRef and *Type to *TypeRepr and expand some abbreviations in generated docs
| import codeql.rust.elements.TuplePat | ||
| import codeql.rust.elements.TupleStructPat | ||
| import codeql.rust.elements.TupleType | ||
| import codeql.rust.elements.TupleTypeRepr |
Check warning
Code scanning / CodeQL
Redundant import
Check warning
Code scanning / CodeQL
Redundant import
Check warning
Code scanning / CodeQL
Redundant import
| import codeql.rust.elements.ReturnTypeSyntax | ||
| import codeql.rust.elements.TypeBoundList | ||
| import codeql.rust.elements.TypeRef | ||
| import codeql.rust.elements.TypeRepr |
Check warning
Code scanning / CodeQL
Redundant import
| import codeql.rust.elements.Abi | ||
| import codeql.rust.elements.ParamList | ||
| import codeql.rust.elements.RetTypeRepr | ||
| import codeql.rust.elements.TypeRepr |
Check warning
Code scanning / CodeQL
Redundant import
Check warning
Code scanning / CodeQL
Redundant import
| */ | ||
|
|
||
| private import internal.RetTypeReprImpl | ||
| import codeql.rust.elements.AstNode |
Check warning
Code scanning / CodeQL
Redundant import
| import codeql.rust.elements.ReturnTypeSyntax | ||
| import codeql.rust.elements.TypeBoundList | ||
| import codeql.rust.elements.TypeRef | ||
| import codeql.rust.elements.TypeRepr |
Check warning
Code scanning / CodeQL
Redundant import
| import codeql.rust.elements.RetTypeRepr | ||
| import codeql.rust.elements.ReturnTypeSyntax | ||
| import codeql.rust.elements.TypeRef | ||
| import codeql.rust.elements.TypeRepr |
Check warning
Code scanning / CodeQL
Redundant import
TypeRef and *Type to *TypeRepr and expand some abbreviations in generated docsTypeRef and *Type to *TypeRepr, ty to type_repr, and expand some abbreviations in generated docs
|
@paldepind I went with the rename to |
paldepind
left a comment
There was a problem hiding this comment.
Really great changes 🤩
|
@paldepind I had to merge in main, can you reapprove please? |
We were already renaming the tip of the type reference hierarchy from
TypetoTypeRefbut weren't doing so with all its descendants.Additionally, the
patandtyabbreviations are now expanded in generated documentation.