Conflicts with value

Hello. I installed Rust GTK and wanted to make a simple application with it, but I got an error. I copied the example of official repository on github.

extern crate gtk;

use gtk::*;

fn main() {
    let x = gtk::Button::new();


Compiling Test v0.1.0 (file:///home/drfels/Desktop/Test) 3:12 error: import `main` conflicts with value in this module [E0255] use gtk::*;
              ^~~~~~~ 3:12 help: run `rustc --explain E0255` to see a detailed explanation 7:2 note: conflicting value here fn main() {     let x = gtk::Button::new(); }
error: aborting due to previous error
Could not compile `Test`.

Also: Where i find Rust GTK Documentation and more examples?

Sorry about your experience. That readme should really be cleaned up a bit. The GTK bindings are still under construction, there regularly happen breaking changes and some bits of documentation get out of date.

You can find the basic official example and slightly outdated API docs on the project website and more examples in the examples repo. For now you might be better served by the official GTK docs.

In particular, it's no longer recommended to do a blanket import (use gtk::*), just import the traits with

use gtk::traits::*;