about summary refs log tree commit diff
path: root/src/librustc/middle/astencode.rs
AgeCommit message (Collapse)AuthorLines
2015-02-16rustc: qualify expressions in check_const for potential promotion.Eduard Burtescu-0/+14
2015-02-16rustc: use FromPrimitive for decoding astencode_tag.Eduard Burtescu-2/+3
2015-02-12Update metadata to reflect that predicates/schemes/trait-defs are now severedNiko Matsakis-12/+1
2015-02-11Added DestructionScope variant to CodeExtent, representing the areaFelix S. Klock II-0/+6
immediately surrounding a node that is a terminating_scope (e.g. statements, looping forms) during which the destructors run (the destructors for temporaries from the execution of that node, that is). Introduced DestructionScopeData newtype wrapper around ast::NodeId, to preserve invariant that FreeRegion and ScopeChain::BlockScope carry destruction scopes (rather than arbitrary CodeExtents). Insert DestructionScope and block Remainder into enclosing CodeExtents hierarchy. Add more doc for DestructionScope, complete with ASCII art. Switch to constructing DestructionScope rather than Misc in a number of places, mostly related to `ty::ReFree` creation, and use destruction-scopes of node-ids at various calls to liberate_late_bound_regions. middle::resolve_lifetime: Map BlockScope to DestructionScope in `fn resolve_free_lifetime`. Add the InnermostDeclaringBlock and InnermostEnclosingExpr enums that are my attempt to clarify the region::Context structure, and that later commmts build upon. Improve the debug output for `CodeExtent` attached to `ty::Region::ReScope`. Loosened an assertion in `rustc_trans::trans::cleanup` to account for `DestructionScope`. (Perhaps this should just be switched entirely over to `DestructionScope`, rather than allowing for either `Misc` or `DestructionScope`.) ---- Even though the DestructionScope is new, this particular commit should not actually change the semantics of any current code.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-1/+1
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-16/+16
2015-02-02Auto merge of #21647 - alfie:suffix-medium, r=alexcrichtonbors-10/+10
2015-02-01Separate out the unboxed closure table into two tables, so that we canNiko Matsakis-58/+39
generate the closure type and closure kind separately.
2015-02-01More deprecating of i/u suffixes in librariesAlfie John-10/+10
2015-01-30Remove the capture mode map and just store the capture mode for individual ↵Niko Matsakis-41/+25
variables. Also add test. Fixes #16749.
2015-01-29Auto merge of #21677 - japaric:no-range, r=alexcrichtonbors-2/+2
Note: Do not merge until we get a newer snapshot that includes #21374 There was some type inference fallout (see 4th commit) because type inference with `a..b` is not as good as with `range(a, b)` (see #21672). r? @alexcrichton
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-2/+2
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29Rollup merge of #21626 - Ms2ger:various-cleanup, r=eddybManish Goregaokar-1/+1
2015-01-28Fix a latent bug in trait dispatch where we sometimes counted associated typesNiko Matsakis-4/+4
when constructing the vtable-index. Not good.
2015-01-28Remove a custom variant of iter::Cloned.Ms2ger-1/+1
2015-01-26Fallout of io => old_ioAlex Crichton-1/+1
2015-01-26librustc: remove unused DefUpvar field.Eduard Burtescu-4/+2
2015-01-26Remove "unboxed" attribute in code referring to new closures.Eduard Burtescu-47/+40
2015-01-24Store a method-from-trait's impl in some cases when it is known.Huon Wilson-0/+22
This allows one to look at an `ExprMethodCall` `foo.bar()` where `bar` is a method in some trait and (sometimes) extract the `impl` that `bar` is defined in, e.g. trait Foo { fn bar(&self); } impl Foo for uint { // <A> fn bar(&self) {} } fn main() { 1u.bar(); // impl_def_id == Some(<A>) } This definitely doesn't handle all cases, but is correct when it is known, meaning it should only be used for certain linting/heuristic purposes; no safety analysis.
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-2/+0
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21rustc: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-2/+0
2015-01-20Kill TraitStoreAriel Ben-Yehuda-11/+0
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