about summary refs log tree commit diff
path: root/src/test/ui/consts/control-flow
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-739/+0
2022-10-20Update tests to match error message changesb4den-3/+3
2022-10-05do not reverse the expected type and found type for ObligationCauseCode of ↵Yiming Lei-1/+1
IfExpressionWithNoElse this will fix #102397
2022-09-24Note the type when unable to drop values in compile timeDeadbeef-16/+16
2022-02-12bless youDeadbeef-2/+4
2021-10-04Stabilize `const_panic`Jacob Pratt-39/+4
2021-07-29Update testsJonas Schievink-5/+14
2021-06-15Use better error message for hard errors in CTFESmitty-5/+3
Currently the same message is used for hard errors and soft errors. This makes hard errors use a message that indicates the reality of the situation correctly, since usage of the constant is never allowed when there was a hard error evaluating it.
2021-05-30Emit a hard error when a panic occurs during const-evalAaron Hill-5/+2
Previous, a panic during const evaluation would go through the `const_err` lint. This PR ensures that such a panic always causes compilation to fail.
2021-05-12Show macro name in 'this error originates in macro' messageAaron Hill-4/+4
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
2021-04-29remove const_fn feature gate from const testsRalf Jung-1/+0
2021-02-14Fix UI tests and merge `assert_eq` and `assert_ne` internal functionsBenoît du Garreau-4/+1
2021-02-03make const_err a future incompat lintRalf Jung-0/+3
2020-11-09Add `#[cfg(panic = "...")]`David Hewitt-3/+3
2020-09-29Liveness analysis for everybodyTomasz Miąsko-0/+1
Perform liveness analysis for every body instead of limiting it to fns.
2020-06-28Update testsDylan MacKenzie-190/+25
2020-06-28Update testsDylan MacKenzie-846/+126
2020-06-20update testsChristian Poveda-0/+12
2020-06-13Add tests for `const_precise_live_drops`Dylan MacKenzie-9/+49
2020-04-29Bless testsDylan MacKenzie-10/+2
2020-02-09--bless --compare-mode=nllMatthias Prechtl-69/+69
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-10/+14
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-10/+10
2020-01-10Remove unnecessary `const_fn` feature gatesDylan MacKenzie-30/+27
This flag opts out of the min-const-fn checks entirely, which is usually not what we want. The few cases where the flag is still necessary have been annotated.
2020-01-05Add backticks to various diagnosticsvarkor-3/+3
2019-12-13Ensure test actually uses dataflow, not simulationDylan MacKenzie-3/+7
2019-12-13Apply suggestions from reviewDylan MacKenzie-0/+2
2019-12-13Fix grammar in test descriptionecstatic-morse-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-13Bless modified testsDylan MacKenzie-80/+298
2019-12-13Add qualif smoke tests for const loopsDylan MacKenzie-0/+61
2019-12-13Extend control flow basics tests with loopsDylan MacKenzie-9/+52
2019-12-12Require `allow_internal_unstable` for stable min_const_fn using unstable ↵Oliver Scherer-27/+31
features
2019-11-27Combine similar tests for const matchJoshua Nelson-22/+11
See https://github.com/rust-lang/rust/pull/66788#issuecomment-558799307 for context.
2019-11-26Rollup merge of #66788 - ecstatic-morse:const-fn-unreachable, r=CentrilTyler Mandry-0/+21
Allow `Unreachable` terminators through `min_const_fn` checks Resolves #66756. This allows `Unreachable` terminators through the `min_const_fn` checks if `#![feature(const_if_match)]` is enabled. We could probably just allow them with no feature flag, but it seems okay to be conservative here. r? @oli-obk
2019-11-26Remove test for #66758Dylan MacKenzie-6/+0
2019-11-26Add regression test for #66756Dylan MacKenzie-0/+27
2019-11-26Test multiple variantsJoshua Nelson-0/+2
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-25Add wildcard test for const_if_matchJoshua Nelson-0/+19
Closes https://github.com/rust-lang/rust/issues/66758
2019-11-21Reorganize, bless and add tests for const control flowDylan MacKenzie-0/+1245
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.