summary refs log tree commit diff
path: root/src/librustc/driver
AgeCommit message (Collapse)AuthorLines
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-11/+6
This commit removes superfluous to_string calls from various places
2014-06-24Stabilize version output for rustc and rustdocRobert Buonpastore-10/+23
2014-06-24Implement lint pluginsKeegan McAllister-10/+27
2014-06-24Reindent function call continuations, and other style fixesKeegan McAllister-1/+1
2014-06-24Convert builtin lints to uppercase names for style consistencyKeegan McAllister-2/+2
2014-06-24Use names in Lint structs in an ASCII-case-insensitive wayKeegan McAllister-1/+2
In preparation for the next commit.
2014-06-24Clean up and document the public lint APIKeegan McAllister-1/+1
Also change some code formatting. lint::builtin becomes a sibling of lint::context in order to ensure that lints implemented there use the same public API as lint plugins.
2014-06-24Store the registered lints in the SessionKeegan McAllister-35/+76
2014-06-24Replace enum LintId with an extensible alternativeKeegan McAllister-60/+50
2014-06-24Rename lint::Lint to lint::LintIdKeegan McAllister-3/+3
2014-06-24Move lint.rs out of middleKeegan McAllister-4/+5
We're going to have more modules under lint, and the paths get unwieldy. We also plan to have lints run at multiple points in the compilation pipeline.
2014-06-24auto merge of #14963 : w3ln4/rust/master, r=alexcrichtonbors-4/+8
The aim of these changes is not working out a generic bi-endianness architectures support but to allow people develop for little endian MIPS machines (issue #7190).
2014-06-24Added Mipsel architecture supportPawel Olzacki-4/+8
2014-06-18Add stability inheritanceAaron Turon-2/+5
This commit makes several changes to the stability index infrastructure: * Stability levels are now inherited lexically, i.e., each item's stability level becomes the default for any nested items. * The computed stability level for an item is stored as part of the metadata. When using an item from an external crate, this data is looked up and cached. * The stability lint works from the computed stability level, rather than manual stability attribute annotations. However, the lint still checks only a limited set of item uses (e.g., it does not check every component of a path on import). This will be addressed in a later PR, as part of issue #8962. * The stability lint only applies to items originating from external crates, since the stability index is intended as a promise to downstream crates. * The "experimental" lint is now _allow_ by default. This is because almost all existing crates have been marked "experimental", pending library stabilization. With inheritance in place, this would generate a massive explosion of warnings for every Rust program. The lint should be changed back to deny-by-default after library stabilization is complete. * The "deprecated" lint still warns by default. The net result: we can begin tracking stability index for the standard libraries as we stabilize, without impacting most clients. Closes #13540.
2014-06-18Fallout from TaskBuilder changesAaron Turon-10/+7
This commit brings code downstream of libstd up to date with the new TaskBuilder API.
2014-06-16auto merge of #14715 : vhbit/rust/ios-pr2, r=alexcrichtonbors-22/+29
2014-06-14getopts: format failure messages with `Show`.Huon Wilson-4/+3
This obsoletes the old `to_err_msg` method. Replace println!("Error: {}", failure.to_err_msg()) let string = failure.to_err_msg(); with println!("Error: {}", failure) let string = failure.to_str(); [breaking-change]
2014-06-13librustc: Forbid `transmute` from being called on types whose size isPatrick Walton-0/+3
only known post-monomorphization, and report `transmute` errors before the code is generated for that `transmute`. This can break code that looked like: unsafe fn f<T>(x: T) { let y: int = transmute(x); } Change such code to take a type parameter that has the same size as the type being transmuted to. Closes #12898. [breaking-change]
2014-06-13Dump results of analysis phase as CSVNick Cameron-2/+18
Adds the option -Zsave-analysis which will dump the results of syntax and type checking into CSV files. These can be interpreted by tools such as DXR to provide semantic information about Rust programs for code search, cross-reference, etc. Authored by Nick Cameron and Peter Elmers (@pelmers; including enums, type parameters/generics).
2014-06-12Better dylib skipping based on Alex Crichton codeValerii Hiora-21/+26
2014-06-12Basic iOS supportValerii Hiora-3/+5
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-1/+1
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-1/+1
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-09Implement #[plugin_registrar]Keegan McAllister-28/+42
See RFC 22. [breaking-change]
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-2/+2
2014-06-06Change to_str().to_string() to just to_str()Adolfo OchagavĂ­a-2/+2
2014-06-05Fallout from the libcollections movementAlex Crichton-1/+1
2014-06-01std: Drop Total from Total{Eq,Ord}Alex Crichton-1/+1
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-4/+4
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-5/+5
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-40/+40
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-2/+2
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-27/+27
[breaking-change]
2014-05-24Get "make check" to work with unused-attributeSteven Fackler-38/+40
There's a fair number of attributes that have to be whitelisted since they're either looked for by rustdoc, in trans, or as needed. These can be cleaned up in the future.
2014-05-22auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonwbors-1/+1
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-2/+2
[breaking-change]
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-5/+6
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-31/+59
2014-05-21Change static.rust-lang.org to doc.rust-lang.orgAlex Crichton-1/+1
The new documentation site has shorter urls, gzip'd content, and index.html redirecting functionality.
2014-05-21rustc: improve error messages from wrong --pretty flowgraph use.Huon Wilson-6/+18
This defers to .fatal and .span_fatal for errors (rather than `fail!` which prints the ICE message). It also adds the span lookup when an id doesn't correspond to a block, to show what it is pointing at. It also makes the argument parser slightly looser, so that passing `--pretty flowgraph` recognises the `flowgraph` part and suggests to use an integer.
2014-05-21rustc: ng -> gn, fix a typo in a string.Huon Wilson-2/+1
2014-05-21rustc: rename the lint `level` enum for style.Huon Wilson-3/+3
CamelCase all the way!
2014-05-17auto merge of #14253 : alexcrichton/rust/issue-14221, r=pcwaltonbors-1/+2
This plugs a leak where resolve was treating enums defined in parent modules as in-scope for all children modules when resolving a pattern identifier. This eliminates the code path in resolve entirely. If this breaks any existing code, then it indicates that the variants need to be explicitly imported into the module. Closes #14221
2014-05-16rustc: Stop leaking enum variants into childrenAlex Crichton-1/+2
This plugs a leak where resolve was treating enums defined in parent modules as in-scope for all children modules when resolving a pattern identifier. This eliminates the code path in resolve entirely. If this breaks any existing code, then it indicates that the variants need to be explicitly imported into the module. Closes #14221 [breaking-change]
2014-05-16libgetopts: Remove all uses of `~str` from `libgetopts`Patrick Walton-17/+23
2014-05-15auto merge of #14234 : alexcrichton/rust/rollup, r=alexcrichtonbors-19/+76
Let's try this again!
2014-05-15Graphviz based flow graph pretty-printing.Felix S. Klock II-19/+75
Passing `--pretty flowgraph=<NODEID>` makes rustc print a control flow graph. In pratice, you will also need to pass the additional option: `-o <FILE>` to emit output to a `.dot` file for graphviz. (You can only print the flow-graph for a particular block in the AST.) ---- An interesting implementation detail is the way the code puts both the node index (`cfg::CFGIndex`) and a reference to the payload (`cfg::CFGNode`) into the single `Node` type that is used for labelling and walking the graph. I had once mistakenly thought that I only wanted the `cfg::CFGNode`, but for labelling, you really want the cfg index too, rather than e.g. trying to use the `ast::NodeId` as the label (which breaks down e.g. due to `ast::DUMMY_NODE_ID`). ---- As a drive-by fix, I had to fix `rustc::middle::cfg::construct` interface to reflect changes that have happened on the master branch while I was getting this integrated into the compiler. (The next commit actually adds tests of the `--pretty flowgraph` functionality, so that should ensure that the `rustc::middle::cfg` code does not go stale again.)
2014-05-15Add a crate for missing stubs from libcoreAlex Crichton-0/+1
The core library in theory has 0 dependencies, but in practice it has some in order for it to be efficient. These dependencies are in the form of the basic memory operations provided by libc traditionally, such as memset, memcmp, etc. These functions are trivial to implement and themselves have 0 dependencies. This commit adds a new crate, librlibc, which will serve the purpose of providing these dependencies. The crate is never linked to by default, but is available to be linked to by downstream consumers. Normally these functions are provided by the system libc, but in other freestanding contexts a libc may not be available. In these cases, librlibc will suffice for enabling execution with libcore. cc #10116
2014-05-15Add compiler flag to configure output coloringHanno Braun-4/+24
This adds the flag --color, which allows the user to force coloring or turn it off. The default behavior stays the same as before (colorize, if output goes to tty). Why this is beneficial is explained in issue #12881. Please note that this commit doesn't include any regression tests. I thought about how I'd write a test for this and it doesn't seem to be worth the effort to me for a UI change like this. Fixes #12881.