about summary refs log tree commit diff
path: root/src/librustc/ich
AgeCommit message (Collapse)AuthorLines
2018-03-08Add a variant to ConstVal for storing miri resultsOliver Schneider-0/+24
2018-03-07Merge branch 'incr_attr_queries' of https://github.com/wesleywiser/rust into ↵Alex Crichton-0/+38
update-cargo
2018-03-07Rollup merge of #48698 - ishitatsuyuki:burn-equate, r=nikomatsakisAlex Crichton-4/+0
Remove ty::Predicate::Equate and ty::EquatePredicate (dead code) r? @nikomatsakis I also killed the EquatePredicate subsystem. Does it look fine? Close #48670
2018-03-06Add linkage to TransFnAttrsWesley Wiser-0/+2
Part of #47320
2018-03-06Add target_features to TransFnAttrsWesley Wiser-0/+2
Part of #47320
2018-03-06Remove export_name queryWesley Wiser-0/+2
Part of #47320
2018-03-06Add `inline` to `TransFnAttrs`Wesley Wiser-0/+11
Part of #47320
2018-03-06Add query for trans fn attributesWesley Wiser-0/+21
Part of #47320
2018-03-05Turn features() into a query.Michael Woerister-0/+19
2018-03-04Remove ty::Predicate::Equate and ty::EquatePredicate (dead code)Tatsuyuki Ishi-4/+0
2018-03-02Run Rustfix on librustcManish Goregaokar-2/+2
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-3/+3
2018-03-01introduce `UniverseIndex` into `ParamEnv`Niko Matsakis-0/+10
Always using root environment for now.
2018-02-23Introduce UnpackedKindvarkor-2/+13
This adds an `UnpackedKind` type as a typesafe counterpart to `Kind`. This should make future changes to kinds (such as const generics!) more resilient, as the type-checker should catch more potential issues.
2018-02-09Auto merge of #47802 - bobtwinkles:loop_false_edge, r=nikomatsakisbors-0/+4
[NLL] Add false edges out of infinite loops Resolves #46036 by adding a `cleanup` member to the `FalseEdges` terminator kind. There's also a small doc fix to one of the other comments in `into.rs` which I can pull out in to another PR if desired =) This PR should pass CI but the test suite has been relatively unstable on my system so I'm not 100% sure. r? @nikomatsakis
2018-02-08Add `AutoBorrowMutability`; its like `hir::Mutability` but w/ two-phase ↵Felix S. Klock II-0/+14
borrow info too. Namely, the mutable borrows also carries a flag indicating whether they should support two-phase borrows. This allows us to thread down, from the point of the borrow's introduction, whether the particular adjustment that created it is one that yields two-phase mutable borrows.
2018-02-08Encode (in MIR) whether borrows are explicit in source or arise due to autoref.Felix S. Klock II-1/+19
This is foundation for issue 46747 (limit two-phase borrows to method-call autorefs).
2018-02-05mir: Add TerminatorKind::FalseUnwindbobtwinkles-0/+4
Sometimes a simple goto misses the cleanup/unwind edges. Specifically, in the case of infinite loops such as those introduced by a loop statement without any other out edges. Analogous to TerminatorKind::FalseEdges; this new terminator kind is used when we want borrowck to consider an unwind path, but real control flow should never actually take it.
2018-01-25Rollup merge of #47502 - petrochenkov:label, r=eddybAlex Crichton-1/+6
AST/HIR: Add a separate structure for labels
2018-01-23Auto merge of #45337 - Zoxc:gen-static, r=nikomatsakisbors-1/+9
Immovable generators This adds support for immovable generators which allow you to borrow local values inside generator across suspension points. These are declared using a `static` keyword: ```rust let mut generator = static || { let local = &Vec::new(); yield; local.push(0i8); }; generator.resume(); // ERROR moving the generator after it has resumed would invalidate the interior reference // drop(generator); ``` Region inference is no longer affected by the types stored in generators so the regions inside should be similar to other code (and unaffected by the presence of `yield` expressions). The borrow checker is extended to pick up the slack so interior references still result in errors for movable generators. This fixes #44197, #45259 and #45093. This PR depends on [PR #44917 (immovable types)](https://github.com/rust-lang/rust/pull/44917), I suggest potential reviewers ignore the first commit as it adds immovable types.
2018-01-23Rollup merge of #47635 - Zoxc:remove-attr, r=michaelwoeristerkennytm-16/+7
Remove the IGNORED_ATTR_NAMES thread local
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-1/+9
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2018-01-22AST/HIR: Add a separate structure for labelsVadim Petrochenkov-1/+6
2018-01-21Remove the IGNORED_ATTR_NAMES thread localJohn Kåre Alsaker-16/+7
2018-01-15[incremental] Cache ty::Slice<T> hashesWesley Wiser-2/+23
Fixes #47294
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-1/+0
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2018-01-11Auto merge of #47243 - wesleywiser:incr_fingerprint_encoding, r=michaelwoeristerbors-1/+35
[incremental] Specialize encoding and decoding of Fingerprints This saves the storage space used by about 32 bits per `Fingerprint`. On average, this reduces the size of the `/target/{mode}/incremental` folder by roughly 5% [Full details here](https://gist.github.com/wesleywiser/264076314794fbd6a4c110d7c1adc43e). Fixes #45875 r? @michaelwoerister
2018-01-09[incremental] Specialize encoding and decoding of FingerprintsWesley Wiser-1/+35
This saves the storage space used by about 32 bits per `Fingerprint`. On average, this reduces the size of the `/target/{mode}/incremental` folder by roughly 5%. Fixes #45875
2018-01-04rustc: use {U,I}size instead of {U,I}s shorthands.Eduard-Mihai Burtescu-2/+2
2017-12-24Auto merge of #46896 - arielb1:shadow-scope, r=eddybbors-1/+1
fix debuginfo scoping of let-statements r? @eddyb
2017-12-24Auto merge of #46833 - diwic:7c-abort-ffi, r=arielb1bors-0/+1
Prevent unwinding past FFI boundaries Second attempt to write a patch to solve this. r? @nikomatsakis ~~So, my biggest issue with this patch is the way the patch determines *what* functions should have an abort landing pad (in `construct_fn`). I would ideally have this code match [src/librustc_trans/callee.rs::get_fn](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/callee.rs#L107-L115) but couldn't find an id that returns true for `is_foreign_item`. Also tried `tcx.has_attr("unwind")` with no luck.~~ FIXED Other issues: * llvm.trap is an SIGILL on amd64. Ideally we could use panic-abort's version of aborting which is nicer but we don't want to depend on that library... * ~~Mir inlining is a stub currently.~~ FIXED (no-op) Also, when reviewing please take into account that I'm new to the code and only partially know what I'm doing... and that I've mostly made made matches on `TerminatorKind::Abort` match either `TerminatorKind::Resume` or `TerminatorKind::Unreachable` based on what looked best.
2017-12-22Auto merge of #46842 - michaelwoerister:fingerprint-vec, r=nikomatsakisbors-4/+2
incr.comp.: Use an array instead of a hashmap for storing result hashes. Doing so should result in some of the core tracking components being faster. r? @nikomatsakis
2017-12-22Auto merge of #46779 - Zoxc:par-merge-without-sync, r=arielb1bors-4/+2
Work towards thread safety in rustc This PR is split out from https://github.com/rust-lang/rust/pull/45912. It contains changes which do not require the `sync` module.
2017-12-22Auto merge of #46732 - estebank:silence-recovered-blocks, r=petrochenkovbors-0/+2
Do not emit type errors on recovered blocks When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user. Fix #44579.
2017-12-21Auto merge of #46922 - kennytm:rollup, r=kennytmbors-3/+4
Rollup of 14 pull requests - Successful merges: #46636, #46780, #46784, #46809, #46814, #46820, #46839, #46847, #46858, #46878, #46884, #46890, #46898, #46918 - Failed merges:
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-0/+2
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-22Rollup merge of #46839 - michaelwoerister:faster-span-hashing-2, r=nikomatsakiskennytm-3/+4
incr.comp.: Precompute small hash for filenames to save some work. For each span we hash the filename of the file it points to. Since filenames can be quite long, especially with absolute paths, this PR pre-computes a hash of the filename and we then only hash the hash. r? @nikomatsakis
2017-12-21Refactor code so the call to codemap.files() does not deadlockJohn Kåre Alsaker-4/+2
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-5/+9
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-21fix debuginfo scoping of let-statementsAriel Ben-Yehuda-1/+1
2017-12-21Auto merge of #46754 - cramertj:refactor-arg-impl, r=nikomatsakisbors-1/+0
Refactor argument-position impl Trait Fixes https://github.com/rust-lang/rust/issues/46685, https://github.com/rust-lang/rust/issues/46470 r? @nikomatsakis cc @chrisvittal
2017-12-21Mir: Add Terminatorkind::AbortDavid Henningsson-0/+1
The Abort Terminatorkind will cause an llvm.trap function call to be emitted. Signed-off-by: David Henningsson <diwic@ubuntu.com>
2017-12-20incr.comp.: Replace Fingerprint::zero() with a constant.Michael Woerister-4/+2
2017-12-20Auto merge of #46733 - nikomatsakis:nll-master-to-rust-master-5, r=arielb1bors-3/+21
nll part 5 Next round of changes from the nll-master branch. Extensions: - we now propagate ty-region-outlives constraints out of closures and into their creator when necessary - we fix a few ICEs that can occur by doing liveness analysis (and the resulting normalization) during type-checking - we handle the implicit region bound that assumes that each type `T` outlives the fn body - we handle normalization of inputs/outputs in fn signatures Not included in this PR (will come next): - handling `impl Trait` - tracking causal information - extended errors r? @arielb1
2017-12-19incr.comp.: Precompute small hash for filenames to save some work.Michael Woerister-3/+4
2017-12-15incr.comp.: Revert hashing optimization that caused regression.Michael Woerister-3/+1
2017-12-15Refactor argument-position impl TraitTaylor Cramer-1/+0
2017-12-15add a new RegionKind variant: ReClosureBoundNiko Matsakis-0/+3
This is needed to allow the `ClosureRegionRequirements` to capture types that include regions.
2017-12-15permit `ClosureOutlivesRequirement` to constrain regions or typesNiko Matsakis-3/+18
2017-12-14Auto merge of #45047 - durka:trait-alias, r=petrochenkovbors-0/+2
trait alias infrastructure This will be an implementation of trait aliases (RFC 1733, #41517). Progress so far: - [x] Feature gate - [x] Add to parser - [x] `where` clauses - [x] prohibit LHS type parameter bounds via AST validation https://github.com/rust-lang/rust/pull/45047#discussion_r143575575 - [x] Add to AST and HIR - [x] make a separate PathSource for trait alias contexts https://github.com/rust-lang/rust/pull/45047#discussion_r143353932 - [x] Stub out enough of typeck and resolve to just barely not ICE Postponed: - [ ] Actually implement the alias part - [ ] #21903 - [ ] #24010 I need some pointers on where to start with that last one. The test currently does this: ``` error[E0283]: type annotations required: cannot resolve `_: CD` --> src/test/run-pass/trait-alias.rs:34:16 | 34 | let both = foo(); | ^^^ | = note: required by `foo` ```