2013-02-28 07:15:32 -06:00
|
|
|
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
|
2012-12-03 18:48:01 -06:00
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2014-01-07 23:17:52 -06:00
|
|
|
/*!
|
|
|
|
|
|
|
|
The Rust compiler.
|
|
|
|
|
|
|
|
# Note
|
|
|
|
|
|
|
|
This API is completely unstable and subject to change.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2014-05-12 17:30:24 -05:00
|
|
|
#![crate_id = "rustc#0.11.0-pre"]
|
2014-06-18 00:13:36 -05:00
|
|
|
#![experimental]
|
2014-03-21 20:05:05 -05:00
|
|
|
#![comment = "The Rust compiler"]
|
|
|
|
#![license = "MIT/ASL2"]
|
|
|
|
#![crate_type = "dylib"]
|
|
|
|
#![crate_type = "rlib"]
|
|
|
|
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
2014-01-07 23:17:52 -06:00
|
|
|
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
2014-05-21 21:55:39 -05:00
|
|
|
html_root_url = "http://doc.rust-lang.org/")]
|
2011-05-05 21:44:00 -05:00
|
|
|
|
2014-03-21 20:05:05 -05:00
|
|
|
#![allow(deprecated)]
|
|
|
|
#![feature(macro_rules, globs, struct_variant, managed_boxes, quote,
|
|
|
|
default_type_params, phase)]
|
2013-08-14 20:41:40 -05:00
|
|
|
|
2014-02-14 12:10:06 -06:00
|
|
|
extern crate arena;
|
2014-05-22 13:28:01 -05:00
|
|
|
extern crate debug;
|
|
|
|
extern crate flate;
|
|
|
|
extern crate getopts;
|
2014-04-17 14:00:08 -05:00
|
|
|
extern crate graphviz;
|
2014-05-22 13:28:01 -05:00
|
|
|
extern crate libc;
|
2014-02-14 12:10:06 -06:00
|
|
|
extern crate serialize;
|
2014-05-22 13:28:01 -05:00
|
|
|
extern crate syntax;
|
2014-02-19 21:08:12 -06:00
|
|
|
extern crate time;
|
2014-06-11 20:47:09 -05:00
|
|
|
#[phase(plugin, link)] extern crate log;
|
2014-05-24 23:15:16 -05:00
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod middle {
|
2014-05-14 14:31:30 -05:00
|
|
|
pub mod def;
|
2013-06-12 18:18:58 -05:00
|
|
|
pub mod trans;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod ty;
|
2013-10-29 05:03:32 -05:00
|
|
|
pub mod ty_fold;
|
Cleanup substitutions and treatment of generics around traits in a number of ways.
- In a TraitRef, use the self type consistently to refer to the Self type:
- trait ref in `impl Trait<A,B,C> for S` has a self type of `S`.
- trait ref in `A:Trait` has the self type `A`
- trait ref associated with a trait decl has self type `Self`
- trait ref associated with a supertype has self type `Self`
- trait ref in an object type `@Trait` has no self type
- Rewrite `each_bound_traits_and_supertraits` to perform
substitutions as it goes, and thus yield a series of trait refs
that are always in the same 'namespace' as the type parameter
bound given as input. Before, we left this to the caller, but
this doesn't work because the caller lacks adequare information
to perform the type substitutions correctly.
- For provided methods, substitute the generics involved in the provided
method correctly.
- Introduce TypeParameterDef, which tracks the bounds declared on a type
parameter and brings them together with the def_id and (in the future)
other information (maybe even the parameter's name!).
- Introduce Subst trait, which helps to cleanup a lot of the
repetitive code involved with doing type substitution.
- Introduce Repr trait, which makes debug printouts far more convenient.
Fixes #4183. Needed for #5656.
2013-04-09 00:54:49 -05:00
|
|
|
pub mod subst;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod resolve;
|
2013-10-29 05:03:32 -05:00
|
|
|
pub mod resolve_lifetime;
|
2012-11-28 14:33:00 -06:00
|
|
|
pub mod typeck;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod check_loop;
|
|
|
|
pub mod check_match;
|
|
|
|
pub mod check_const;
|
2014-02-26 12:22:41 -06:00
|
|
|
pub mod check_static;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod lint;
|
2012-12-13 15:05:22 -06:00
|
|
|
pub mod borrowck;
|
2013-04-17 17:05:17 -05:00
|
|
|
pub mod dataflow;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod mem_categorization;
|
|
|
|
pub mod liveness;
|
|
|
|
pub mod kind;
|
|
|
|
pub mod freevars;
|
|
|
|
pub mod pat_util;
|
|
|
|
pub mod region;
|
|
|
|
pub mod const_eval;
|
|
|
|
pub mod astencode;
|
|
|
|
pub mod lang_items;
|
|
|
|
pub mod privacy;
|
2013-04-29 16:56:05 -05:00
|
|
|
pub mod entry;
|
2013-05-23 21:12:16 -05:00
|
|
|
pub mod effect;
|
2013-06-14 20:21:47 -05:00
|
|
|
pub mod reachable;
|
2013-05-09 10:29:17 -05:00
|
|
|
pub mod graph;
|
2013-05-10 12:10:35 -05:00
|
|
|
pub mod cfg;
|
2013-12-08 01:55:27 -06:00
|
|
|
pub mod dead;
|
2014-04-21 18:21:53 -05:00
|
|
|
pub mod expr_use_visitor;
|
2014-05-02 02:59:27 -05:00
|
|
|
pub mod dependency_format;
|
2014-05-19 11:30:09 -05:00
|
|
|
pub mod weak_lang_items;
|
2014-02-04 22:31:33 -06:00
|
|
|
pub mod save;
|
2014-06-12 16:08:44 -05:00
|
|
|
pub mod intrinsicck;
|
2011-04-19 18:40:46 -05:00
|
|
|
}
|
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod front {
|
|
|
|
pub mod config;
|
|
|
|
pub mod test;
|
2013-05-17 15:12:42 -05:00
|
|
|
pub mod std_inject;
|
2014-01-06 06:00:46 -06:00
|
|
|
pub mod assign_node_ids_and_map;
|
2013-10-02 20:10:16 -05:00
|
|
|
pub mod feature_gate;
|
2014-02-07 04:50:07 -06:00
|
|
|
pub mod show_span;
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod back {
|
|
|
|
pub mod abi;
|
2014-02-24 21:45:20 -06:00
|
|
|
pub mod archive;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod arm;
|
2014-02-24 21:45:20 -06:00
|
|
|
pub mod link;
|
|
|
|
pub mod lto;
|
2013-01-29 08:28:08 -06:00
|
|
|
pub mod mips;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod rpath;
|
2014-02-24 21:45:20 -06:00
|
|
|
pub mod svh;
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod target_strs;
|
2014-02-24 21:45:20 -06:00
|
|
|
pub mod x86;
|
|
|
|
pub mod x86_64;
|
2010-09-23 17:46:31 -05:00
|
|
|
}
|
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod metadata;
|
2011-06-27 18:38:57 -05:00
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod driver;
|
2010-06-23 23:03:09 -05:00
|
|
|
|
2014-05-26 16:48:54 -05:00
|
|
|
pub mod plugin;
|
2014-05-24 18:16:10 -05:00
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod util {
|
|
|
|
pub mod common;
|
|
|
|
pub mod ppaux;
|
2013-12-09 15:56:53 -06:00
|
|
|
pub mod sha2;
|
2014-02-28 16:34:26 -06:00
|
|
|
pub mod nodemap;
|
2014-04-08 12:06:11 -05:00
|
|
|
pub mod fs;
|
2010-08-18 13:34:47 -05:00
|
|
|
}
|
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub mod lib {
|
|
|
|
pub mod llvm;
|
2013-11-30 22:52:21 -06:00
|
|
|
pub mod llvmdeps;
|
2010-07-12 19:47:40 -05:00
|
|
|
}
|
|
|
|
|
2013-01-29 17:16:07 -06:00
|
|
|
pub fn main() {
|
2014-05-14 23:39:11 -05:00
|
|
|
let args = std::os::args().iter()
|
2014-05-25 05:17:19 -05:00
|
|
|
.map(|x| x.to_string())
|
2014-05-14 23:39:11 -05:00
|
|
|
.collect::<Vec<_>>();
|
|
|
|
std::os::set_exit_status(driver::main_args(args.as_slice()));
|
2013-08-22 04:41:33 -05:00
|
|
|
}
|