How to use the crate derive_builder with a struct implemented in a module?

Hi all,

I have trouble to use the crate derive_builder with structs which are not defined in main.rs. I'm using the last version of derive_builder (0.8.0).

Here's a minimal example :

// ./src/main.rs
#[macro_use]
extern crate derive_builder;

mod data_structure;
use data_structure::Foo;

fn main() {
    Foo::default().bar("test");
}
// ./src/data_structure.rs
#[macro_use]
use derive_builder::Builder;

#[derive(Default, Clone, Builder)]
#[builder(setter(into))]
pub struct Foo {
    pub bar: String,
}

This example give me the following error :

error[E0599]: no method named `bar` found for type `data_structure::Foo` in the current scope
 --> src/main.rs:8:20
  |
8 |     Foo::default().bar("test");
  |                    ^^^-------- help: remove the arguments
  |                    |
  |                    field, not a method
  | 
 ::: src/data_structure.rs:6:1
  |
6 | pub struct Foo {
  | -------------- method `bar` not found for this

I've tried this example without success with the last stable version of rust (1.38.0) and the nightly version of rust (1.40.0-nightly).

I'm missing something ?

Thanks.