summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2016-07-03Don't translate vtable methods with Self: Sized bounds.Eduard Burtescu-1/+6
2016-05-21Auto merge of #33752 - mrhota:internal_docs, r=steveklabnikbors-7/+35
Internal docs This PR is a rebase of #30621. That PR can be closed. CC @ticki @Aatch @cyplo
2016-05-21Improve internal documentation and code styleTicki-7/+35
Fix some code layout, remove some unnecessary returns, fix typos, punctuation, and comment consistency.
2016-05-20Rollup merge of #33683 - sanxiyn:paren-span, r=nikomatsakisGuillaume Gomez-1/+5
Preserve span when lowering ExprKind::Paren Fix #33681.
2016-05-20Auto merge of #33553 - alexcrichton:cdylibs, r=brsonbors-5/+10
rustc: Add a new crate type, cdylib This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-19rustc: Add a new crate type, cdylibAlex Crichton-5/+10
This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-19Auto merge of #33694 - arielb1:fuzzy-on-unimplemented, r=nikomatsakisbors-26/+72
implement fuzzy matching in on_unimplemented Fixes #31062 r? @nikomatsakis
2016-05-18Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakisbors-2/+2
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
2016-05-18implement fuzzy matching in on_unimplementedAriel Ben-Yehuda-26/+72
2016-05-18Auto merge of #33476 - nikomatsakis:incr-comp-xcrate, r=mwbors-128/+232
track incr. comp. dependencies across crates This PR refactors the compiler's incremental compilation hashing so that it can track dependencies across crates. The main bits are: - computing a hash representing the metadata for an item we are emitting - we do this by making `MetaData(X)` be the current task while computing metadata for an item - this naturally registers reads from any tables and things that we read for that purpose - we can then hash all the inputs to those tables - tracking when we access metadata - we do this by registering a read of `MetaData(X)` for each foreign item `X` whose metadata we read - hashing metadata from foreign items - we do this by loading up metadata from a file in the incr. comp. directory - if there is no file, we use the SVH for the entire crate There is one very simple test only at this point. The next PR will be focused on expanding out the tests. Note that this is based on top of https://github.com/rust-lang/rust/pull/33228 r? @michaelwoerister
2016-05-19Be smart about span of parenthesized expression in macroSeo Sanghyeon-1/+4
2016-05-18add task for linkingNiko Matsakis-0/+2
In MSVC (at least), linking requires accessing metadata, which generates reads.
2016-05-18fix indentation of session/mod.rsNiko Matsakis-3/+3
2016-05-18add debug info to dep_graphNiko Matsakis-1/+5
2016-05-18nit: use format! instead of iteratorNiko Matsakis-12/+1
2016-05-18allow retracing paths across cratesNiko Matsakis-40/+69
For external crates, we must build up a map that goes from the DefKey to the DefIndex. We do this by iterating over each index that is found in the metadata and loading the associated DefKey.
2016-05-18cleanup dep-graph debugging codeNiko Matsakis-0/+70
Create some re-usable filtering subroutines.
2016-05-18change svh to store a u64Niko Matsakis-46/+22
We used to store a u64 converted to a String for some reason. Now we don't.
2016-05-18identify inputs of `MetaData(X)` nodesNiko Matsakis-9/+18
Generate a second hash file that contains the metadata for an X node.
2016-05-18when encoding, push MetaData(foo) task on stackNiko Matsakis-0/+1
This lets us determine what was used to construct the metadata. Conflicts: src/librustc_metadata/encoder.rs
2016-05-18add a MetaData node and trigger reads from itNiko Matsakis-0/+5
Conflicts: src/librustc_metadata/csearch.rs
2016-05-18ignore dep-graph in resolve and lower_crateNiko Matsakis-1/+10
This got removed at some point, it seems.
2016-05-18thread the DepGraph to session/crate-storeNiko Matsakis-19/+28
This is a [breaking-change] for plugin authors. You must now create a dep-graph earlier.
2016-05-18remove the `Any` bound from `CrateStore`Niko Matsakis-6/+1
This is a [breaking-change] for plugins, which ought by now to have stopped relying on downcasting.
2016-05-18add MetaData DepNode variantNiko Matsakis-0/+6
2016-05-18Auto merge of #33710 - Manishearth:rollup, r=Manishearthbors-2/+34
Rollup of 5 pull requests - Successful merges: #33656, #33666, #33673, #33675, #33695 - Failed merges:
2016-05-18Rollup merge of #33695 - nikomatsakis:spezializes-cache, r=aturonManish Goregaokar-2/+34
introduce a specializes cache This query is frequently used during trait selection and caching the result can be a reasonable performance win. The one case I examined thus far was the mrusty package (v0.5.1), where I saw an improvement in "typeck item bodies" from ~8.3s to ~1.9s. r? @aturon
2016-05-18Auto merge of #33654 - petrochenkov:hirident, r=nrcbors-202/+115
Remove hir::Ident Now when name resolution is done on AST, `hir::Ident` is no longer necessary. See https://github.com/rust-lang/rust/pull/30145 for more details. r? @nrc
2016-05-17Auto merge of #33137 - ↵bors-189/+370
nikomatsakis:issue-32330-lbr-in-return-type-warning-2, r=aturon Warnings for issue #32330 This is an extension of the previous PR that issues warnings in more situations than before. It does not handle *all* cases of #32330 but I believe it issues warnings for all cases I've seen in practice. Before merging I'd like to address: - open a good issue explaining the problem and how to fix it (I have a [draft writeup][]) - work on the error message, which I think is not as clear as it could/should be (suggestions welcome) r? @aturon [draft writeup]: https://gist.github.com/nikomatsakis/631ec8b4af9a18b5d062d9d9b7d3d967
2016-05-17fix stale method namesNiko Matsakis-2/+2
2016-05-17warn for where/return-types that reference regionsNiko Matsakis-1/+89
This is a step towards fixing #32330. The full fix would be a breaking change, so we begin by issuing warnings for scenarios that will break.
2016-05-17refactor: use `select` inside of a probeNiko Matsakis-188/+281
We ought not to be affecting inference state when assembling candidates, so invoke select inside of a probe.
2016-05-17introduce a specializes cacheNiko Matsakis-2/+34
This query is frequently used during trait selection and caching the result can be a reasonable performance win.
2016-05-17Preserve span when lowering ExprKind::ParenSeo Sanghyeon-1/+2
2016-05-17Improve a few errors and fix #33366Jonathan Turner-2/+2
2016-05-16Auto merge of #33491 - arielb1:obligation-jungle, r=nikomatsakisbors-552/+102
Replace the obligation forest with a graph In the presence of caching, arbitrary nodes in the obligation forest can be merged, which makes it a general graph. Handle it as such, using cycle-detection algorithms in the processing. I should do performance measurements sometime. This was pretty much written as a proof-of-concept. Please help me write this in a less-ugly way. I should also add comments explaining what is going on. r? @nikomatsakis
2016-05-16change on_unimplented logicAriel Ben-Yehuda-5/+12
2016-05-16Fix rebaseVadim Petrochenkov-4/+4
2016-05-16lowering: Rename identifiers only when necessaryVadim Petrochenkov-12/+32
Do not rename invalid identifiers, they stop being invalid after renaming
2016-05-16Remove hir::IdentVadim Petrochenkov-189/+82
2016-05-16Auto merge of #33331 - uasi:diag-e0038-typo, r=GuillaumeGomezbors-1/+1
diagnostics: Fix minor typo in E0038
2016-05-15Auto merge of #33505 - petrochenkov:self, r=nrcbors-255/+87
Remove ExplicitSelf from HIR `self` argument is already kept in the argument list and can be retrieved from there if necessary, so there's no need for the duplication. The same changes can be applied to AST, I'll make them in the next breaking batch. The first commit also improves parsing of method declarations and fixes https://github.com/rust-lang/rust/issues/33413. r? @eddyb
2016-05-15Auto merge of #33619 - jonathandturner:improve_structured_errors, r=nikomatsakisbors-2/+2
Batch of improvements to errors for new error format This is a batch of improvements to existing errors to help get the most out of the new error format. * Added labels to primary spans (^^^) for a set of errors that didn't currently have them * Highlight the source blue under the secondary notes for better readability * Move some of the "Note:" into secondary spans+labels * Fix span_label to take &mut instead, which makes it work the same as other methods in that set
2016-05-14Add checks for `self: _` and `self: &_`Vadim Petrochenkov-0/+10
2016-05-14Remove ExplicitSelf from HIRVadim Petrochenkov-255/+77
2016-05-14Rollup merge of #33576 - soltanmm:vtable, r=nikomatsakisManish Goregaokar-102/+221
Plumb inference obligations through selection, take 2 Using a `SnapshotVec` and dumping inferred obligations into `Vtable` variants. r? @nikomatsakis
2016-05-14Rollup merge of #33572 - nagisa:assoc-const-types, r=eddybManish Goregaokar-20/+2
Support references to outer type params for assoc consts Fixes #28809 r? @eddyb
2016-05-14Rollup merge of #33555 - soltanmm:ambiguous-nixon, r=nikomatsakisManish Goregaokar-57/+1
Remove unification despite ambiguity in projection Turns out that closures aren't explicitly considered in `project.rs`, so the ambiguity handling w.r.t. closures can just be removed as the change done in `select.rs` covers it. r? @nikomatsakis
2016-05-13Auto merge of #33538 - Ms2ger:LocalCrateReader, r=arielb1bors-3/+3
Refactor code around LocalCrateReader.
2016-05-13rewrite fuzzy `on_unimplemented` matching to avoid ICEsAriel Ben-Yehuda-181/+33