about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-05-11regionck: Use methods on RegionCtxt instead of free functions.Eduard Burtescu-381/+353
2016-05-11rustc: Avoid free functions taking &TyCtxt and &InferCtxt.Eduard Burtescu-1003/+765
2016-05-11typeck: Turn everything operating on FnCtxt into a method.Eduard Burtescu-2065/+1914
2016-05-11typeck: Avoid passing &TyCtxt around where possible.Eduard Burtescu-359/+288
2016-05-11typeck: merge CollectCtxt and collect::CollectCtxt.Eduard Burtescu-15/+12
2016-05-11mem_categorization: freely_aliasable doesn't need to take TyCtxt.Eduard Burtescu-5/+4
2016-05-11infer: Turn normalize_associated_type into a method on TyCtxt.Eduard Burtescu-58/+51
2016-05-11infer: Use methods for creating an InferCtxt.Eduard Burtescu-154/+126
2016-05-11rustc: Always refer to TyCtxt as tcx.Eduard Burtescu-143/+143
2016-05-10Add error description for E0455Cristian Oliveira-1/+21
- Adding name attribute to the sample code - Fix description sentences
2016-05-10Doc improvement on std::fmt moduleGuillaume Gomez-0/+38
2016-05-10Auto merge of #33319 - birkenfeld:issue31424, r=jseyfriedbors-5/+37
borrowck: do not suggest to change "&mut self" to "&mut mut self" Matching the snippet string might not be the cleanest, but matching the AST node instead seems to end in a lot of nested `if let`s, so I don't know what's better. Of course it's entirely possible that there is another API altogether that I just don't know of? Fixes #31424.
2016-05-10Improve "since" tag placementGuillaume Gomez-3/+9
2016-05-10mir: don't attempt to promote Unpromotable constant temps.Eduard Burtescu-6/+42
2016-05-10Auto merge of #33488 - eddyb:trans-fixes, r=Aatchbors-11/+44
Fix several -Z orbit crater blockers. Fixes 3 of the issues found by @nikomatsakis' crater run with `-Z orbit` forced on: https://gist.github.com/nikomatsakis/6688c30a0e5d3fed07cc1ebd4efb1412 Two of the regressions seemed to be fixed by #33130 and the remaining two are timeouts.
2016-05-10Delay wrapping Definitions into a RefCell around LocalCrateReader.Ms2ger-19/+23
2016-05-10fix DFS for region error reportingNiko Matsakis-3/+36
This was causing terrible error reports, because the algorithm was incorrectly identifying the constraints.
2016-05-10Make the dep-info-no-analysis regex more robust on Windows.Pavel Sountsov-1/+1
2016-05-10Rename after_ast to after_hir_lowering.Pavel Sountsov-19/+19
2016-05-10Fix funky formatting.Pavel Sountsov-11/+10
2016-05-10Make --emit dep-info work correctly with -Z no-analysis again.Pavel Sountsov-40/+93
Previously, it would attempt to resolve some external crates that weren't necessary for dep-info output. Fixes #33231.
2016-05-10Correct typo in LocalCrateReader::definitions.Ms2ger-4/+4
2016-05-10Store a reference rather than a RefCell in LocalCrateReader.Ms2ger-9/+8
2016-05-10borrowck: do not suggest to change "&mut self" to "&mut mut self"Georg Brandl-5/+37
Matching the snippet string might not be the cleanest, but matching the AST node instead seems to end in a lot of nested `if let`s... Fixes #31424.
2016-05-10Auto merge of #33471 - birkenfeld:issue-33464, r=jseyfriedbors-4/+24
resolve: do not modify span of non-importable name This span modification is probably leftover from a time when import spans were assigned differently. With this change, error spans for the following are properly reported: ``` use abc::one_el; use abc::{a, bbb, cccccc}; use a_very_long_name::{el, el2}; ``` before (spans only): ``` x.rs:3 use abc::one_el; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ (internal compiler error: unprintable span) (internal compiler error: unprintable span) ``` after: ``` x.rs:3 use abc::one_el; ^~~~~~~~~~~ x.rs:4 use abc::{a, bbb, cccccc}; ^ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~~~~ x.rs:5 use a_very_long_name::{el, el2}; ^~ x.rs:5 use a_very_long_name::{el, el2}; ^~~ ``` Fixes: #33464
2016-05-10fix Registry::args for plugins loaded with --extra-pluginsOliver Schneider-3/+6
2016-05-10Auto merge of #33337 - birkenfeld:issue-27842, r=jseyfriedbors-1/+48
typeck: show a note about tuple indexing for erroneous tup[i] Fixes: #27842
2016-05-10Simplify textStefan Schindler-2/+2
2016-05-10Refactor `hir::lowering` APIJeffrey Seyfried-22/+24
2016-05-10Make the remaining functions in `hir::lowering` methods of `LoweringContext`Jeffrey Seyfried-411/+383
2016-05-09Auto merge of #33473 - michaelwoerister:split-cratecontext, r=nikomatsakisbors-495/+541
Preparatory refactorings for collector-driven trans. This is a set of refactorings that allows to do translation item collection and partitioning before LocalCrateContext instances or LLVM modules are generated. As a consequence we can now create LocalCrateContexts already with knowledge of the codegen unit it will be used for. This is a preparation step for driving trans by the results of codegen unit partitioning.
2016-05-10resolve: do not modify span of non-importable nameGeorg Brandl-4/+24
This span modification is probably leftover from a time when import spans were assigned differently. With this change, error spans for the following are properly reported: ``` use abc::one_el; use abc::{a, bbb, cccccc}; use a_very_long_name::{el, el2}; ``` before (spans only): ``` x.rs:3 use abc::one_el; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ (internal compiler error: unprintable span) (internal compiler error: unprintable span) ``` after: ``` x.rs:3 use abc::one_el; ^~~~~~~~~~~ x.rs:4 use abc::{a, bbb, cccccc}; ^ x.rs:4 use abc::{a, bbb, cccccc}; ^~~ x.rs:4 use abc::{a, bbb, cccccc}; ^~~~~~ x.rs:5 use a_very_long_name::{el, el2}; ^~ x.rs:5 use a_very_long_name::{el, el2}; ^~~ ``` Fixes: #33464
2016-05-10Refactor the `hir::lowering::lower_*` functions into methods of ↵Jeffrey Seyfried-1399/+1383
`LoweringContext`
2016-05-10Copy more libraries from local Rust to stage0Anton Blanchard-0/+8
When bootstrapping Rust using a previously built toolchain, I noticed a number of libraries were not copied in. As a result the copied in rustc fails to execute because it can't find all its dependences. Add them into the local_stage0.sh script.
2016-05-10Remove needless `pub`sJeffrey Seyfried-81/+81
2016-05-10Give lowering functions mutable access to the lowering contextJeffrey Seyfried-153/+152
2016-05-10Refactor away method `LoweringContext::diagnostic`Jeffrey Seyfried-9/+3
2016-05-10Remove unused function `lower_opt_bounds`Jeffrey Seyfried-6/+0
2016-05-09Auto merge of #33443 - jseyfried:resolve_ast, r=nrcbors-555/+706
Perform name resolution before and during ast->hir lowering This PR performs name resolution before and during ast->hir lowering instead of in phase 3. r? @nrc
2016-05-09Auto merge of #32900 - alexcrichton:panic2abort, r=nikomatsakisbors-927/+2305
rustc: Implement custom panic runtimes This commit is an implementation of [RFC 1513] which allows applications to alter the behavior of panics at compile time. A new compiler flag, `-C panic`, is added and accepts the values `unwind` or `panic`, with the default being `unwind`. This model affects how code is generated for the local crate, skipping generation of landing pads with `-C panic=abort`. [RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md Panic implementations are then provided by crates tagged with `#![panic_runtime]` and lazily required by crates with `#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic runtime must match the final product, and if the panic strategy is not `abort` then the entire DAG must have the same panic strategy. With the `-C panic=abort` strategy, users can expect a stable method to disable generation of landing pads, improving optimization in niche scenarios, decreasing compile time, and decreasing output binary size. With the `-C panic=unwind` strategy users can expect the existing ability to isolate failure in Rust code from the outside world. Organizationally, this commit dismantles the `sys_common::unwind` module in favor of some bits moving part of it to `libpanic_unwind` and the rest into the `panicking` module in libstd. The custom panic runtime support is pretty similar to the custom allocator support with the only major difference being how the panic runtime is injected (takes the `-C panic` flag into account). Closes #32837
2016-05-09E0061 typo fixTaylor Cramer-1/+1
2016-05-09rustc: Use C++ personalities on MSVCAlex Crichton-200/+336
Currently the compiler has two relatively critical bugs in the implementation of MSVC unwinding: * #33112 - faults like segfaults and illegal instructions will run destructors in Rust, meaning we keep running code after a super-fatal exception has happened. * #33116 - When compiling with LTO plus `-Z no-landing-pads` (or `-C panic=abort` with the previous commit) LLVM won't remove all `invoke` instructions, meaning that some landing pads stick around and cleanups may be run due to the previous bug. These both stem from the flavor of "personality function" that Rust uses for unwinding on MSVC. On 32-bit this is `_except_handler3` and on 64-bit this is `__C_specific_handler`, but they both essentially are the "most generic" personality functions for catching exceptions and running cleanups. That is, thse two personalities will run cleanups for all exceptions unconditionally, so when we use them we run cleanups for **all SEH exceptions** (include things like segfaults). Note that this also explains why LLVM won't optimize away `invoke` instructions. These functions can legitimately still unwind (the `nounwind` attribute only seems to apply to "C++ exception-like unwining"). Also note that the standard library only *catches* Rust exceptions, not others like segfaults and illegal instructions. LLVM has support for another personality, `__CxxFrameHandler3`, which does not run cleanups for general exceptions, only C++ exceptions thrown by `_CxxThrowException`. This essentially ideally matches our use case, so this commit moves us over to using this well-known personality function as well as exception-throwing function. This doesn't *seem* to pull in any extra runtime dependencies just yet, but if it does we can perhaps try to work out how to implement more of it in Rust rather than relying on MSVCRT runtime bits. More details about how this is actually implemented can be found in the changes itself, but this... Closes #33112 Closes #33116
2016-05-09Rollup merge of #33493 - Manishearth:more-diag, r=ManishearthManish Goregaokar-21/+94
r? @GuillaumeGomez
2016-05-09Rollup merge of #33514 - birkenfeld:issue-29503, r=alexcrichtonManish Goregaokar-3/+38
rustdoc: do not strip blanket impls in crate of origin In `impl<T> Trait for T`, the blanket type parameters `T` were recognized as "local" and "not exported", so these impls were thrown out. Now we check if they are generic, and keep them in that case. Fixes: #29503
2016-05-09Rollup merge of #33509 - birkenfeld:issue-30219, r=alexcrichtonManish Goregaokar-1/+1
rustdoc: fix emitting duplicate implementors in .js files The collect() fn checks for double quotes; use them here as well. Fixes: #30219
2016-05-09Rollup merge of #33496 - silvo38:master, r=apasel422Manish Goregaokar-1/+1
Fix minor typo in E0312
2016-05-09Rollup merge of #33480 - birkenfeld:issue-33422, r=steveklabnikManish Goregaokar-59/+61
book: fixup code in error handling tutorial A few oversights happened while porting the example from docopt to getopts. I retraced all the steps, fixing code and description as necessary. Fixes: #33422
2016-05-09Rollup merge of #33474 - frewsxcv:unwrap-err, r=alexcrichtonManish Goregaokar-22/+22
Utilize `Result::unwrap_err` in more places. None
2016-05-09Rollup merge of #33431 - GuillaumeGomez:issue-30416, r=steveklabnikManish Goregaokar-7/+48
Update CSS for future rustdoc merge cc #33382 r? @steveklabnik cc @Manishearth cc @birkenfeld
2016-05-09Rollup merge of #33383 - cramertj:E0509, r=ManishearthManish Goregaokar-1/+95
Add detailed error explanation for E0509 Part of #32777