summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2015-12-02Disable the null check elimination passBjörn Steinbrink-1/+25
This pass causes mis-optimizations in some cases and is probably no longer really important for us, so let's disable it for now. Fixes #30081
2015-11-21backport: Fix hygiene regression in patternsVadim Petrochenkov-14/+65
2015-11-04Move test file to run-fail, since it does an unwrapNiko Matsakis-0/+2
2015-11-04Do some slight refactoring, leave the rest for #29436Niko Matsakis-41/+25
2015-11-04Update docs for region inference to reflect current state betterNiko Matsakis-46/+46
2015-11-04Don't "double check" var-sub-var constraints, which are handled inNiko Matsakis-12/+30
expansion already by growing the RHS to be bigger than LHS (all the way to `'static` if necessary). This is needed because contraction doesn't handle givens. Fixes #28934.
2015-11-04remove SupSupConflict, which is now dead codeNiko Matsakis-49/+0
2015-11-04Regression test for #29048. Fixes #29048.Niko Matsakis-0/+21
2015-11-04Remove contraction. The contraction rules predated the notion of anNiko Matsakis-312/+58
empty region, and they complicate region inference to no particular end. They also lead in some cases to spurious errors like #29048 (though in some cases these errors are helpful in tracking down missing constraints).
2015-11-04do not dump extern def-ids with path for nowNiko Matsakis-6/+10
2015-10-28mk: Re-add libgcc_s_seh-1.dll to windows distAlex Crichton-0/+2
Although the compiler itself does not depend on this DLL the `libstdc++-6.dll` that we're shipping does, so we still need to include it.
2015-10-28The `source_did` may not be local, so don't unwrap theNiko Matsakis-2/+28
`as_local_node_id`, instead just compare against `Some(id)`. Fixes #29161.
2015-10-28Add some debug printouts to librustc_privacyNiko Matsakis-3/+12
2015-10-27Auto merge of #28833 - jryans:borrowck-linear-errors, r=pnkfelixbors-8/+38
Change error reporting of conflicting loans to stop earlier after printing an error for a given borrow, instead of proceeding to error on possibly every issued loan. This keeps us down to O(n) errors (for n problem lines), instead of O(n^2) errors in some cases. Fixes #27485.
2015-10-27Auto merge of #26421 - nham:fix_21546, r=pnkfelixbors-15/+110
Fixes #21546.
2015-10-27Auto merge of #26848 - oli-obk:const_fn_const_eval, r=pnkfelixbors-53/+163
this has the funky side-effect of also allowing constant evaluation of function calls to functions that are not `const fn` as long as `check_const` didn't mark that function `NOT_CONST` It's still not possible to call a normal function from a `const fn`, but let statements' initialization value can get const evaluated (this caused the fallout in the overflowing tests) we can now do this: ```rust const fn add(x: usize, y: usize) -> usize { x + y } const ARR: [i32; add(1, 2)] = [5, 6, 7]; ``` also added a test for destructuring in const fn args ```rust const fn i((a, b): (u32, u32)) -> u32 { a + b } //~ ERROR: E0022 ``` This is a **[breaking change]**, since it turns some runtime panics into compile-time errors. This statement is true for ANY improvement to the const evaluator.
2015-10-27Auto merge of #29327 - sanxiyn:argument, r=nrcbors-38/+74
Fix #24114.
2015-10-27Auto merge of #29326 - Charlotteis:patch-1, r=steveklabnikbors-4/+4
The beginning of the work that needs to be done as part of #28835. :sunny:
2015-10-27the const evaluator might run before check_constOliver Schneider-8/+16
So we cannot assume that the function call was marked NOT_CONST by check_const.
2015-10-27Auto merge of #29317 - matklad:clarify-reference, r=steveklabnikbors-5/+5
Rust reference is a bit confusing here, because it does not explicitly mention trait objects. See an example of confusion here https://users.rust-lang.org/t/confusion-about-impls-without-for/3379/2 :) r? @steveklabnik
2015-10-27Auto merge of #29309 - rjbs:doc-comment-sections, r=alexcrichtonbors-37/+35
As displayed before this commit, I found the book confusing in its explanation of `#`-led comments in `rust` blocks. Possibly the biggest confusion was because the many-dashes construct does not become an HR element in the Markdown translator used, so things were not being properly set off. This change should more clearly show the as-rendered content as rendered, and the as-coded content as code.
2015-10-27Auto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichtonbors-0/+12
2015-10-27Auto merge of #29386 - jonas-schievink:codegen-worker-id, r=alexcrichtonbors-3/+7
This makes it easier to tell which thread does how much work. Output now looks like this: ``` time: 0.000; rss: 55MB llvm function passes [0] time: 0.000; rss: 55MB llvm function passes [2] time: 0.000; rss: 55MB llvm function passes [1] time: 0.000; rss: 55MB llvm module passes [0] time: 0.000; rss: 55MB llvm module passes [1] time: 0.000; rss: 55MB llvm module passes [2] time: 0.000; rss: 55MB llvm function passes [3] time: 0.000; rss: 55MB llvm module passes [3] time: 0.000; rss: 55MB codegen passes [1] time: 0.000; rss: 55MB codegen passes [2] time: 0.000; rss: 55MB codegen passes [0] time: 0.000; rss: 56MB codegen passes [1] time: 0.001; rss: 56MB codegen passes [3] ```
2015-10-27Auto merge of #29325 - alexcrichton:revert-trait-accessibility, r=nrcbors-13/+18
These commits revert https://github.com/rust-lang/rust/pull/28504 and add a regression test pointed out by @petrochenkov, it's not immediately clear with the regression that the accessibility check should be removed, so for now preserve the behavior on stable by default. r? @nrc
2015-10-26Auto merge of #29295 - little-dude:rustfmt_librustc_unicode, r=nrcbors-54/+105
I didn't see anything particularly weird here. The last commit has the only changes I'm not 100% sure about. I ignored tables.rs since it's genrated, but I updated the python script that generates it. ?r @nrc
2015-10-26Auto merge of #29274 - thepowersgang:issues-29107-const-unsafe-fn-order, ↵bors-16/+21
r=nikomatsakis This PR switches the implemented ordering from `unsafe const fn` (as was in the original RFC) to `const unsafe fn` (which is what the lang team decided on)
2015-10-26Print the codegen worker # when using time-passesJonas Schievink-3/+7
2015-10-26Auto merge of #29384 - nikomatsakis:mir-not-stable-beta, r=alexcrichtonbors-3/+13
2015-10-26Disable MIR on beta/stable until we've resolved #29227 is resolved.Niko Matsakis-3/+13
2015-10-26Auto merge of #29287 - Ryman:fn_nopat, r=alexcrichtonbors-15/+29
Previously, if you copied a signature from a trait definition such as: ```rust fn foo<'a>(&'a Bar) -> bool {} ``` and moved it into an `impl`, there would be an error message: "unexpected token `'a`" Adding to the error message that a pattern is expected should help users to find the actual problem with using a lifetime here.
2015-10-26test: Add regression test for "source trait is private"Alex Crichton-0/+52
2015-10-26rustfmt librustc_unicodeCorentin Henry-54/+105
2015-10-27Remove NodeArgSeo Sanghyeon-30/+3
2015-10-26Remove use of 'just' in trpl/installing-rust.mdCharlotte Spencer-4/+4
The beginning of the work that needs to be done as part of #28835.
2015-10-26Revert "Remove unnecessary trait accessibility check."Alex Crichton-29/+6
This reverts commit f4f95eb3a9f2c3c38679db84aabbb7cdb46d2641.
2015-10-26Revert "Add UFCS privacy test."Alex Crichton-24/+0
This reverts commit b3e1aca40f889a565bfa2607b82b80fe7cbcefea.
2015-10-26Auto merge of #29310 - mdinger:book_playpen, r=steveklabnikbors-6/+9
Makes rustbook code playpen links follow the style set in https://github.com/rust-lang/rust/pull/28963. This is basically cut and paste from the other one. The link looks better and still works so I assume it's good. ![rustbook](https://cloud.githubusercontent.com/assets/4156987/10717631/7a74f8ae-7b34-11e5-8870-35b5fc2526a4.png) Fixes https://github.com/rust-lang/rust/issues/29308 r? @steveklabnik
2015-10-27Distinguish argument from local variableSeo Sanghyeon-8/+71
2015-10-26Auto merge of #29280 - Ryman:bad_docattr, r=Manishearthbors-1/+1
As is, this attr would lead to the "///" prefix being in the output text.
2015-10-26Auto merge of #29247 - dcarral:missing_word_trpl, r=steveklabnikbors-1/+1
I somehow missed a word behind the numbers while going through this section, don't know what the best approach would be though since "**available** addresses" sounds good to me, too".
2015-10-26Auto merge of #29312 - apasel422:issue-21410, r=alexcrichtonbors-0/+51
Closes #21410. Closes #24972.
2015-10-26reference: clarify implAleksey Kladov-5/+5
Another kind of nominal types in Rust are trait objects, so the following is valid ```rust trait A { } impl A { } ```
2015-10-26Auto merge of #29303 - petrochenkov:unistrimp, r=eddybbors-124/+90
And use `VariantData` instead of `P<VariantData>` in `Item_` and `Variant_` Improvements suggested by @eddyb in https://github.com/rust-lang/rust/pull/28816#discussion_r42483587 and https://github.com/rust-lang/rust/pull/28816#discussion_r42483648 plugin-[breaking-change] r? @eddyb
2015-10-26Auto merge of #29301 - reddraggone9:patch-1, r=alexcrichtonbors-1/+1
Added a single character to fix a typo in a doc comment.
2015-10-26Auto merge of #29306 - alexcrichton:yet-another-windows-dist-fix, r=vadimcnbors-2/+0
We don't need the support libgcc SEH library, but we do need the C++ standard library for running the compiler itself. cc #29208 Closes #29294
2015-10-26Auto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichtonbors-4/+4
2015-10-25Add tests for #21410 and #24972Andrew Paseltiner-0/+51
Closes #21410. Closes #24972.
2015-10-26Auto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichtonbors-1/+1
instead of this panic: ``` thread '<main>' panicked at 'index out of bounds: the len is 1 but the index is 1', src/libcollections/vec.rs:1110 ``` It still panics, just like `-h` does, so it should be okay in this regard.
2015-10-25Auto merge of #29284 - apasel422:tests, r=alexcrichtonbors-0/+203
Closes #22781. Closes #23891. Closes #24956. Closes #25145. Closes #25693. Closes #26095. Closes #26459. Closes #27320. Closes #27895.
2015-10-25Update the playpen link for code in the rust book to agree with rustdoc's ↵mdinger-6/+9
new style