about summary refs log tree commit diff
path: root/src/test/ui/loops
AgeCommit message (Collapse)AuthorLines
2021-03-12Don't show note if `span` is `DUMMY_SP`Henry Boisdequin-0/+33
2021-01-21Do not suggest using a break label when one is already presentEsteban Küber-18/+6
2021-01-21Tweak error for invalid `break expr`Esteban Küber-21/+48
Point at loop head on invalid `break expr`. Suggest removing `expr` or using label if available.
2021-01-21Suggest `'a` when given `a` only when appropriateEsteban Küber-1/+3
When encountering a name `a` that isn't resolved, but a label `'a` is found in the current ribs, only suggest `'a` if this name is the value expression of a `break` statement. Solve FIXME.
2020-12-17Add test case for break expr with misspelled valueDaiki Ihara-2/+28
Update src/test/ui/loops/loop-break-value.rs Co-authored-by: Ivan Tham <pickfire@riseup.net>
2020-12-02Tweak diagnostics on shadowing lifetimes/labelsYuki Okushi-29/+29
2020-05-08Skip tests on emscriptenYuki Okushi-0/+1
2020-05-06Move tests from `test/run-fail` to UIYuki Okushi-0/+8
2020-04-23Moving more build-pass tests to check-passVal Markovic-4/+4
One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277
2020-04-11rustc: Add a warning count upon completionRoccoDev-1/+9
2019-12-14add `#![feature(never_type)]` to tests as neededNiko Matsakis-3/+3
2019-12-14Revert "Remove `#![feature(never_type)]` from tests."Niko Matsakis-14/+16
This reverts commit 8f6197f39f7d468dfc5b2bd41dae4769992a2f83.
2019-11-21Reorganize, bless and add tests for const control flowDylan MacKenzie-9/+9
This creates a new test directory, `ui/consts/control-flow` to hold tests related to control flow in a const context. It also blesses all existing tests with the new error messages, and adds new tests for the `const_if_match` feature.
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-46/+16
Specific labels when referring to "expected" and "found" types
2019-11-21Remove `#![feature(never_type)]` from tests.Mazdak Farrokhzad-19/+17
Also remove `never_type` the feature-gate test.
2019-11-18Surround types with backticks in type errorsEsteban Küber-12/+12
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-32/+2
2019-11-18review comments: tweak prefix stringsEsteban Küber-18/+18
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-5/+5
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+9
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-3/+3
2019-08-09Do not suggest using ! with breakEsteban Küber-4/+1
2019-08-09Tweak mismatched types error on break expressionsEsteban Küber-18/+36
2019-07-17normalize use of backticks in compiler messages for librustc/lintSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-07-06Make WhileTrue into an EarlyLintPass lint.Mazdak Farrokhzad-1/+9
2019-07-05Rollup merge of #62388 - rust-lang:fix-loop-break-mir-generation, r=eddybMazdak Farrokhzad-0/+8
Break out of the correct number of scopes in loops We were incorrectly breaking out of one too many drop scopes when generating MIR for loops and breakable blocks, resulting in use after free and associated borrow checker warnings. This wasn't noticed because the scope that we're breaking out of twice is only used for temporaries that are created for adjustments applied to the loop. Since loops generally propagate coercions to the `break` expressions, the only case we see this is when the type of the loop is a smart pointer to a trait object. Closes #62312
2019-07-04Break out of the correct number of scopes in loopsMatthew Jasper-0/+8
We were incorrectly breaking out of one too many drop scopes when generating MIR for loops and breakable blocks, resulting in use after free and associated borrow checker warnings. This wasn't noticed because the scope that we're breaking out of twice is only used for temporaries that are created for adjustments applied to the loop. Since loops generally propagate coercions to the `break` expressions, the only case we see this is when the type of the loop is a smart pointer to a trait object.
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-4/+4
2019-05-29Update ui test suite to use dynmemoryruins-4/+4
2019-04-22update tests for migrate mode by defaultMatthew Jasper-11/+2
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+1
2019-03-11Update NLL testsVadim Petrochenkov-1/+1
2019-03-11Update testsVadim Petrochenkov-34/+34
2018-12-31Improve type mismatch error messagesYuning Zhang-4/+4
Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.
2018-12-25Remove licensesMark Rousskov-142/+52
2018-11-07Removed `#[rustc_error]` from tests that are all `// compile-pass`.Felix S. Klock II-55/+12
I also added `// skip-codegen` to each one, to address potential concerns that this change would otherwise slow down our test suite spending time generating code for files that are really just meant to be checks of compiler diagnostics. (However, I will say: My preference is to not use `// skip-codegen` if one can avoid it. We can use all the testing of how we drive LLVM that we can get...) (Updated post rebase.)
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+976