about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-04-10Update ui testLzu Tao-1/+1
2019-04-09improve unknown enum variant errorsAndy Russell-68/+175
2019-04-09Exclude profiler-generated symbols from MSVC __imp_-symbol workaround.Michael Woerister-0/+12
2019-04-08Rename Waker::new_unchecked to Waker::from_rawTaylor Cramer-1/+1
2019-04-08Add Waker::wake_by_ref and make Waker::wake consume the WakerTaylor Cramer-12/+28
2019-04-08Update test cases for changes to error messagesIsaac Whitfield-12/+3
2019-04-08Add must_use annotations to Result::is_ok and is_errAlex Gaynor-1/+1
2019-04-08Merge remote-tracking branch 'origin/master'rchaser53-0/+61
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-08Add test demonstrating existing behaviour.David Wood-0/+27
This commit adds a test that demonstrates the compiler's current behaviour when a function attempts to return a value that was unwrapped by a `?` operator when the omission of `?` would have made the code compile.
2019-04-07Only run SIMD tests on x86Oliver Scherer-3/+9
2019-04-07Add test with current behaviour.David Wood-0/+46
This commit adds a test demonstrating the current behaviour when a macro defined in a module with the `#[macro_export]` is imported from the module rather than the crate root.
2019-04-07Improvement for comparision against fnrchaser53-2/+39
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-04Add back the substring testGuillaume Gomez-0/+29
2019-04-04Mark variables captured by reference as mutable correctlyMatthew Jasper-8/+11
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-04tweak unresolved label suggestionAndy Russell-7/+19
Only suggest label names in the same hygiene context, and use a structured suggestion.
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-03Improve wordingYuki OKUSHI-17/+17