about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-07-26Rollup merge of #62828 - nikic:fadd-mul-reductions, r=eddybMazdak Farrokhzad-52/+26
Remove vector fadd/fmul reduction workarounds The bugs that this was working around have been fixed in LLVM 9. r? @gnzlbg
2019-07-26Rollup merge of #62801 - bjorn3:remove_lower_128bit_ops, r=alexcrichtonMazdak Farrokhzad-375/+0
Remove support for -Zlower-128bit-ops It is broken and unused cc https://github.com/rust-lang/rust/issues/58969 blocked https://github.com/rust-lang-nursery/compiler-builtins/pull/302 (removes definitions of the lang items removed in this PR) r? @alexcrichton
2019-07-26Rollup merge of #62421 - JohnTitor:U007D-master, r=alexcrichtonMazdak Farrokhzad-72/+144
Introduce `as_deref` to Option This is re-submission for #59628. Renames `deref()` to `as_deref()` and adds `deref_mut()` impls and tests. CC #50264 r? @Kimundi (I picked you as you're the previous reviewer.)
2019-07-26Auto merge of #60260 - videolabs:rust_uwp2, r=alexcrichtonbors-3/+3
Add support for UWP targets Hi, This pull request aims at adding support for UWP (Universal Windows Apps) platform. A few notes: - This requires a very recent mingw-w64 version (containing this commit and the previous related ones: https://github.com/mirror/mingw-w64/commit/e8c433c871687a78408ae9b40ab7776577db908d#diff-eefdfbfe9cec5f4ebab88c9a64d423a9) - This was tested using LLVM/clang rather than gcc, and so far it assumes that LLVM/clang will be the native compiler. This is mostly due to the fact that the support for exceptions/stack unwinding for UWP got much more attention in libunwind - The "uwp" part of the target needs support for it in the `cc-rs` & `backtrace-rs` crates. I'll create the MR there right after I submit this one and will link everything together, but I'm not sure what's the correct way of dealing with external dependencies in the context of rust - Enabling import libraries and copying them across stages requires a change in cargo, for which I'll open a MR right after I submit this one as well - The i686 stack unwinding is unsupported for now, because LLVM assumes SjLj, while rust seems to assume SEH will be used. I'm unsure how to fix this Also, this is my first encounter with rust, so please bear with my code, it might not feel so idiomatic or even correct :) I'm pretty sure there's a way of doing things in a cleaner way when it comes to win/c.rs, maybe having a UWP & desktop specific modules, and import those conditionally? It doesn't feel right to sprinkle `#[cfg(...)]` all over the place Off course, I'll gladly update anything you see fit (to the extent of my abilities/knowledge :) )! Thanks,
2019-07-25Rollup merge of #62981 - estebank:issue-62843, r=CentrilMazdak Farrokhzad-0/+18
Add note suggesting to borrow a String argument to find Fix #62843.
2019-07-25Rollup merge of #62930 - iluuu1994:test-for-51559, r=oli-obkMazdak Farrokhzad-0/+18
Add test for #51559 Closes #51559
2019-07-25Rollup merge of #62921 - iluuu1994:improve-help-for-method-disambiguation, ↵Mazdak Farrokhzad-0/+92
r=estebank Add method disambiguation help for trait implementation Closes #51046 Closes #40471
2019-07-25Rollup merge of #62887 - estebank:issue-62881, r=petrochenkovMazdak Farrokhzad-0/+95
Make the parser TokenStream more resilient after mismatched delimiter recovery Fix #62881, fix #62895.
2019-07-25Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichtonMazdak Farrokhzad-38/+97
Turn `#[global_allocator]` into a regular attribute macro It was a 99% macro with exception of some diagnostic details. As a result of the change, `#[global_allocator]` now works in nested modules and even in nameless blocks. Fixes https://github.com/rust-lang/rust/issues/44113 Fixes https://github.com/rust-lang/rust/issues/58072
2019-07-25Rollup merge of #62707 - JohnTitor:add-test-for-61922, r=tmandryMazdak Farrokhzad-0/+12
Add tests for overlapping explicitly dropped locals in generators Closes #62686 r? @tmandry
2019-07-25Rollup merge of #60938 - jonas-schievink:doc-include-paths, r=petrochenkovMazdak Farrokhzad-8/+5
rustdoc: make #[doc(include)] relative to the containing file This matches the behavior of other in-source paths like `#[path]` and the `include_X!` macros. Fixes https://github.com/rust-lang/rust/pull/58373#issuecomment-462349380 Also addresses https://github.com/rust-lang/rust/issues/44732#issuecomment-467660239 cc #44732 This is still missing a stdsimd change (https://github.com/jonas-schievink/stdsimd/commit/42ed30e0b5fb5e2d11765b5d1e1f36234af85984), so CI will currently fail. I'll land that change once I get initial feedback for this PR.
2019-07-25Rollup merge of #60066 - sfackler:type-name, r=CentrilMazdak Farrokhzad-13/+8
Stabilize the type_name intrinsic in core::any Stabilize `type_name` in `core::any`. Closes rust-lang/rfcs#1428 FCP completed over there. `RELEASES.md`: Prefer T-libs for categorization.
2019-07-25rustc: codegen: Build import library for all windows targetsHugo Beauzée-Luyssen-3/+3
So far it is assumed that using a DLL as a -l parameter argument is ok, but the assumption doesn't hold when compiling the native code with llvm. In which case, an import library is required, so let's build one This also requires the cargo counterpart to add the import library in the stamp files, at least when compiling libstd. Otherwise, the files don't get uplifted
2019-07-25Add note suggesting to borrow a String argument to findEsteban Küber-0/+18
2019-07-24Stabilize the type_name intrinsic in core::anySteven Fackler-13/+8
Closes rust-lang/rfcs#1428
2019-07-25Rollup merge of #62736 - lqd:polonius_tests3, r=matthewjasperMazdak Farrokhzad-32/+772
Polonius: fix some cases of `killed` fact generation, and most of the `ui` test suite Since basic Polonius functionality was re-enabled by @matthewjasper in #54468, some tests were still failing in the polonius compare-mode. This PR fixes all but one test in the `ui` suite by: - fixing some bugs in the fact generation code, related to the `killed` relation: Polonius would incorrectly reject some NLL-accepted code, because of these missing `killed` facts. - ignoring some tests in the polonius compare-mode: a lot of those manually test the NLL or migrate mode, and the failures were mostly artifacts of the test revisions, e.g. that `-Z polonius` requires full NLLs. Some others were also both failing with NLL and succeeding with Polonius, which we can't encode in tests at the moment. - blessing the output of some tests: whenever Polonius and NLL have basically the same errors, except for diagnostics differences, the Polonius output is blessed. Whenever we've advanced into a less experimental phase, we'll want to revisit these cases (much like we did on the NLL test suite last year) to specifically work on diagnostics. Fact generation changes: - we now kill loans on the destination place of `Call` terminators - we now kill loans on the locals destroyed by `StorageDead` - we now also handle assignments to projections: killing the loans on a either a deref-ed local, or the ones whose `borrowed_place` conflicts with the current place. One failing test remains: an overflow during fact generation, on a case of polymorphic recursion (and which I'll continue investigating later). This adds some tests for the fact generation changes, with some simple Polonius cases similar to the existing smoke tests, but also for some cases encountered in the wild (in the `rand` crate for example). A more detailed write-up is available [here](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) with an explanation for each test failure, the steps taken to resolve it (as a commit in the current PR), NLL and Polonius outputs (and diff), etc. Since they've worked on this before, and we've discussed some of these failures together: r? @matthewjasper
2019-07-25Use Foo instead of raw arraysYuki Okushi-3/+3
2019-07-24Rollup merge of #62917 - estebank:trailing-slash, r=matkladMazdak Farrokhzad-0/+19
Always emit trailing slash error Fix #62913. r? @petrochenkov
2019-07-24Rollup merge of #62916 - Centril:self-in-enum-def, r=oli-obkMazdak Farrokhzad-0/+36
Add test `self-in-enum-definition` Apparently there was no test covering this... r? @oli-obk cc @petrochenkov
2019-07-24Rollup merge of #62890 - ↵Mazdak Farrokhzad-1/+1
fakenine:normalize_use_of_backticks_compiler_messages_p15, r=Centril Normalize use of backticks in compiler messages for libsyntax/* https://github.com/rust-lang/rust/issues/60532
2019-07-24Rollup merge of #62772 - estebank:trait-bound, r=matthewjasperMazdak Farrokhzad-6/+50
Suggest trait bound on type parameter when it is unconstrained Given ``` trait Foo { fn method(&self) {} } fn call_method<T>(x: &T) { x.method() } ``` suggest constraining `T` with `Foo`. Fix #21673, fix #41030.
2019-07-24Add test for #51559Ilija Tovilo-0/+18
Closes #51559
2019-07-24Auto merge of #62908 - ↵bors-26/+26
fakenine:normalize_use_of_backticks_compiler_messages_p17, r=alexreg normalize use of backticks for compiler messages in remaining modules https://github.com/rust-lang/rust/issues/60532
2019-07-24Refer to #50072 re. hack.Mazdak Farrokhzad-2/+2
2019-07-24Demote template check error to a lint for `#[test]` and `#[bench]`Vadim Petrochenkov-6/+14
2019-07-24syntax_ext: Improve and simplify code generated by `#[global_allocator]`Vadim Petrochenkov-4/+6
Instead of ``` mod allocator_abi { /* methods */ } ``` we now generate ``` const _: () = { /* methods */ } ``` and use `std_path` for paths referring to standard library entities. This way we no longer need to generate `use` and `extern crate` imports, and `#[global_allocator]` starts working inside unnamed blocks.
2019-07-24syntax_ext: Reuse built-in attribute template checking for macro attributesVadim Petrochenkov-3/+15
2019-07-24syntax_ext: Turn `#[global_allocator]` into a regular attribute macroVadim Petrochenkov-38/+75
2019-07-24Add test self-in-enum-definitionMazdak Farrokhzad-0/+36
2019-07-24Adjust tests for method disambiguation helpIlija Tovilo-0/+16
2019-07-24Add method disambiguation help for trait implementationIlija Tovilo-0/+76
Closes #51046 Closes #40471
2019-07-23Always emit trailing slash errorEsteban Küber-0/+19
2019-07-23normalize use of backticks for compiler messages in remaining modulesSamy Kacimi-26/+26
https://github.com/rust-lang/rust/issues/60532
2019-07-23review commentsEsteban Küber-0/+0
2019-07-23Fix another caseEsteban Küber-0/+60
2019-07-23Normalize use of backticks in compiler messages for libsyntax/*Samy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-07-23Rollup merge of #62880 - ↵Mark Rousskov-2/+2
fakenine:normalize_use_of_backticks_compiler_messages_p14, r=Centril normalize use of backticks in compiler messages for librustc_allocator https://github.com/rust-lang/rust/issues/60532
2019-07-23Rollup merge of #62869 - matklad:feature-gate, r=Mark-SimulacrumMark Rousskov-0/+17
add rustc_private as a proper language feature gate At the moment, `rustc_private` as a (library) feature exists by accident: `char::is_xid_start`, `char::is_xid_continue` methods in libcore define it. cc https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/How.20to.20declare.20new.20langauge.20feature.3F I don't know if this is at all reasonable, but at least tests seem to pass locally. That probably means that we can remove/rename to something more resonable the feature in libcore in the next release?
2019-07-23Rollup merge of #62842 - JohnTitor:test-for-58887, r=alexregMark Rousskov-0/+53
Add tests for issue-58887 Closes #58887
2019-07-23Rollup merge of #62817 - estebank:variant-sp, r=matthewjasperMark Rousskov-3/+1
Tweak span for variant not found error
2019-07-23Rollup merge of #62804 - lundibundi:help-infer-const-static, r=eddybMark Rousskov-6/+75
rustc_typeck: improve diagnostics for _ const/static declarations This continues https://github.com/rust-lang/rust/pull/62694 and adds type suggestions to const/static declarations with `_` type. r? @eddyb
2019-07-23Rollup merge of #62791 - estebank:type-ascription, r=petrochenkovMark Rousskov-52/+148
Handle more cases of typos misinterpreted as type ascription Fix #60933, #54516. CC #47666, #34255, #48016.
2019-07-23Rollup merge of #62523 - pnkfelix:delay-bug-to-resolve-issue-62203-ice, r=varkorMark Rousskov-0/+72
Delay bug to resolve HRTB ICE Fix #62203
2019-07-23Update testJonas Schievink-8/+5
2019-07-22Make the parser TokenStream more resilient after mismatched delimiter recoveryEsteban Küber-0/+35
2019-07-22normalize use of backticks in compiler messages for librustc_allocatorSamy Kacimi-2/+2
https://github.com/rust-lang/rust/issues/60532
2019-07-22Rollup merge of #62870 - matklad:issue-62863, r=petrochenkovMazdak Farrokhzad-0/+30
fix lexing of comments with many \r closes #62863
2019-07-22Rollup merge of #62853 - ↵Mazdak Farrokhzad-6/+6
fakenine:normalize_use_of_backticks_compiler_messages_p13, r=Centril normalize use of backticks in compiler messages for librustc/hir https://github.com/rust-lang/rust/issues/60532
2019-07-22Rollup merge of #62832 - ↵Mazdak Farrokhzad-4/+4
fakenine:normalize_use_of_backticks_compiler_messages_p12, r=Centril normalize use of backticks in compiler messages for librustc_incremental https://github.com/rust-lang/rust/issues/60532
2019-07-22Rollup merge of #62812 - ↵Mazdak Farrokhzad-15/+15
fakenine:normalize_use_of_backticks_compiler_messages_p11, r=GuillaumeGomez normalize use of backticks in compiler messages for librustc_metadata https://github.com/rust-lang/rust/issues/60532