about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2017-10-22Auto merge of #45442 - matthewjasper:const-dynamic-capture-error, r=petrochenkovbors-0/+19
Cleanly error for non-const variable in associated const Not sure if wrapping the whole `visit::walk_impl_item` call is correct. Closes #44239
2017-10-21Auto merge of #45391 - malbarbo:x32-1, r=alexcrichtonbors-0/+1
Update libc and some fixes for x86_64-unknown-linux-gnux32
2017-10-20Auto merge of #45348 - alexcrichton:thinlto-timp, r=michaelwoeristerbors-0/+52
rustc: Add `_imp_` symbols later in compilation On MSVC targets rustc will add symbols prefixed with `_imp_` to LLVM modules to "emulate" dllexported statics as that workaround is still in place after #27438 hasn't been solved otherwise. These statics, however, were getting gc'd by ThinLTO accidentally which later would cause linking failures. This commit updates the location we add such symbols to happen just before codegen to ensure that (a) they're not eliminated by the optimizer and (b) the optimizer doesn't even worry about them. Closes #45347
2017-10-20Fix some tests for linux gnux32Marco A L Barbosa-0/+1
2017-10-20Auto merge of #45359 - arielb1:escaping-borrow, r=eddybbors-2/+41
Fix a few bugs in drop generation This fixes a few bugs in drop generation, one of which causes spurious MIR borrowck errors. Fixes #44832. r? @eddyb
2017-10-20Auto merge of #45319 - michaelwoerister:use-128bit-siphash, r=nikomatsakisbors-10/+10
incr.comp.: Use 128bit SipHash for fingerprinting This PR switches incr. comp. result fingerprinting from 128 bit BLAKE2 to 128 bit SipHash. When we started using BLAKE2 for fingerprinting, the 128 bit version of SipHash was still experimental. Now that it isn't anymore we should be able to get a nice performance boost without significantly increasing collision probability. ~~I'm going to start a try-build for this, so we can gauge the performance impact before merging (hence the `WIP` in the title).~~ EDIT: Performance improvements look as expected. Tests seem to be passing. Fixes #41215.
2017-10-20Auto merge of #45316 - goffrie:exitable-breakable-block, r=nikomatsakisbors-0/+24
Mark block exits as reachable if the block can break. This only happens when desugaring `catch` expressions for now, but regular blocks (in HIR) can be broken from - respect that when doing reachability analysis. Fixes #45124.
2017-10-19Auto merge of #45080 - clippered:issue-44986/fix-windows-ui-path, r=estebankbors-3/+1
Issue 44986/fix windows ui path #44968
2017-10-19Cleanly error for non-const expression in associated constmatthewjasper-0/+19
2017-10-20Rollup merge of #45352 - alexcrichton:emscripten-tests, r=nikomatsakiskennytm-57/+56
test: Update Emscripten failures/passing All tests should now have annotation for *why* they're ignored on emscripten. A few tests no longer need such an annotation as well! Closes #41299
2017-10-19Auto merge of #45232 - zackmdavis:moar_lint_suggestions, r=estebankbors-15/+86
code suggestions for non-shorthand field pattern, no-mangle lints continuing in the spirit of #44942 ![moar_lint_suggestions](https://user-images.githubusercontent.com/1076988/31485011-3b20cc80-aee7-11e7-993d-81267ab77732.png) r? @estebank
2017-10-19Rollup merge of #45326 - cuviper:min-llvm-3.9, r=alexcrichtonkennytm-11/+6
Bump the minimum LLVM to 3.9 Old LLVM bugs are reportedly cropping up harder, but 3.9 seems to be OK. Fixes #45277.
2017-10-19Rollup merge of #44138 - steveklabnik:rustdoc-deprecations, r=QuietMisdreavuskennytm-3/+3
Deprecate several flags in rustdoc Part of #44136 cc @rust-lang/dev-tools @rust-lang/docs This is a very basic PR to start deprecating some flags; `rustdoc` doesn't really have fancy output options like `rustc` does, so I went with `eprintln!`. Happy to change it if people feel that's not appropriate. Also, I have no idea if we can or should write tests here, so I didn't try. If someone feels strongly about it, then let's do it, but given that the only outcome here is a side effect...
2017-10-18Remove two obsolete min-llvm-version testsJosh Stone-3/+0
2017-10-18rustc: Add `_imp_` symbols later in compilationAlex Crichton-0/+52
On MSVC targets rustc will add symbols prefixed with `_imp_` to LLVM modules to "emulate" dllexported statics as that workaround is still in place after #27438 hasn't been solved otherwise. These statics, however, were getting gc'd by ThinLTO accidentally which later would cause linking failures. This commit updates the location we add such symbols to happen just before codegen to ensure that (a) they're not eliminated by the optimizer and (b) the optimizer doesn't even worry about them. Closes #45347
2017-10-18run EndRegion when unwinding otherwise-empty scopesAriel Ben-Yehuda-1/+6
Improves #44832 borrowck-overloaded-index-move-index.rs - fixed borrowck-multiple-captures.rs - still ICE borrowck-issue-2657-1.rs - fixed borrowck-loan-blocks-move.rs - fixed borrowck-move-from-subpath-of-borrowed-path.rs - fixed borrowck-mut-borrow-linear-errors.rs - still ICE borrowck-no-cycle-in-exchange-heap.rs - fixed borrowck-unary-move.rs - fixed borrowck-loan-blocks-move-cc.rs - fixed borrowck-vec-pattern-element-loan.rs - still broken
2017-10-18Auto merge of #44501 - nikomatsakis:issue-44137-non-query-data-in-tcx, r=eddybbors-0/+36
remove or encapsulate the remaining non-query data in tcx I wound up removing the existing cache around inhabitedness since it didn't seem to be adding much value. I reworked const rvalue promotion, but not that much (i.e., I did not split the computation into bits, as @eddyb had tossed out as a suggestion). But it's now demand driven, at least. cc @michaelwoerister -- see the `forbid_reads` change in last commit r? @eddyb -- since the trickiest of this PR is the work on const rvalue promotion cc #44137
2017-10-17test: Update Emscripten failures/passingAlex Crichton-57/+56
All tests should now have annotation for *why* they're ignored on emscripten. A few tests no longer need such an annotation as well! Closes #41299
2017-10-17modify tests to use new flagsteveklabnik-3/+3
2017-10-17look past the next drop for the drop panic targetAriel Ben-Yehuda-5/+17
The previous code would leak data on a drop panic if the immediate next drop was a StorageDead that was followed by another drop.
2017-10-17Rollup merge of #45315 - ↵kennytm-0/+26
zackmdavis:expected_statement_after_outer_attr_after_inner_attr, r=petrochenkov don't issue "expected statement after outer attr." after inner attr. While an inner attribute here is in fact erroneous, that error ("inner attribute is not permitted in this context") successfully gets set earlier; this further admonition is nonsensical. Resolves #45296.
2017-10-17fix generator drop cachingAriel Ben-Yehuda-1/+23
Fixes #45328.
2017-10-17Auto merge of #45311 - goffrie:issue-40003, r=alexcrichtonbors-0/+186
Add the test for #40003. I checked that the test failed to compile on an older nightly (I tried 2017-09-29) and that it compiles against master. Closes #40003.
2017-10-16restructure the public inhabitedness APIs and remove the cacheNiko Matsakis-0/+36
The cache was broken anyhow and this computation doesn't look that expensive. These public accessors could potentially become queries, but we'd have to add some more complex logic around lift. I'd prefer to have some test cases to profile with before doing that. Fixes #44402.
2017-10-16Auto merge of #44857 - toidiu:ak-44493-empty-predicate, r=nikomatsakisbors-0/+23
#44493 add structure for inferred_outlives_of #44493 - add placeholder for the final implementation of inferred_outlives_of - add some placeholder tests
2017-10-16Update the codegen/mainsubprogram tests to min-llvm 4.0Josh Stone-8/+6
The necessary changes were only in upstream LLVM in 4.0, but they were for a while backported to Rust LLVM. Now that Rust LLVM is also 4.0, we can make the test conditional here more accurate.
2017-10-16bolster UI test converage for lint suggestionsZack M. Davis-11/+83
2017-10-16add error to the correct line in unit testtoidiu-3/+2
2017-10-16add a test casetoidiu-0/+24
dont duplicate error codes choose unlikely error code specify error pattern in test
2017-10-16code suggestions for no-mangle lintsZack M. Davis-4/+3
At reviewer's suggestion, we remove the function/static name from the main lint message. While we're correspondingly adjusting the expectations of a compile-fail test, we remove an obsolete FIXME comment, another quantum of progress towards resolving the fabulous metabug #44366.
2017-10-16Auto merge of #45202 - alexcrichton:fix-inline-always, r=michaelwoeristerbors-1/+34
rustc: Handle #[inline(always)] at -O0 This commit updates the handling of `#[inline(always)]` functions at -O0 to ensure that it's always inlined regardless of the number of codegen units used. Closes #45201
2017-10-16Update crate hashes in mir-opt test after changing hash algorithm.Michael Woerister-10/+10
2017-10-16Auto merge of #45297 - matthewjasper:associated-item-namespaces, r=petrochenkovbors-0/+51
Check namespaces when resolving associated items in typeck Closes #35600 Closes #44247 Fixes a "cannot move a value of type..." error in the same case as #44247 but with the associated items swapped.
2017-10-15Mark block exits as reachable if the block can break.Geoffry Song-0/+24
2017-10-16Auto merge of #45283 - alexcrichton:used-mut-nodes, r=arielb1bors-14/+14
rustc: Remove `used_mut_nodes` from `TyCtxt` This updates the borrowck query to return a result, and this result is then used to incrementally check for unused mutable nodes given sets of all the used mutable nodes. Closes #42384
2017-10-15don't issue "expected statement after outer attr." after inner attr.Zack M. Davis-0/+26
While an inner attribute here is in fact erroneous, that error ("inner attribute is not permitted in this context") successfully gets set earlier; this further admonition is nonsensical. Resolves #45296.
2017-10-16Auto merge of #45191 - petrochenkov:yesar, r=Mark-Simulacrumbors-13/+20
rustbuild: Support specifying archiver and linker explicitly With this patch `x.py test` passes without toolchain being in `PATH` if `cc`, `cxx`, `ar`, `linker` and `gdb` are specified in `config.toml` (except for a few `run-make` tests using `nm`). Fixes https://github.com/rust-lang/rust/issues/41821 r? @Mark-Simulacrum
2017-10-15Add test for #40003.Geoffry Song-0/+186
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-13/+20
2017-10-15rustc: Fix some ThinLTO internalizationAlex Crichton-0/+34
First the `addPreservedGUID` function forgot to take care of "alias" summaries. I'm not 100% sure what this is but the current code now matches upstream. Next the `computeDeadSymbols` return value wasn't actually being used, but it needed to be used! Together these should... Closes #45195
2017-10-15Auto merge of #45123 - goffrie:fix-method-unit-call, r=oli-obkbors-13/+93
Provide the full span of method calls to `check_argument_types` ... so that it includes the span of the passed arguments, not just the name of the called method. Fixes #44760.
2017-10-15Check namespaces when resolving associated items in typeckmatthewjasper-0/+51
2017-10-15Auto merge of #45200 - mikhail-m1:match-with-false-edges, r=nikomatsakisbors-0/+25
MIR-borrowck: add false edges to match arms basic fix for https://github.com/rust-lang/rust/issues/45043, should be modified with #45184
2017-10-14rustc: Remove `used_mut_nodes` from `TyCtxt`Alex Crichton-14/+14
This updates the borrowck query to return a result, and this result is then used to incrementally check for unused mutable nodes given sets of all the used mutable nodes. Closes #42384
2017-10-14Auto merge of #45175 - petrochenkov:dyn, r=nikomatsakisbors-2/+74
Implement `dyn Trait` syntax (RFC 2113) cc https://github.com/rust-lang/rust/issues/44662 r? @nikomatsakis
2017-10-14Auto merge of #45162 - chrisvittal:mir-testing, r=nikomatsakisbors-73/+304
Modify MIR testing to require consecutive lines MIR testing now requires that lines be consecutive. To achive this, instead of collecting the expected mir as a string, it is now wrapped in an `ExpectedLine` enum, that is either `Elision` or `Text(T)` where `T: AsRef<str>`. `Text` lines must be matched in order, unless separated by `Elision` lines. Elision occurs lazily, that is, an Elision will skip as few lines as possible. To add a new elision marker. Put a comment containing only "..." and whitespace in any MIR testing block. Like so: ``` // fn write_42(_1: *mut i32) -> bool { // ... // bb0: { // Validate(Acquire, [_1: *mut i32]); // Validate(Release, [_1: *mut i32]); // ... // return; // } // } ``` Right now, all input before the line right after `// START` is elided, and all input after the line right before `// END` is also not tested. Many tests need to be updated. That will follow in the next commit. cc #45153 r? @nikomatsakis
2017-10-14Implement `dyn Trait` syntaxVadim Petrochenkov-2/+74
2017-10-14Auto merge of #45104 - vitiral:incr_auto_assert2, r=michaelwoeristerbors-446/+392
Incremental compilation auto assert (with except) cc @michaelwoerister bors merged part 1, so this is a WIP of part 2 of #45009 -- auto asserting DepNodes depending on the type of node rustc_clean/dirty is attached to Framework: - [x] finish auto-detection for specified DepNodes - [x] finish auto-detection for remaining DepNodes Test Refactors: - [x] consts.rs - [x] enum_constructors.rs - [x] extern_mods.rs - [x] inherent_impls.rs - [x] statics.rs - [x] struct_constructors.rs - ~~**BLOCKED** trait_defs.rs, see FIXME~~ - ~~**BLOCKED** trait_impls.rs~~ - [x] type_defs.rs - [x] enum_defs.rs
2017-10-13Pass the full span for method callsGeoffry Song-13/+93
2017-10-13Auto merge of #45069 - sinkuu:tuple_arg, r=nikomatsakisbors-9/+37
Better error for missing tuple pattern in args #44150 Before: ``` error[E0593]: closure takes 2 arguments but 1 argument is required --> test.rs:5:40 | 5 | let it = v.into_iter().enumerate().map(|i, x| i); | ^^^ -------- takes 2 arguments | | | expected closure that takes 1 argument ``` After: ``` error[E0593]: closure takes 2 arguments but a 2-tuple is required --> test.rs:5:40 | 5 | let it = v.into_iter().enumerate().map(|i, x| i); | ^^^ ------ takes 2 arguments | | | expected closure that takes a 2-tuple ```