summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-05-20bless test outputPietro Albini-1/+1
2019-05-20disable the ui/const-generics/cannot-infer-type-for-const-param.rs testPietro Albini-0/+6
The test is failing on 1.35.0 stable but that's not important since the ICE happens only with the feature gate enabled, thus it doesn't affect stable. https://github.com/rust-lang/rust/pull/60710#issuecomment-493662676
2019-05-20Add a test for failed inference of const typesvarkor-0/+26
2019-05-20Add a test for invalid const argumentsvarkor-0/+34
2019-05-18bless ui testsPietro Albini-1/+2
2019-05-18Instead of ICEing on incorrect pattern, use delay_span_bugEsteban Küber-0/+25
2019-05-18Use `delay_span_bug` for "Failed to unify obligation"Esteban Küber-0/+51
2019-05-14Appease tidyIgor Matuszewski-2/+2
2019-05-14save-analysis: Add UI testsuiteIgor Matuszewski-0/+42
2019-05-10Force #[unwind(aborts)] in test/codegen/c-variadic.rsJosh Stone-0/+6
2019-05-10Revert "Allow a dirty MirBuilt for make_extern and make_method_extern"Josh Stone-2/+2
This reverts commit b4a6f597934f16f89e27058a32a514c9572f148f.
2019-05-10Permit unwinding through FFI by defaultMark Rousskov-0/+2
See #58794 for context.
2019-04-26rustdoc: Remove default keyword from re-exported trait methodsOliver Middleton-15/+62
2019-04-10Update ui testLzu Tao-1/+1
2019-04-08Auto merge of #59724 - oli-obk:const_arg_ice, r=eddybbors-0/+61
Function arguments should never get promoted fixes https://github.com/rust-lang/rust/issues/59469
2019-04-07Only run SIMD tests on x86Oliver Scherer-3/+9
2019-04-07Auto merge of #59119 - cramertj:cx-back, r=withoutboatsbors-25/+25
Future-proof the Futures API cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs r? @withoutboats
2019-04-07Add more regression tests for accidental promotionOliver Scherer-0/+37
2019-04-07Function arguments should never get promotedOliver Scherer-0/+18
2019-04-07Auto merge of #58739 - matthewjasper:more-restrictive-tpb, r=pnkfelixbors-156/+318
More restrictive 2 phase borrows - take 2 Signal lint diagnostic `mutable_borrow_reservation_conflict` when borrow-check finds a 2-phase borrow's reservation overlapping with a shared borrow. (pnkfelix updated description) cc #56254 , #59159 blocks PR #59114 r? @pnkfelix cc @RalfJung @nikomatsakis
2019-04-06Rollup merge of #59696 - michaelwoerister:fix-issue-59137, r=alexcrichtonMazdak Farrokhzad-0/+20
Remove invalid assertion back::link::from add_upstream_rust_crates(). This removes a misplaced assertion. The function containing the assertion is actually only ever called for upstream crates that are not considered for LTO, so we don't care whether upstream code has been merged in by LTO or not. Fixes #59137 r? @alexcrichton
2019-04-06Rollup merge of #58894 - GuillaumeGomez:invalid-lifetime-bounds, r=estebankMazdak Farrokhzad-0/+13
Fix invalid bounds string generation in rustdoc Fixes #58737. Very weird and I'm not sure this is the best fix around. However, trying to fix it beforehand seems overly complicated compared to the gain (in `clean`, it wouldn't change anything since we **have to** return something so that wouldn't work, and in `hir`, I'm afraid I'd break something else for very little gain). Also, I wasn't able to make a small code to reproduce the issue. The only way to test is to document `crossbeam` directly and check the `Scope` struct... r? @QuietMisdreavus
2019-04-05Future-proof the Futures APITaylor Cramer-25/+25
2019-04-05Auto merge of #59500 - crlf0710:boxed-closure-impls, r=cramertjbors-75/+63
Unsized rvalues: implement boxed closure impls. (2nd try) This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.
2019-04-05Include trailing comma in multiline Debug representationDavid Tolnay-168/+168
This commit changes the behavior of Formatter::debug_struct, debug_tuple, debug_list, debug_set, and debug_map to render trailing commas in {:#?} mode, which is the dominant style in modern Rust code. Before: Language { name: "Rust", trailing_commas: false } After: Language { name: "Rust", trailing_commas: true, }
2019-04-05Add regression test for #59137.Michael Woerister-0/+20
2019-04-05Fix expectations on some ui test in nll compare mode.Charles Lew-5/+3
2019-04-05Stabilize boxed_closure_impls in 1.35.0.Charles Lew-2/+0
2019-04-05Remove FnBox specialization of impl FnOnce for Box<impl FnOnce>.Masaki Hara-24/+0
2019-04-05Fix failing tests.Masaki Hara-24/+9
2019-04-05Fix expectations on some ui tests involving FnOnce.Masaki Hara-72/+42
2019-04-05Add tests for boxed_closure_impls.Masaki Hara-0/+61
2019-04-04Auto merge of #59676 - alexcrichton:osx-deadlock, r=sfacklerbors-0/+27
std: Avoid usage of `Once` in `Instant` This commit removes usage of `Once` from the internal implementation of time utilities on OSX and Windows. It turns out that we accidentally hit a deadlock today (#59020) via events that look like: * A thread invokes `park_timeout` * Internally, only on OSX, `park_timeout` calls `Instant::elapsed` * Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize global timer data * Inside of `Once`, it attempts to `park` This means on the same stack frame, when there's contention, we're calling `park` from inside `park_timeout`, causing a deadlock! The solution implemented in this commit was to remove usage of `Once` and instead just do a small dance with atomics. There's no real need we need to guarantee that the global information is only learned once, only that it's only *stored* once. This implementation may have multiple threads invoke `mach_timebase_info`, but only one will store the global information which will amortize the cost for all other threads. A similar fix has been applied to windows to be uniform across our implementations, but looking at the code on Windows no deadlock was possible. This is purely just a consistency update for Windows and in theory a slightly leaner implementation. Closes #59020
2019-04-04Adjust the mutable_borrow_reservation_conflict messageMatthew Jasper-8/+8
We aren't sure if this will become an error or not yet.
2019-04-04unit test for the lint itself, illustrating that it can be controlled by ↵Felix S. Klock II-0/+83
`#[allow(..)]` etc.
2019-04-04update unit test output to reflect change to lint-based diagnostic.Felix S. Klock II-10/+12
2019-04-04Update tests for restrictive two-phase borrowsMatthew Jasper-124/+1
2019-04-04Treat two-phase borrow reservations as mutable accessesMatthew Jasper-33/+233
2019-04-04std: Avoid usage of `Once` in `Instant`Alex Crichton-0/+27
This commit removes usage of `Once` from the internal implementation of time utilities on OSX and Windows. It turns out that we accidentally hit a deadlock today (#59020) via events that look like: * A thread invokes `park_timeout` * Internally, only on OSX, `park_timeout` calls `Instant::elapsed` * Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize global timer data * Inside of `Once`, it attempts to `park` This means on the same stack frame, when there's contention, we're calling `park` from inside `park_timeout`, causing a deadlock! The solution implemented in this commit was to remove usage of `Once` and instead just do a small dance with atomics. There's no real need we need to guarantee that the global information is only learned once, only that it's only *stored* once. This implementation may have multiple threads invoke `mach_timebase_info`, but only one will store the global information which will amortize the cost for all other threads. A similar fix has been applied to windows to be uniform across our implementations, but looking at the code on Windows no deadlock was possible. This is purely just a consistency update for Windows and in theory a slightly leaner implementation. Closes #59020
2019-04-04Rollup merge of #59639 - cuviper:ignore-uninhabited, r=eddybMazdak Farrokhzad-0/+32
Never return uninhabited values at all Functions with uninhabited return values are already marked `noreturn`, but we were still generating return instructions for this. When running with `-C passes=lint`, LLVM prints: Unusual: Return statement in function with noreturn attribute The LLVM manual makes a stronger statement about `noreturn` though: > This produces undefined behavior at runtime if the function ever does dynamically return. We now emit an `abort` anywhere that would have tried to return an uninhabited value. Fixes #48227 cc #7463 #48229 r? @eddyb
2019-04-04Auto merge of #59517 - Zoxc:new-queries, r=oli-obkbors-293/+293
Move query definitions over to the proc macro r? @oli-obk
2019-04-04Rollup merge of #59669 - Centril:lint-pass-macro, r=oli-obkMazdak Farrokhzad-58/+15
Reduce repetition in librustc(_lint) wrt. impl LintPass by using macros r? @oli-obk cc @Zoxc
2019-04-03Never return uninhabited values at allJosh Stone-0/+32
Functions with uninhabited return values are already marked `noreturn`, but we were still generating return instructions for this. When running with `-C passes=lint`, LLVM prints: Unusual: Return statement in function with noreturn attribute The LLVM manual makes a stronger statement about `noreturn` though: > This produces undefined behavior at runtime if the function ever does dynamically return. We now emit an `abort` anywhere that would have tried to return an uninhabited value.
2019-04-03reduce repetition in librustc(_lint) wrt. impl LintPassMazdak Farrokhzad-58/+15
2019-04-03Add test from #59033Guillaume Gomez-0/+6
2019-04-03Fix explicit_predicates_ofGuillaume Gomez-1/+1
2019-04-03Update testsflip1995-57/+38
2019-04-03Fix rebase falloutflip1995-59/+39
2019-04-03Add tests for internal lintsflip1995-0/+345
2019-04-02Rollup merge of #59446 - Aaron1011:fix/debuginfo-overflow, r=oli-obkMazdak Farrokhzad-0/+23
Fix stack overflow when generating debuginfo for 'recursive' type By using 'impl trait', it's possible to create a self-referential type as follows: fn foo() -> impl Copy { foo } This is a function which returns itself. Normally, the signature of this function would be impossible to write - it would look like 'fn foo() -> fn() -> fn() ...' e.g. a function which returns a function, which returns a function... Using 'impl trait' allows us to avoid writing this infinitely long type. While it's useless for practical purposes, it does compile and run However, issues arise when we try to generate llvm debuginfo for such a type. All 'impl trait' types (e.g. ty::Opaque) are resolved when we generate debuginfo, which can lead to us recursing back to the original 'fn' type when we try to process its return type. To resolve this, I've modified debuginfo generation to account for these kinds of weird types. Unfortunately, there's no 'correct' debuginfo that we can generate - 'impl trait' does not exist in debuginfo, and this kind of recursive type is impossible to directly represent. To ensure that we emit *something*, this commit emits dummy debuginfo/type names whenever it encounters a self-reference. In practice, this should never happen - it's just to ensure that we can emit some kind of debuginfo, even if it's not particularly meaningful Fixes #58463