]> git.lizzy.rs Git - rust.git/blob - src/librustc/lib.rs
rollup merge of #20608: nikomatsakis/assoc-types-method-dispatch
[rust.git] / src / librustc / lib.rs
1 // Copyright 2012-2013 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.
4 //
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.
10
11 //! The Rust compiler.
12 //!
13 //! # Note
14 //!
15 //! This API is completely unstable and subject to change.
16
17 #![crate_name = "rustc"]
18 #![experimental]
19 #![crate_type = "dylib"]
20 #![crate_type = "rlib"]
21 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
22       html_favicon_url = "http://www.rust-lang.org/favicon.ico",
23       html_root_url = "http://doc.rust-lang.org/nightly/")]
24
25 #![allow(unknown_features)]
26 #![feature(default_type_params, globs, macro_rules, phase, quote)]
27 #![feature(slicing_syntax, unsafe_destructor)]
28 #![feature(rustc_diagnostic_macros)]
29 #![feature(unboxed_closures)]
30 #![feature(old_orphan_check)]
31 #![feature(associated_types)]
32
33 extern crate arena;
34 extern crate flate;
35 extern crate getopts;
36 extern crate graphviz;
37 extern crate libc;
38 extern crate rustc_llvm;
39 extern crate rustc_back;
40 extern crate serialize;
41 extern crate rbml;
42 extern crate collections;
43 #[phase(plugin, link)] extern crate log;
44 #[phase(plugin, link)] extern crate syntax;
45
46 extern crate "serialize" as rustc_serialize; // used by deriving
47
48 #[cfg(test)]
49 extern crate test;
50
51 pub use rustc_llvm as llvm;
52
53 mod diagnostics;
54
55 pub mod back {
56     pub use rustc_back::abi;
57     pub use rustc_back::archive;
58     pub use rustc_back::arm;
59     pub use rustc_back::mips;
60     pub use rustc_back::mipsel;
61     pub use rustc_back::rpath;
62     pub use rustc_back::svh;
63     pub use rustc_back::target_strs;
64     pub use rustc_back::x86;
65     pub use rustc_back::x86_64;
66 }
67
68 pub mod middle {
69     pub mod astconv_util;
70     pub mod astencode;
71     pub mod cfg;
72     pub mod check_const;
73     pub mod check_static_recursion;
74     pub mod check_loop;
75     pub mod check_match;
76     pub mod check_rvalues;
77     pub mod check_static;
78     pub mod const_eval;
79     pub mod dataflow;
80     pub mod dead;
81     pub mod def;
82     pub mod dependency_format;
83     pub mod effect;
84     pub mod entry;
85     pub mod expr_use_visitor;
86     pub mod fast_reject;
87     pub mod graph;
88     pub mod intrinsicck;
89     pub mod infer;
90     pub mod lang_items;
91     pub mod liveness;
92     pub mod mem_categorization;
93     pub mod pat_util;
94     pub mod privacy;
95     pub mod reachable;
96     pub mod region;
97     pub mod recursion_limit;
98     pub mod resolve_lifetime;
99     pub mod stability;
100     pub mod subst;
101     pub mod traits;
102     pub mod ty;
103     pub mod ty_fold;
104     pub mod ty_walk;
105     pub mod weak_lang_items;
106 }
107
108 pub mod metadata;
109
110 pub mod session;
111
112 pub mod plugin;
113
114 pub mod lint;
115
116 pub mod util {
117     pub use rustc_back::fs;
118     pub use rustc_back::sha2;
119
120     pub mod common;
121     pub mod ppaux;
122     pub mod nodemap;
123     pub mod snapshot_vec;
124     pub mod lev_distance;
125 }
126
127 pub mod lib {
128     pub use llvm;
129 }
130
131 __build_diagnostic_array! { DIAGNOSTICS }
132
133 // A private module so that macro-expanded idents like
134 // `::rustc::lint::Lint` will also work in `rustc` itself.
135 //
136 // `libstd` uses the same trick.
137 #[doc(hidden)]
138 mod rustc {
139     pub use lint;
140 }