1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![deny(bare_trait_objects)]
12 #![feature(rustc_private)]
14 #[macro_use] extern crate log;
16 extern crate rustc_errors;
17 extern crate rustc_target;
19 extern crate syntax_pos;
23 pub static ALLOCATOR_METHODS: &[AllocatorMethod] = &[
26 inputs: &[AllocatorTy::Layout],
27 output: AllocatorTy::ResultPtr,
31 inputs: &[AllocatorTy::Ptr, AllocatorTy::Layout],
32 output: AllocatorTy::Unit,
36 inputs: &[AllocatorTy::Ptr, AllocatorTy::Layout, AllocatorTy::Usize],
37 output: AllocatorTy::ResultPtr,
41 inputs: &[AllocatorTy::Layout],
42 output: AllocatorTy::ResultPtr,
46 pub struct AllocatorMethod {
47 pub name: &'static str,
48 pub inputs: &'static [AllocatorTy],
49 pub output: AllocatorTy,
52 pub enum AllocatorTy {