Austin Schuh | 6ea9bfa | 2023-08-06 19:05:10 -0700 | [diff] [blame^] | 1 | // Copyright 2022 Google LLC |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 4 | // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 5 | // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your |
| 6 | // option. This file may not be copied, modified, or distributed |
| 7 | // except according to those terms. |
| 8 | |
| 9 | #include "cxxgen.h" |
| 10 | #include "input.h" |
| 11 | |
| 12 | void jurassic() { |
| 13 | rust::Box<Dinosaur> prey = new_dinosaur(false); |
| 14 | rust::Box<Dinosaur> predator = new_dinosaur(true); |
| 15 | prey->roar(); |
| 16 | predator->roar(); |
| 17 | predator->eat(std::move(prey)); |
| 18 | go_extinct(); |
| 19 | } |