8ee79c79aa
Fixes #2806 Fixes #3197 Fixes #3138
15 lines
333 B
Rust
15 lines
333 B
Rust
trait get_ctxt {
|
|
fn get_ctxt() -> &self/uint;
|
|
}
|
|
|
|
fn make_gc1(gc: get_ctxt/&a) -> get_ctxt/&b {
|
|
return gc; //~ ERROR mismatched types: expected `@get_ctxt/&b` but found `@get_ctxt/&a`
|
|
}
|
|
|
|
fn make_gc2(gc: get_ctxt/&a) -> get_ctxt/&b {
|
|
return gc as get_ctxt; //~ ERROR cannot infer an appropriate lifetime
|
|
}
|
|
|
|
fn main() {
|
|
}
|