about summary refs log tree commit diff
path: root/src/librustc/metadata
AgeCommit message (Collapse)AuthorLines
2014-02-13remove duplicate function from std::ptr (is_null, is_not_null, offset, ↵JeremyLetang-2/+1
mut_offset)
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-76/+76
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-12Removed ty_type (previously used to represent *tydesc).Eduard Burtescu-2/+0
2014-02-11metadata -- remove tiny convenience closure that was causing conflicting ↵Niko Matsakis-11/+11
mutable borrows
2014-02-08Make &mut borrows restrict aliasingNiko Matsakis-1/+1
Fixes #11913
2014-02-08Fixed error starting with uppercasemr.Shu-4/+4
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
2014-02-07Removed @self and @Trait.Eduard Burtescu-4/+0
2014-02-05pull extra::{serialize, ebml} into a separate libserialize crateJeff Olson-6/+6
- `extra::json` didn't make the cut, because of `extra::json` required dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`, then `extra::json` could move into `serialize` - `libextra`, `libsyntax` and `librustc` depend on the newly created `libserialize` - The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap` and `TreeSet` for `Encodable`/`Decodable` were moved into the respective modules in `extra` - There is some trickery, evident in `src/libextra/lib.rs` where a stub of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for use in the stage0 build, where the snapshot rustc is still making deriving for `Encodable` and `Decodable` point at extra. Big props to @huonw for help working out the re-export solution for this extra: inline extra::serialize stub fix stuff clobbered in rebase + don't reexport serialize::serialize no more globs in libserialize syntax: fix import of libserialize traits librustc: fix bad imports in encoder/decoder add serialize dep to librustdoc fix failing run-pass tests w/ serialize dep adjust uuid dep more rebase de-clobbering for libserialize fixing tests, pushing libextra dep into cfg(test) fix doc code in extra::json adjust index.md links to serialize and uuid library
2014-02-03Fixing remaining warnings and errors throughoutAlex Crichton-6/+6
2014-02-03rustc: Remove io_error usageAlex Crichton-56/+59
2014-02-01auto merge of #11974 : huonw/rust/no-at-vec, r=pcwaltonbors-142/+168
This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find. I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship. Closes #11967
2014-02-02rustc: Remove the vstore handling of @str and @[].Huon Wilson-2/+0
2014-02-02rustc: remove use of @[].Huon Wilson-19/+20
2014-02-02Changes from the review of the @str PR.Huon Wilson-9/+1
2014-02-02librustc: Remove uses of `token::ident_to_str()` from librustcPatrick Walton-6/+10
2014-02-02librustc: De-`@str` type short namesPatrick Walton-6/+8
2014-02-02librustc: De-`@str` resolvePatrick Walton-2/+2
2014-02-02librustc: Remove a bunch of `@str` from the compiler around metadataPatrick Walton-62/+88
handling
2014-02-02librustc: Fix merge fallout.Patrick Walton-4/+4
2014-02-02libsyntax: Remove all `@str` from the ASTPatrick Walton-2/+2
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-19/+15
2014-02-02libsyntax: Introduce an `InternedString` type to reduce `@str` in thePatrick Walton-22/+29
compiler and use it for attributes
2014-02-01auto merge of #11932 : dmanescu/rust/11741-stability-cross-crate, r=alexcrichtonbors-0/+25
Fixes #11741 Added tests and removed xfail-fast from run-pass/simd-experimental which is now fixed (see #11738).
2014-01-31Handle attributes on cross-crate tuple-structs correctlyDavid Manescu-0/+25
Fixes #11741
2014-01-30Implement default type parameters in generics.Eduard Burtescu-3/+7
2014-01-27Fix bug: metadata for struct constructor function needs to encode infoFelix S. Klock II-0/+2
on its generic type parameters. Test case to follow.
2014-01-27Demote self to an (almost) regular argument and remove the env param.Eduard Burtescu-61/+19
Fixes #10667 and closes #10259.
2014-01-26auto merge of #11787 : alexcrichton/rust/refactor, r=brsonbors-1/+1
It was decided a long, long time ago that libextra should not exist, but rather its modules should be split out into smaller independent libraries maintained outside of the compiler itself. The theory was to use `rustpkg` to manage dependencies in order to move everything out of the compiler, but maintain an ease of usability. Sadly, the work on `rustpkg` isn't making progress as quickly as expected, but the need for dissolving libextra is becoming more and more pressing. Because of this, we've thought that a good interim solution would be to simply package more libraries with the rust distribution itself. Instead of dissolving libextra into libraries outside of the mozilla/rust repo, we can dissolve libraries into the mozilla/rust repo for now. Work on this has been excruciatingly painful in the past because the makefiles are completely opaque to all but a few. Adding a new library involved adding about 100 lines spread out across 8 files (incredibly error prone). The first commit of this pull request targets this pain point. It does not rewrite the build system, but rather refactors large portions of it. Afterwards, adding a new library is as simple as modifying 2 lines (easy, right?). The build system automatically keeps track of dependencies between crates (rust *and* native), promotes binaries between stages, tracks dependencies of installed tools, etc, etc. With this newfound buildsystem power, I chose the `extra::flate` module as the first candidate for removal from libextra. While a small module, this module is relative complex in that is has a C dependency and the compiler requires it (messing with the dependency graph a bit). Albeit I modified more than 2 lines of makefiles to accomodate libflate (the native dependency required 2 extra lines of modifications), but the removal process was easy to do and straightforward. --- Testing-wise, I've cross-compiled, run tests, built some docs, installed, uninstalled, etc. I'm still working out a few kinks, and I'm sure that there's gonna be built system issues after this, but it should be working well for basic use! cc #8784
2014-01-26Move extra::flate to libflateAlex Crichton-1/+1
This is hopefully the beginning of the long-awaited dissolution of libextra. Using the newly created build infrastructure for building libraries, I decided to move the first module out of libextra. While not being a particularly meaty module in and of itself, the flate module is required by rustc and additionally has a native C dependency. I was able to very easily split out the C dependency from rustrt, update librustc, and magically everything gets installed to the right locations and built automatically. This is meant to be a proof-of-concept commit to how easy it is to remove modules from libextra now. I didn't put any effort into modernizing the interface of libflate or updating it other than to remove the one glob import it had.
2014-01-26Removed all instances of XXX in preparation for relaxing of FIXME ruleSalem Talha-3/+3
2014-01-24auto merge of #11750 : bnoordhuis/rust/follow-rustc-symlink, r=thestingerbors-2/+18
Before this commit, rustc looked in `dirname $0`/../lib for libraries but that doesn't work when rustc is invoked through a symlink. This commit makes rustc look in `dirname $(readlink $0)`/../lib, i.e. it first canonicalizes the symlink before walking up the directory tree. Fixes #3632.
2014-01-24auto merge of #11720 : sfackler/rust/macro-export-source, r=alexcrichtonbors-6/+12
The old method of serializing the AST gives totally bogus spans if the expansion of an imported macro causes compilation errors. The best solution seems to be to serialize the actual textual macro definition and load it the same way the std-macros are. I'm not totally confident that getting the source from the CodeMap will always do the right thing, but it seems to work in simple cases.
2014-01-23Redo exported macro serializationSteven Fackler-6/+12
The old method of serializing the AST gives totally bogus spans if the expansion of an imported macro causes compilation errors. The best solution seems to be to serialize the actual textual macro definition and load it the same way the std-macros are. I'm not totally confident that getting the source from the CodeMap will always do the right thing, but it seems to work in simple cases.
2014-01-23Follow symlinks in sysrootBen Noordhuis-2/+18
Before this commit, rustc looked in `dirname $0`/../lib for libraries but that doesn't work when rustc is invoked through a symlink. This commit makes rustc look in `dirname $(readlink $0)`/../lib, i.e. it first canonicalizes the symlink before walking up the directory tree. Fixes #3632.
2014-01-22rustc/metadata: Removed stray debug statementsHong Chulju-4/+1
2014-01-21[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old ↵Simon Sapin-1/+1
from_utf8_owned() behavior
2014-01-21[std::str] Rename from_utf8_opt() to from_utf8(), drop the old from_utf8() ↵Simon Sapin-3/+3
behavior
2014-01-21Remove unnecessary parentheses.Huon Wilson-1/+1
2014-01-20Scan the entire crate for exported macrosSteven Fackler-0/+1
It previously missed anything in an inner module.
2014-01-19auto merge of #11628 : alexcrichton/rust/issue-11593, r=brsonbors-0/+1
Turns out we were just forgetting to encode the privacy for trais, and everything without privacy defaults to public! Closes #11593
2014-01-19syntax: convert ast_map to use a SmallIntMap.Huon Wilson-7/+4
NodeIds are sequential integers starting at zero, so we can achieve some memory savings by just storing the items all in a line in a vector. The occupancy for typical crates seems to be 75-80%, so we're already more efficient than a HashMap (maximum occupancy 75%), not even counting the extra book-keeping that HashMap does.
2014-01-18Disallow implementation of cross-crate priv traitsAlex Crichton-0/+1
Turns out we were just forgetting to encode the privacy for trais, and everything without privacy defaults to public! Closes #11593
2014-01-17auto merge of #11598 : alexcrichton/rust/io-export, r=brsonbors-2/+2
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered) cc #11119
2014-01-17Tweak the interface of std::ioAlex Crichton-2/+2
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
2014-01-17rustc::metadata: Remove trait FileSearchklutzy-111/+95
2014-01-16Load macros from external modulesSteven Fackler-43/+229
2014-01-14auto merge of #11521 : dguenther/rust/hide_libdir_relative, r=alexcrichtonbors-1/+1
Renamed `LIBDIR_RELATIVE` to `CFG_LIBDIR_RELATIVE`. It's not a configurable variable, but it looks out of place without the `CFG_` prefix. Fixes #11420
2014-01-14Renamed LIBDIR_RELATIVE to CFG_LIBDIR_RELATIVEDerek Guenther-1/+1
2014-01-12Removed remnants of `@mut` and `~mut` from comments and the type system.Eduard Burtescu-5/+4
2014-01-11Use the right type for self in methods and remove obsoleted items.Eduard Burtescu-2/+0
Fixes #7411, #10615.