Closed Veetaha closed 3 years ago
I've stumbled with the problem where I use TypedBuilder in a file that uses declares or imports a custom module named core:
TypedBuilder
use typed_builder::TypedBuilder; use rusoto_core as core; #[derive(TypedBuilder)] struct StaticCreds { // ... }
and since the generated code references some types from Rust's standard core crate like here: https://github.com/idanarye/rust-typed-builder/blob/69d6aac815eda708557414b62fad9e02c4e3f452/src/struct_info.rs#L280
core
this gives compile errors, because the core symbol currently in scope is rusoto_core.
rusoto_core
The solution would be to qualify all references in generated code to be absolute paths:
impl ::core::Into<#arg_type>
I've stumbled with the problem where I use
TypedBuilder
in a file that uses declares or imports a custom module named core:and since the generated code references some types from Rust's standard
core
crate like here: https://github.com/idanarye/rust-typed-builder/blob/69d6aac815eda708557414b62fad9e02c4e3f452/src/struct_info.rs#L280this gives compile errors, because the
core
symbol currently in scope isrusoto_core
.The solution would be to qualify all references in generated code to be absolute paths:
impl ::core::Into<#arg_type>