rust/src/test/compile-fail/use-from-trait.rs
2013-06-13 18:03:08 -04:00

17 lines
318 B
Rust

use Trait::foo; //~ ERROR cannot import from a trait or type implementation
//~^ ERROR failed to resolve import
use Foo::new; //~ ERROR cannot import from a trait or type implementation
//~^ ERROR failed to resolve import
pub trait Trait {
fn foo();
}
struct Foo;
impl Foo {
fn new() {}
}
fn main() {}