rust/src/test/ui/regions/regions-creating-enums3.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
207 B
Rust
Raw Normal View History

enum Ast<'a> {
Num(usize),
Add(&'a Ast<'a>, &'a Ast<'a>)
2012-04-21 12:04:58 -05:00
}
fn mk_add_bad1<'a,'b>(x: &'a Ast<'a>, y: &'b Ast<'b>) -> Ast<'a> {
2018-12-25 09:56:47 -06:00
Ast::Add(x, y) //~ ERROR lifetime mismatch [E0623]
2012-04-21 12:04:58 -05:00
}
fn main() {
}