Use absolute paths in generated code
Closed this issue · 0 comments
Veetaha commented
I've stumbled with the problem where I use TypedBuilder
in a file that uses declares or imports a custom module named core:
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:
rust-typed-builder/src/struct_info.rs
Line 280 in 69d6aac
this gives compile errors, because the core
symbol currently in scope is rusoto_core
.
The solution would be to qualify all references in generated code to be absolute paths:
impl ::core::Into<#arg_type>