]> git.lizzy.rs Git - rust.git/blob - src/librustc/lib.rs
auto merge of #19628 : jbranchaud/rust/add-string-as-string-doctest, r=steveklabnik
[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 #![feature(default_type_params, globs, if_let, import_shadowing, macro_rules, phase, quote)]
26 #![feature(slicing_syntax, tuple_indexing, unsafe_destructor)]
27 #![feature(rustc_diagnostic_macros)]
28
29 extern crate arena;
30 extern crate flate;
31 extern crate getopts;
32 extern crate graphviz;
33 extern crate libc;
34 extern crate rustc_llvm;
35 extern crate rustc_back;
36 extern crate serialize;
37 extern crate rbml;
38 #[phase(plugin, link)] extern crate log;
39 #[phase(plugin, link)] extern crate syntax;
40
41 #[cfg(test)]
42 extern crate test;
43
44 pub use rustc_llvm as llvm;
45
46 mod diagnostics;
47
48 pub mod back {
49     pub use rustc_back::abi;
50     pub use rustc_back::archive;
51     pub use rustc_back::arm;
52     pub use rustc_back::mips;
53     pub use rustc_back::mipsel;
54     pub use rustc_back::rpath;
55     pub use rustc_back::svh;
56     pub use rustc_back::target_strs;
57     pub use rustc_back::x86;
58     pub use rustc_back::x86_64;
59 }
60
61 pub mod middle {
62     pub mod astconv_util;
63     pub mod astencode;
64     pub mod borrowck;
65     pub mod cfg;
66     pub mod check_const;
67     pub mod check_static_recursion;
68     pub mod check_loop;
69     pub mod check_match;
70     pub mod check_rvalues;
71     pub mod check_static;
72     pub mod const_eval;
73     pub mod dataflow;
74     pub mod dead;
75     pub mod def;
76     pub mod dependency_format;
77     pub mod effect;
78     pub mod entry;
79     pub mod expr_use_visitor;
80     pub mod fast_reject;
81     pub mod graph;
82     pub mod intrinsicck;
83     pub mod infer;
84     pub mod lang_items;
85     pub mod liveness;
86     pub mod mem_categorization;
87     pub mod pat_util;
88     pub mod privacy;
89     pub mod reachable;
90     pub mod region;
91     pub mod recursion_limit;
92     pub mod resolve;
93     pub mod resolve_lifetime;
94     pub mod stability;
95     pub mod subst;
96     pub mod traits;
97     pub mod ty;
98     pub mod ty_fold;
99     pub mod weak_lang_items;
100 }
101
102 pub mod metadata;
103
104 pub mod session;
105
106 pub mod plugin;
107
108 pub mod lint;
109
110 pub mod util {
111     pub use rustc_back::fs;
112     pub use rustc_back::sha2;
113
114     pub mod common;
115     pub mod ppaux;
116     pub mod nodemap;
117     pub mod snapshot_vec;
118 }
119
120 pub mod lib {
121     pub use llvm;
122 }
123
124 __build_diagnostic_array!(DIAGNOSTICS)
125
126 // A private module so that macro-expanded idents like
127 // `::rustc::lint::Lint` will also work in `rustc` itself.
128 //
129 // `libstd` uses the same trick.
130 #[doc(hidden)]
131 mod rustc {
132     pub use lint;
133 }