You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
- .escape_debug()
- .escape_default()
- .escape_unicode()
- .to_lowercase()
- .to_uppercase()
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
here7 | //#[setters(into)]
8 | / struct Simple {
9 | | field: String,
10 | | }
| |_^
Simple
already definederror[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:
- .escape_debug()
- .escape_default()
- .escape_unicode()
- .to_lowercase()
- .to_uppercase()
error: aborting due to previous error(s)
accessors-test.zip
The text was updated successfully, but these errors were encountered: