Closed
Description
I've got a simple trait that isn't being implemented somehow, and that compiles fine even though it shouldn't:
MyProject/MyFramework/base.rs
pub trait Base
{
fn run(&self);
}
MyProject/MyFramework/mod.rs
pub use self::base::Base;
mod base;
MyProject/MyApp/main.rs
#[path="../MyFramework/mod.rs"]
mod myFramework;
struct MyApp;
impl myFramework::Base for MyApp
{
// notice that there's no implementation for run()
}
fn main()
{
}
This compiles fine even though it shouldn't.
If I put the trait declaration inside the main.rs file, the compiler outputs the proper error, as expected.
Also, if I create an instance of MyApp inside main() and try to call Run() it says the type doesn't have that method, which I believe is because the trait isn't being implemented at all, hence no errors compiling...
I'm sorry if I should be more descriptive, but this is my first time trying rust and I don't know what else is important.
[edit]
I compiled rust from git, revision ff94f86.
Metadata
Metadata
Assignees
Labels
No labels