diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-02 09:27:32 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-02 09:27:32 +0100 |
| commit | b40afc6390992a6e5263f6539dbca0aacc4c95de (patch) | |
| tree | 5e774ad0cb6069bb515c3a4fadd5cf463420550a /src | |
| parent | 3e07c7c88343ae7ce92d43f326804a666c01ca11 (diff) | |
Generate Rust type paths properly
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java index c4af4e7..7cc17b9 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/rusttypes/RustTypesGenerator.java @@ -163,8 +163,7 @@ public class RustTypesGenerator implements Generator { private RustType generateTypePath(NamespaceName namespaceName, String typeName, Context context) { var segments = new ArrayList<RustTypePathSegment>(); - // TODO: use crate as a keyword, not an identifier - segments.add(RustTypePathSegment.of(new RustIdentifier("crate"))); + segments.add(RustTypePathSegment.crate()); for (var moduleName : this.namespaceNameToRustCrateModulePath(namespaceName)) { segments.add(RustTypePathSegment.of(moduleName)); } |
