emk / accessors

(WIP) Getters and setters for Rust using macros 1.1
11 stars 6 forks source link

compilation failed with latest rust #6

Open milyin opened 7 years ago

milyin commented 7 years ago

When I tried to compile 'simple.rs' the following error appeared:

error: setters is a derive mode --> src\main.rs:7:1 | 7 | #[setters(into)] | ^^^^^^^^^^^^^^^^

When I commented out '#[setters(into)]' string the other error appeared:

error[E0428]: a type named Simple has already been defined in this module --> src\main.rs:8:1 | 6 | #[derive(getters, setters)] | ------- previous definition of Simple here 7 | //#[setters(into)] 8 | / struct Simple { 9 | | field: String, 10 | | } | |_^ Simple already defined

error[E0308]: mismatched types --> src\main.rs:15:17 15 s.set_field("there"); ^^^^^^^ expected struct std::string::String, found reference

= note: expected type std::string::String found type &'static str = help: here are some functions which might fulfill your needs:

error: aborting due to previous error(s) accessors-test.zip