about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2017-10-25Reword to avoid using either re-assignment or reassignment in errorsCarol (Nichols || Goulding)-18/+18
2017-10-25Auto merge of #45455 - kennytm:print-extern-impl-for-e0119, r=nikomatsakisbors-0/+355
Improve diagnostic of E0119 with extern crate, try to print the conflicting impl. Closes #27403. Closes #23563. Should improve #23980. The diagnostic now looks like: ``` error[E0119]: conflicting implementations of trait `std::convert::Into<_>` for type `GenX<_>`: --> $DIR/issue-27403.rs:15:1 | 15 | / impl<S> Into<S> for GenX<S> { 16 | | fn into(self) -> S { 17 | | self.inner 18 | | } 19 | | } | |_^ | = note: conflicting implementation in crate `core`: - impl<T, U> std::convert::Into<U> for T where U: std::convert::From<T>; error: aborting due to previous error ```
2017-10-24Auto merge of #45401 - zackmdavis:crate_shorthand_visibility_modifier, ↵bors-5/+45
r=nikomatsakis `crate` shorthand visibility modifier cc #45388. r? @nikomatsakis
2017-10-24Auto merge of #44766 - sunjay:lift_generics, r=nikomatsakisbors-6/+5
Move Generics from MethodSig to TraitItem and ImplItem As part of `rust-impl-period/WG-compiler-traits`, we want to "lift" `Generics` from `MethodSig` into `TraitItem` and `ImplItem`. This is in preparation for adding associated type generics. (https://github.com/rust-lang/rust/issues/44265#issuecomment-331172238) Currently this change is only made in the AST. In the future, it may also impact the HIR. (Still discussing) To understand this PR, it's probably best to start from the changes to `ast.rs` and then work your way to the other files to understand the far reaching effects of this change. r? @nikomatsakis
2017-10-23update inherent_impls testsNiko Matsakis-6/+5
Now that we are visiting things in a different order during lowering, adding parameters winds up affecting the HirIds assigned to thinks in the method body, whereas it didn't before. We could fix this by reordering the order in which we visit `generics` during lowering, but this feels very fragile. Seems better to just let typeck tables be dirty here.
2017-10-22`crate` shorthand visibility modifierZack M. Davis-5/+45
With regrets, this breaks rustfmt and rls. This is in the matter of #45388.
2017-10-23Print the conflicting impl on E0119 with external crate.kennytm-0/+355
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