doc-tests are failing on Fedora
Doc-tests gtk-macros
Running `/usr/bin/rustdoc --edition=2018 --crate-type lib --test /home/brain/rpmbuild/BUILD/gtk-macros-0.2.0/src/lib.rs --crate-name gtk_macros -L dependency=/home/brain/rpmbuild/BUILD/gtk-macros-0.2.0/target/release/deps -L dependency=/home/brain/rpmbuild/BUILD/gtk-macros-0.2.0/target/release/deps --extern gtk_macros=/home/brain/rpmbuild/BUILD/gtk-macros-0.2.0/target/release/deps/libgtk_macros-3c6de3525027cace.rlib`
running 13 tests
test src/lib.rs - get_widget (line 29) ... FAILED
test src/lib.rs - action (line 105) ... FAILED
test src/lib.rs - get_action (line 223) ... FAILED
test src/lib.rs - get_action (line 202) ... FAILED
test src/lib.rs - get_widget (line 9) ... FAILED
test src/lib.rs - action (line 122) ... FAILED
test src/lib.rs - get_widget (line 21) ... FAILED
test src/lib.rs - send (line 79) ... FAILED
test src/lib.rs - spawn (line 61) ... FAILED
test src/lib.rs - send (line 88) ... FAILED
test src/lib.rs - stateful_action (line 171) ... FAILED
test src/lib.rs - spawn (line 49) ... FAILED
test src/lib.rs - stateful_action (line 153) ... FAILED
failures:
---- src/lib.rs - get_widget (line 29) stdout ----
error: cannot find macro `get_widget` in this scope
--> src/lib.rs:31:1
|
4 | get_widget!(builder, gtk::Label, @my_label).set_text("Hello world!");
| ^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `gtk`
--> src/lib.rs:30:15
|
3 | let builder = gtk::Builder::new_from_resource("/org/gnome/App/ui/widget.ui");
| ^^^ use of undeclared type or module `gtk`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/lib.rs - action (line 105) stdout ----
error: cannot find macro `get_widget` in this scope
--> src/lib.rs:106:14
|
3 | let widget = get_widget!(builder, gtk::Window, widget);
| ^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:107:15
|
4 | let actions = gio::SimpleActionGroup::new();
| ^^^ use of undeclared type or module `gio`
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:110:14
|
7 | let action = gio::SimpleAction::new("do", None);
| ^^^ use of undeclared type or module `gio`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/lib.rs - get_action (line 223) stdout ----
error: cannot find macro `get_action` in this scope
--> src/lib.rs:232:1
|
11 | get_action!(actions, @delete).set_enabled(false);
| ^^^^^^^^^^
error: cannot find macro `action` in this scope
--> src/lib.rs:225:1
|
4 | action!(
| ^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:224:15
|
3 | let actions = gio::SimpleActionGroup::new();
| ^^^ use of undeclared type or module `gio`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/lib.rs - get_action (line 202) stdout ----
error: cannot find macro `action` in this scope
--> src/lib.rs:204:1
|
4 | action!(
| ^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:203:15
|
3 | let actions = gio::SimpleActionGroup::new();
| ^^^ use of undeclared type or module `gio`
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:213:29
|
13 | .downcast::<gio::SimpleAction>()
| ^^^ use of undeclared type or module `gio`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/lib.rs - get_widget (line 9) stdout ----
error[E0433]: failed to resolve: use of undeclared type or module `gtk`
--> src/lib.rs:10:15
|
3 | let builder = gtk::Builder::new_frm_resource("/org/gnome/App/ui/widget.ui");
| ^^^ use of undeclared type or module `gtk`
error[E0433]: failed to resolve: use of undeclared type or module `gtk`
--> src/lib.rs:11:13
|
4 | let widget: gtk::Label = builder.get_object("my_label").expect("Failed to find my_label object");
| ^^^ use of undeclared type or module `gtk`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/lib.rs - action (line 122) stdout ----
error: cannot find macro `action` in this scope
--> src/lib.rs:126:1
|
6 | action!(
| ^^^^^^
error: cannot find macro `get_widget` in this scope
--> src/lib.rs:123:14
|
3 | let widget = get_widget!(builder, gtk::Window, widget);
| ^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:124:15
|
4 | let actions = gio::SimpleActionGroup::new();
| ^^^ use of undeclared type or module `gio`
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/lib.rs - get_widget (line 21) stdout ----
error: cannot find macro `get_widget` in this scope
--> src/lib.rs:23:1
|
4 | get_widget!(builder, gtk::Label, my_label);
| ^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `gtk`
--> src/lib.rs:22:15
|
3 | let builder = gtk::Builder::new_from_resource("/org/gnome/App/ui/widget.ui");
| ^^^ use of undeclared type or module `gtk`
error[E0425]: cannot find value `my_label` in this scope
--> src/lib.rs:24:1
|
5 | my_label.set_text("Hello world!");
| ^^^^^^^^ not found in this scope
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.
Couldn't compile the test.
---- src/lib.rs - send (line 79) stdout ----
error[E0433]: failed to resolve: use of undeclared type or module `Action`
--> src/lib.rs:80:13
|
3 | sender.send(Action::DoThing).expect("Failed to send DoThing through the glib channel?");
| ^^^^^^ use of undeclared type or module `Action`
error[E0425]: cannot find value `sender` in this scope
--> src/lib.rs:80:1
|
3 | sender.send(Action::DoThing).expect("Failed to send DoThing through the glib channel?");
| ^^^^^^ not found in this scope
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.
Couldn't compile the test.
---- src/lib.rs - spawn (line 61) stdout ----
error: cannot find macro `spawn` in this scope
--> src/lib.rs:62:1
|
3 | spawn!(async {
| ^^^^^
error: aborting due to previous error
Couldn't compile the test.
---- src/lib.rs - send (line 88) stdout ----
error: cannot find macro `send` in this scope
--> src/lib.rs:89:1
|
3 | send!(self.sender, Action::DoThing);
| ^^^^
error: aborting due to previous error
Couldn't compile the test.
---- src/lib.rs - stateful_action (line 171) stdout ----
error: cannot find macro `stateful_action` in this scope
--> src/lib.rs:174:1
|
5 | stateful_action!(actions, "dark-mode", is_dark_mode, move |action, _| {
| ^^^^^^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:172:15
|
3 | let actions = gio::SimpleActionGroup::new();
| ^^^ use of undeclared type or module `gio`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0433`.
Couldn't compile the test.
---- src/lib.rs - spawn (line 49) stdout ----
error[E0433]: failed to resolve: use of undeclared type or module `glib`
--> src/lib.rs:50:11
|
3 | let ctx = glib::MainContext::default();
| ^^^^ use of undeclared type or module `glib`
error[E0425]: cannot find value `something` in this scope
--> src/lib.rs:52:5
|
5 | something.await;
| ^^^^^^^^^ not found in this scope
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.
Couldn't compile the test.
---- src/lib.rs - stateful_action (line 153) stdout ----
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:154:15
|
3 | let actions = gio::SimpleActionGroup::new();
| ^^^ use of undeclared type or module `gio`
error[E0433]: failed to resolve: use of undeclared type or module `gio`
--> src/lib.rs:157:14
|
6 | let action = gio::SimpleAction::new_stateful("dark-mode", None, &is_dark_mode.to_variant());
| ^^^ use of undeclared type or module `gio`
error[E0599]: no method named `to_variant` found for type `bool` in the current scope
--> src/lib.rs:157:79
|
6 | let action = gio::SimpleAction::new_stateful("dark-mode", None, &is_dark_mode.to_variant());
| ^^^^^^^^^^ method not found in `bool`
error[E0599]: no method named `to_variant` found for type `bool` in the current scope
--> src/lib.rs:162:36
|
11 | action.set_state(&is_dark_mode.to_variant());
| ^^^^^^^^^^ method not found in `bool`
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
Couldn't compile the test.
failures:
src/lib.rs - action (line 105)
src/lib.rs - action (line 122)
src/lib.rs - get_action (line 202)
src/lib.rs - get_action (line 223)
src/lib.rs - get_widget (line 21)
src/lib.rs - get_widget (line 29)
src/lib.rs - get_widget (line 9)
src/lib.rs - send (line 79)
src/lib.rs - send (line 88)
src/lib.rs - spawn (line 49)
src/lib.rs - spawn (line 61)
src/lib.rs - stateful_action (line 153)
src/lib.rs - stateful_action (line 171)
test result: FAILED. 0 passed; 13 failed; 0 ignored; 0 measured; 0 filtered out
Not sure what problem here might be, I just ran cargo test
.