about summary refs log tree commit diff
path: root/src/librustc/metadata
AgeCommit message (Collapse)AuthorLines
2014-06-25auto merge of #15160 : alexcrichton/rust/remove-f128, r=brsonbors-2/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24rustc: Don't register syntax crates twiceAlex Crichton-1/+1
We only need to register them once, and once they're registered twice warnings will start being spewed or worse may happen! Closes #14330
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-1/+1
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-24Remove the quad_precision_float feature gateAlex Crichton-2/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-22Rename ty_param_bounds_and_ty to PolytypeNiko Matsakis-16/+16
2014-06-18Add stability inheritanceAaron Turon-1/+50
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-18Deprecate the bytes!() macro.Simon Sapin-1/+1
Replace its usage with byte string literals, except in `bytes!()` tests. Also add a new snapshot, to be able to use the new b"foo" syntax. The src/etc/2014-06-rewrite-bytes-macros.py script automatically rewrites `bytes!()` invocations into byte string literals. Pass it filenames as arguments to generate a diff that you can inspect, or `--apply` followed by filenames to apply the changes in place. Diffs can be piped into `tip` or `pygmentize -l diff` for coloring.
2014-06-18Remove TraitStore from ty_traitNick Cameron-4/+1
Use ty_rptr/ty_uniq(ty_trait) rather than TraitStore to represent trait types. Also addresses (but doesn't close) #12470. Part of the work towards DST (#12938). [breaking-change] lifetime parameters in `&mut trait` are now invariant. They used to be contravariant.
2014-06-16auto merge of #14900 : alexcrichton/rust/snapshots, r=huonwbors-36/+2
Closes #14898 Closes #14918
2014-06-16auto merge of #14715 : vhbit/rust/ios-pr2, r=alexcrichtonbors-41/+42
2014-06-15Register new snapshotsAlex Crichton-36/+2
2014-06-13Introduce VecPerParamSpace and use it to represent sets of types andNiko Matsakis-98/+172
parameters This involves numerous substeps: 1. Treat Self same as any other parameter. 2. No longer compute offsets for method parameters. 3. Store all generic types (both trait/impl and method) with a method, eliminating odd discrepancies. 4. Stop doing unspeakable things to static methods and instead just use the natural types, now that we can easily add the type parameters from trait into the method's polytype. 5. No doubt some more. It was hard to separate these into distinct commits. Fixes #13564
2014-06-13There should be no metadata to read on iOSValerii Hiora-1/+1
2014-06-12Better dylib skipping based on Alex Crichton codeValerii Hiora-47/+40
2014-06-12Basic iOS supportValerii Hiora-2/+10
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-4/+38
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-16/+18
2014-06-10auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichtonbors-6/+2
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code. The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
2014-06-09rustdoc: Correctly classify enums/typedefsAlex Crichton-0/+13
Both of these items are surfaced as a DefTy, so some extra logic was needed in the decoder module to figure out whether one is actually an enum or whether it's a typedef. Closes #14757
2014-06-09std: Move dynamic_lib from std::unstable to stdBrian Anderson-1/+1
This leaves a deprecated reexport in place temporarily. Closes #1457.
2014-06-09Implement #[plugin_registrar]Keegan McAllister-39/+34
See RFC 22. [breaking-change]
2014-06-08Remove the dead code identified by the new lintJakub Wieczorek-6/+2
2014-06-06rustc: Preserve reachable extern fns with LTOAlex Crichton-0/+49
All rust functions are internal implementation details with respect to the ABI exposed by crates, but extern fns are public components of the ABI and shouldn't be stripped. This commit serializes reachable extern fns to metadata, so when LTO is performed all of their symbols are not stripped. Closes #14500
2014-06-06Rename Iterator::len to countAaron Turon-1/+1
This commit carries out the request from issue #14678: > The method `Iterator::len()` is surprising, as all the other uses of > `len()` do not consume the value. `len()` would make more sense to be > called `count()`, but that would collide with the current > `Iterator::count(|T| -> bool) -> unit` method. That method, however, is > a bit redundant, and can be easily replaced with > `iter.filter(|x| x < 5).count()`. > After this change, we could then define the `len()` method > on `iter::ExactSize`. Closes #14678. [breaking-change]
2014-06-06rustc: Encode argument names for traitsAlex Crichton-0/+2
This ensures that rustdoc can properly document inlined traits across crates. Closes #14670
2014-06-06Move Def out of syntax crate, where it does not belongNiko Matsakis-17/+18
2014-06-06Move subst data structures into subst.rs, fix capitalizationNiko Matsakis-11/+12
2014-06-05Fallout from the libcollections movementAlex Crichton-6/+6
2014-06-03std: Remove generics from Option::expectAlex Crichton-1/+1
This commit removes the <M: Any + Send> type parameter from Option::expect in favor of just taking a hard-coded `&str` argument. This allows this function to move into libcore. Previous code using strings with `expect` will continue to work, but code using this implicitly to transmit task failure will need to unwrap manually with a `match` statement. [breaking-change] Closes #14008
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-5/+5
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-30librustc: Fix snake case errors.Kevin Butler-29/+30
A number of functions/methods have been moved or renamed to align better with rust standard conventions. rustc::back::link::WriteOutputFile => write_output_file rustc::middle::ty::EmptyBuiltinBounds => empty_builtin_bounds rustc::middle::ty::AllBuiltinBounds => all_builtin_bounds rustc::middle::liveness::IrMaps => IrMaps::new rustc::middle::liveness::Liveness => Liveness::new rustc::middle::resolve::NameBindings => NameBindings::new rustc::middle::resolve::PrimitiveTypeTable => PrimitiveTypeTable::new rustc::middle::resolve::Resolver => Resolver::new rustc::middle::trans::datum::Datum => Datum::new rustc::middle::trans::datum::DatumBlock => DatumBlock::new rustc::middle::trans::datum::Rvalue => Rvalue::new rustc::middle::typeck::infer::new_ValsAndBindings => ::infer::unify::ValsAndBindings::new rustc::middle::typeck::infer::region_inference::RegionVarBindings => RegionVarBindings::new [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-23/+17
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-27/+27
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-1/+1
2014-05-25rustdoc: Move inlining to its own moduleAlex Crichton-2/+2
2014-05-25rustc: Encode module attributesAlex Crichton-0/+4
This will allow for rustdoc to pick up the documentation on the other end.
2014-05-25rustdoc: Inline names of function argumentsAlex Crichton-13/+18
2014-05-25rustdoc: Inline argument names of foreign methodsAlex Crichton-0/+40
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-37/+37
[breaking-change]
2014-05-24Get "make check" to work with unused-attributeSteven Fackler-1/+1
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-24Port more stuff to mark used attributesSteven Fackler-9/+3
2014-05-24Add AttrId to Attribute_Steven Fackler-1/+2
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-5/+5
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-25/+46
2014-05-21auto merge of #14320 : kballard/rust/fix_stdlib_inject_attrs, r=alexcrichtonbors-1/+1
The #[phase(syntax,link)] attribute on `extern crate std` needs to be an outer attribute so it can pretty-print properly. Also add `#![no_std]` and `#[feature(phase)]` so compiling the pretty-printed source will work.
2014-05-20Change std inject attributes to outer attributesKevin Ballard-1/+1
The #[phase(syntax,link)] attribute on `extern crate std` needs to be an outer attribute so it can pretty-print properly. Also add `#![no_std]` and `#[feature(phase)]` so compiling the pretty-printed source will work.
2014-05-19rustc: Add official support for weak failureAlex Crichton-1/+29
This commit is part of the ongoing libstd facade efforts (cc #13851). The compiler now recognizes some language items as "extern { fn foo(...); }" and will automatically perform the following actions: 1. The foreign function has a pre-defined name. 2. The crate and downstream crates can only be built as rlibs until a crate defines the lang item itself. 3. The actual lang item has a pre-defined name. This is essentially nicer compiler support for the hokey core-depends-on-std-failure scheme today, but it is implemented the same way. The details are a little more hidden under the covers. In addition to failure, this commit promotes the eh_personality and rust_stack_exhausted functions to official lang items. The compiler can generate calls to these functions, causing linkage errors if they are left undefined. The checking for these items is not as precise as it could be. Crates compiling with `-Z no-landing-pads` will not need the eh_personality lang item, and crates compiling with no split stacks won't need the stack exhausted lang item. For ease, however, these items are checked for presence in all final outputs of the compiler. It is quite easy to define dummy versions of the functions necessary: #[lang = "stack_exhausted"] extern fn stack_exhausted() { /* ... */ } #[lang = "eh_personality"] extern fn eh_personality() { /* ... */ } cc #11922, rust_stack_exhausted is now a lang item cc #13851, libcollections is blocked on eh_personality becoming weak
2014-05-18Include file paths when dumping the list of resolved crates via `debug!`.Felix S. Klock II-2/+18
2014-05-18Fixing rustdoc stage1.Felix S. Klock II-1/+1
See #13983 and #14000. Fix was originally authored by alexcrichton and then rebased a couple times by pnkfelix, most recently atop PR 13954. ---- Regarding the change to librustdoc/lib.rs, to do `map_err` before unwrapping a `TqskResult`: I do not understand how master is passing without this change or something like it, since `Box<Any:Send>` does not implement `Show`. (Is this something that is only a problem for the snapshot stage0 compiler?) Still, the change I have put in here (which was added as part of a rebase after alex's review) seems harmless to me to apply to rustdoc at all stages, since a call to `unwrap` is just going to `fail!` on the err case anyway.
2014-05-15Updates with core::fmt changesAlex Crichton-9/+1
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.