summary refs log tree commit diff
path: root/src/librustc/middle/astencode.rs
AgeCommit message (Collapse)AuthorLines
2015-01-07use slicing sugarJorge Aparicio-5/+5
2015-01-06Register new snapshotsAlex Crichton-23/+0
Conflicts: src/librbml/lib.rs src/libserialize/json_stage0.rs src/libserialize/serialize_stage0.rs src/libsyntax/ast.rs src/libsyntax/ext/deriving/generic/mod.rs src/libsyntax/parse/token.rs
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-4/+4
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-4/+4
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-07Replace full slice notation with index callsNick Cameron-3/+3
2015-01-05remove AdjustAddEnvJorge Aparicio-15/+0
2015-01-04serialize: Use assoc types + less old_orphan_checkAlex Crichton-0/+23
This commit moves the libserialize crate (and will force the hand of the rustc-serialize crate) to not require the `old_orphan_check` feature gate as well as using associated types wherever possible. Concretely, the following changes were made: * The error type of `Encoder` and `Decoder` is now an associated type, meaning that these traits have no type parameters. * The `Encoder` and `Decoder` type parameters on the `Encodable` and `Decodable` traits have moved to the corresponding method of the trait. This movement alleviates the dependency on `old_orphan_check` but implies that implementations can no longer be specialized for the type of encoder/decoder being implemented. Due to the trait definitions changing, this is a: [breaking-change]
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-1/+1
2014-12-30Remove the AssocSpaceNiko Matsakis-2/+1
2014-12-30Remove the def-id from type parameters. Having this def-id was bad for ↵Niko Matsakis-1/+1
several reasons: 1. Produced more unique types than is necessary. This increases memory consumption. 2. Linking the type parameter to its definition *seems* like a good idea, but it encourages reliance on the bounds listing. 3. It made pretty-printing harder and in particular was causing bad error messages when errors occurred before the `TypeParameterDef` entries were fully stored.
2014-12-30Integrate projection bounds to `ExistentialBounds` but do not use them for ↵Niko Matsakis-4/+6
anything.
2014-12-30Convert to use `Rc<TraitRef>` in object types (finally!).Niko Matsakis-6/+6
2014-12-30Implement associated type projection and normalization.Niko Matsakis-5/+5
2014-12-30Rename `Polytype` to `TypeScheme` to differentiate type schemes (early ↵Niko Matsakis-20/+20
bound) from higher-ranked things (late-bound), which also use the `Poly` prefix.
2014-12-22rollup merge of #19891: nikomatsakis/unique-fn-types-3Alex Crichton-5/+20
Conflicts: src/libcore/str.rs src/librustc_trans/trans/closure.rs src/librustc_typeck/collect.rs src/libstd/path/posix.rs src/libstd/path/windows.rs
2014-12-22Adjust metadata for new fields and enum variants. Yawn.Niko Matsakis-5/+20
2014-12-21Fallout of std::str stabilizationAlex Crichton-3/+3
2014-12-19Implement "perfect forwarding" for HR impls (#19730).Niko Matsakis-4/+4
2014-12-19Centralize on using `Binder` to introduce new binding levels, rather than ↵Niko Matsakis-5/+5
having FnSig carry an implicit binding level. This means that we be more typesafe in general, since things that instantiate bound regions can drop the Binder to reflect that.
2014-12-19Create distinct types for a PolyTraitRef (with bindings) and a normal TraitRef.Niko Matsakis-8/+23
2014-12-17auto merge of #19789 : nick29581/rust/assoc-ufcs2, r=nikomatsakisbors-0/+4
Closes #18433
2014-12-16Path types to associated types with form `T::A`Nick Cameron-0/+4
Closes #18433
2014-12-15Remove all shadowed lifetimes.Niko Matsakis-32/+32
2014-12-13librustc: use unboxed closuresJorge Aparicio-13/+15
2014-12-12Implement the astencode rules for predicates. These don't actually getNiko Matsakis-1/+31
used by trans, but it's easy to do.
2014-12-12Introduce predicates but don't use them.Niko Matsakis-0/+3
2014-12-12Start restructuring to support generalized where clauses etc.Niko Matsakis-1/+1
2014-12-04Move various data structures out of typeck and into ty.Niko Matsakis-40/+39
2014-11-26/*! -> //!Steve Klabnik-69/+51
Sister pull request of https://github.com/rust-lang/rust/pull/19288, but for the other style of block doc comment.
2014-11-20Refactored new CodeExtent type for improved abstraction.Felix S. Klock II-4/+16
(Previously, statically identifiable scopes/regions were solely identified with NodeId's; this refactoring prepares for a future where that 1:1 correspondence does not hold.)
2014-11-19rustc: fix fallout of adding the `'tcx` lifetime to `Ty`.Eduard Burtescu-121/+142
2014-11-19rustc: middle: rename `ty::t` to `Ty` and use it unqualified everywhere.Eduard Burtescu-14/+14
2014-11-18Switch the code to use De Bruijn indices rather than binder-ids.Niko Matsakis-2/+2
2014-11-18Move trans, back, driver, and back into a new crate, rustc_trans. Reduces ↵Niko Matsakis-1/+1
memory usage significantly and opens opportunities for more parallel compilation.
2014-11-17auto merge of #19027 : nick29581/rust/coercions-4, r=alexcrichtonbors-10/+10
The forwards compatible parts of #18645, rebased. Converts implicit coercions from `[T, ..n]` to `&[T]` into explicit references.
2014-11-17Fix fallout from coercion removalNick Cameron-10/+10
2014-11-16fallout from deprecating find_copy and get_copyAlexis Beingessner-2/+1
2014-11-10Use FnvHashMap instead of HashMap in rustcAriel Ben-Yehuda-2/+2
2014-11-07Make TyTrait embed a `TraitRef`, so that when we extend TraitRef, it ↵Niko Matsakis-19/+23
naturally carries over to object types. I wanted to embed an `Rc<TraitRef>`, but I was foiled by the current static rules, which prohibit non-Sync values from being stored in static locations. This means that the constants for `ty_int` and so forth cannot be initialized.
2014-11-06Fallout from collection conventionsAlexis Beingessner-13/+13
2014-11-05auto merge of #18546 : bkoropoff/rust/unboxed-closures-cross-crate, r=nick29581bors-8/+14
This fixes some metadata/AST encoding problems that lead to ICEs. The way this is currently handled will need revisiting if abstract return types are added, as unboxed closure types from extern crates could show up without being inlined into the local crate. Closes #16790 (I think this was fixed earlier by accident and just needed a test case) Closes #18378 Closes #18543 r? @pcwalton
2014-11-03rollup merge of #18506 : nikomatsakis/assoc-type-boundsAlex Crichton-3/+4
2014-11-03rollup merge of #18318 : arielb1/transmute-cleanupAlex Crichton-33/+10
2014-11-03Add a 4th space for associated types defined in a trait (currently unused)Niko Matsakis-1/+2
2014-11-03Restructure AST so that the associated type definition carriesNiko Matsakis-2/+2
bounds like any other "type parameter".
2014-11-03Clean-up transmutes in librustcAriel Ben-Yehuda-33/+10
None of them would break by implementation-defined struct layout, but one would break with strict lifetime aliasing, and the rest are just ugly code.
2014-11-02Treat cross-crate unboxed closure def IDs consistentlyBrian Koropoff-2/+6
Always translate the ID into the local crate ID space since presently the only way to encounter an unboxed closure type from another crate is to inline once of its functions. This may need to change if abstract return types are added. Closes #18543
2014-11-02Fix decoding of unboxed closure kindsBrian Koropoff-6/+8
Closes #18378. Note that cross-crate unboxed closures are still unimplemented and will fail to work currently.
2014-11-01Fix def ID mapping for method defsBrian Koropoff-11/+5
This prevents def IDs with the wrong crate ID from showing up when using UFCS. Closes #18501
2014-11-01Remove FnStyle from DefFn and DefStaticMethodNick Cameron-4/+3