Skip to content

Instantly share code, notes, and snippets.

@hfiguiere
Created February 5, 2019 17:02
Show Gist options
  • Save hfiguiere/ca983802e5de700181f883f497706558 to your computer and use it in GitHub Desktop.
Save hfiguiere/ca983802e5de700181f883f497706558 to your computer and use it in GitHub Desktop.
Gio build problem
[package]
name = "rust-sandbox"
version = "0.1.0"
authors = ["Hubert Figuière <hub@figuiere.net>"]
edition = "2018"
[dependencies]
gio = { git = "https://github.com/gtk-rs/gio" }
error[E0283]: type annotations required: cannot resolve `_: glib::object::IsA<gio::Cancellable>`
--> src/main.rs:10:32
|
10 | if let Ok(fileinfo) = file.query_info("*", gio::FileQueryInfoFlags::NONE, None) {
| ^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0283`.
error: Could not compile `rust-sandbox`.
To learn more, run the command again with --verbose.
extern crate gio;
use std::path::Path;
use gio::prelude::*;
fn main() {
let path = Path::new("/tmp/foo");
let file = gio::File::new_for_path(path);
if let Ok(fileinfo) = file.query_info("*", gio::FileQueryInfoFlags::NONE, None) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment