about summary refs log tree commit diff
path: root/src/librustc_passes
AgeCommit message (Collapse)AuthorLines
2016-04-24thread tighter span for closures aroundNiko Matsakis-1/+1
Track the span corresponding to the `|...|` part of the closure.
2016-04-11don't report errors in constants at every use siteOliver Schneider-0/+2
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-3/+3
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-12/+10
2016-04-03check constants even if they are unused in the current crateOliver Schneider-1/+12
2016-03-31librustc_passes: use bug!(), span_bug!()Benjamin Herr-16/+16
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-7/+10
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-7/+7
2016-03-21Expose attached attributes to `FnKind` abstraction so that I can look at ↵Felix S. Klock II-2/+2
them in borrowck.
2016-03-17const_eval: Take just one set of substitutions in lookup_const_by_id.Eduard Burtescu-3/+2
2016-03-17hir, mir: Separate HIR expressions / MIR operands from InlineAsm.Eduard Burtescu-1/+1
2016-03-14Move projection_mode to InferContext rather than SelectionContext to reduce ↵Aaron Turon-4/+12
chance of bugs
2016-03-10simplify const path lookup for constants and associated constantsOliver Schneider-1/+1
2016-03-09Split TyBareFn into TyFnDef and TyFnPtr.Eli Friedman-1/+1
There's a lot of stuff wrong with the representation of these types: TyFnDef doesn't actually uniquely identify a function, TyFnPtr is used to represent method calls, TyFnDef in the sub-expression of a cast isn't correctly reified, and probably some other stuff I haven't discovered yet. Splitting them seems like the right first step, though.
2016-03-06Auto merge of #30884 - durka:inclusive-ranges, r=aturonbors-3/+0
This PR implements [RFC 1192](https://github.com/rust-lang/rfcs/blob/master/text/1192-inclusive-ranges.md), which is triple-dot syntax for inclusive range expressions. The new stuff is behind two feature gates (one for the syntax and one for the std::ops types). This replaces the deprecated functionality in std::iter. Along the way I simplified the desugaring for all ranges. This is my first contribution to rust which changes more than one character outside of a test or comment, so please review carefully! Some of the individual commit messages have more of my notes. Also thanks for putting up with my dumb questions in #rust-internals. - For implementing `std::ops::RangeInclusive`, I took @Stebalien's suggestion from https://github.com/rust-lang/rfcs/pull/1192#issuecomment-137864421. It seemed to me to make the implementation easier and increase type safety. If that stands, the RFC should be amended to avoid confusion. - I also kind of like @glaebhoerl's [idea](https://github.com/rust-lang/rfcs/pull/1254#issuecomment-147815299), which is unified inclusive/exclusive range syntax something like `x>..=y`. We can experiment with this while everything is behind a feature gate. - There are a couple of FIXMEs left (see the last commit). I didn't know what to do about `RangeArgument` and I haven't added `Index` impls yet. Those should be discussed/finished before merging. cc @Gankro since you [complained](https://www.reddit.com/r/rust/comments/3xkfro/what_happened_to_inclusive_ranges/cy5j0yq) cc #27777 #30877 rust-lang/rust#1192 rust-lang/rfcs#1254 relevant to #28237 (tracking issue)
2016-03-03Rename middle::ty::ctxt to TyCtxtJeffrey Seyfried-7/+7
2016-02-27fallout from removing hir::ExprRangeAlex Burka-3/+0
A whole bunch of stuff gets folded into struct handling! Plus, removes an ugly hack from trans and accidentally fixes a bug with constructing ranges from references (see later commits with tests).
2016-02-20make *mut T -> *const T a coercionAriel Ben-Yehuda-1/+2
rather than being implicit quasi-subtyping. Nothing good can come out of quasi-subtyping.
2016-02-14Rename hir::Pat_ and its variantsVadim Petrochenkov-3/+3
2016-02-14Auto merge of #31581 - petrochenkov:patrefact, r=Manishearthbors-3/+3
cc https://github.com/rust-lang/rust/pull/31487#issuecomment-182945101 plugin-[breaking-change] The first commit renames `ast::Pat_` to `ast::PatKind` and uses its variants in enum qualified form. I've also taken the opportunity and renamed `PatKind::Region` into `PatKind::Ref`. The second commit splits `PatKind::Enum` into `PatKind::TupleStruct` and `PatKind::UnitStruct`. So, pattern kinds now correspond to their struct/variant kinds - `Struct`, `TupleStruct` and `UnitStruct`. @nikomatsakis @nrc @arielb1 Are you okay with this naming scheme? An alternative possible naming scheme is `PatKind::StructVariant`, `PatKind::TupleVariant`, `PatKind::UnitVariant` (it's probably closer to the common use, but I like it less). I intend to apply these changes to HIR later, they should not necessarily go in the same nightly with https://github.com/rust-lang/rust/pull/31487 r? @Manishearth
2016-02-13Auto merge of #31588 - soltanmm:layer, r=nikomatsakisbors-3/+3
<sup>**context:** moving back to a layered approach to type checking.</sup> It looks like they'd not ended up tightly coupled in the time one was owned by the other. Every instance outside of `FnCtxt.inh` was from an `InferCtxt` created and dropped in the same function body. This conflicts slightly with #30652, but there too it looks like the `FulfillmentContext` is from an `InferCtxt` that is created and dropped within the same function body (across one call to a module-private function). That said, I heard that the PR that originally moved `FulfillmentContext` into `InferCtxt` was big, which leaves me concerned that I'm missing something. r? @nikomatsakis
2016-02-13Rename ast::Pat_ and its variantsVadim Petrochenkov-3/+3
2016-02-13Auto merge of #31524 - jonas-schievink:autoderef, r=steveklabnikbors-19/+19
2016-02-12Autoderef in librustc_passesJonas Schievink-19/+19
2016-02-12Auto merge of #30726 - GuillaumeGomez:compile-fail, r=brsonbors-39/+40
r? @brson cc @alexcrichton I still need to add error code explanation test with this, but I can't figure out a way to generate the `.md` files in order to test example source codes. Will fix #27328.
2016-02-11bootstrap: Add a bunch of Cargo.toml filesAlex Crichton-0/+15
These describe the structure of all our crate dependencies.
2016-02-11[breaking-change] don't glob export ast::Mutablity variantsOliver 'ker' Schneider-1/+1
2016-02-11[breaking-change] don't glob export ast::Item_ variantsOliver 'ker' Schneider-2/+2
2016-02-11[breaking-change] don't pub export ast::Stmt_ variantsOliver Schneider-4/+4
2016-02-11[breaking-change] don't glob export ast::Expr_ variantsOliver Schneider-3/+3
2016-02-11[breaking-change] don't glob export ast::Decl_ variantsOliver Schneider-2/+2
2016-02-11Move FulfillmentContext out of InferCtxtMasood Malekghassemi-3/+3
2016-02-07Update long error explanationsGuillaume Gomez-39/+40
2016-02-05Instrument a bunch of tasks that employ the HIR map in one way orNiko Matsakis-5/+12
another and were not previously instrumented.
2016-02-01Replace some aborts with ResultsNick Cameron-8/+8
Fixes #31207 by removing abort_if_new_errors
2016-01-26Auto merge of #31120 - alexcrichton:attribute-deny-warnings, r=brsonbors-2/+3
This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today
2016-01-26Auto merge of #31065 - nrc:ident-correct, r=pnkfelixbors-2/+3
This PR adds some minor error correction to the parser - if there is a missing ident, we recover and carry on. It also makes compilation more robust so that non-fatal errors (which is still most of them, unfortunately) in parsing do not cause us to abort compilation. The effect is that a program with a missing or incorrect ident can get all the way to type checking.
2016-01-24mk: Move from `-D warnings` to `#![deny(warnings)]`Alex Crichton-2/+3
This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today
2016-01-24 Improve the error explanations for check_constAriel Ben-Yehuda-36/+50
Fixes #30705
2016-01-22The war on abort_if_errorsNick Cameron-2/+3
2016-01-21move more checks out of librustcOliver Schneider-0/+1940
2016-01-15move const block checks before lowering stepOliver Schneider-0/+244
this makes sure the checks run before typeck (which might use the constant or const function to calculate an array length) and gives prettier error messages in case of for loops and such (since they aren't expanded yet).