Jonas Schievink
550948c553
Update tests
2021-07-29 23:21:54 +02:00
Smitty
4fe4ff95f6
Use better error message for hard errors in CTFE
...
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-06-15 19:16:10 -04:00
Aaron Hill
2779fc1c47
Emit a hard error when a panic occurs during const-eval
...
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-30 11:59:54 -05:00
Aaron Hill
0dd9f118d9
Show macro name in 'this error originates in macro' message
...
When there are multiple macros in use, it can be difficult to tell
which one was responsible for producing an error.
2021-05-12 19:03:06 -04:00
Ralf Jung
3752c6bb40
remove const_fn feature gate from const tests
2021-04-29 09:27:45 +02:00
Benoît du Garreau
52197d356c
Fix UI tests and merge assert_eq and assert_ne internal functions
2021-02-14 23:39:31 +01:00
Ralf Jung
8477d352ac
make const_err a future incompat lint
2021-02-03 15:45:43 +01:00
David Hewitt
8d43b3cbb9
Add #[cfg(panic = "...")]
2020-11-09 15:30:49 +00:00
Tomasz Miąsko
924e8aaaf2
Liveness analysis for everybody
...
Perform liveness analysis for every body instead of limiting it to fns.
2020-09-29 23:45:31 +02:00
Dylan MacKenzie
d84f0c8d32
Update tests
2020-06-28 10:08:12 -07:00
Dylan MacKenzie
d6139f76c0
Update tests
2020-06-28 10:08:10 -07:00
Christian Poveda
935516803e
update tests
2020-06-20 20:38:57 +00:00
Dylan MacKenzie
2dcf7dbb86
Add tests for const_precise_live_drops
2020-06-13 11:05:13 -07:00
Dylan MacKenzie
0592976f7e
Bless tests
2020-04-29 12:18:30 -07:00
Matthias Prechtl
7b555178ae
--bless --compare-mode=nll
2020-02-09 20:43:49 +01:00
Eduard-Mihai Burtescu
4c7eb59e81
rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.
2020-02-06 21:46:38 +02:00
Eduard-Mihai Burtescu
f6fc80206e
rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.
2020-02-06 21:32:07 +02:00
Dylan MacKenzie
09b5c854de
Remove unnecessary const_fn feature gates
...
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-10 18:51:12 -08:00
varkor
0c2cf07d6e
Add backticks to various diagnostics
2020-01-05 00:17:46 +00:00
Dylan MacKenzie
598bed6f51
Ensure test actually uses dataflow, not simulation
2019-12-13 10:39:15 -08:00
Dylan MacKenzie
2b5ae1cb06
Apply suggestions from review
2019-12-13 10:39:14 -08:00
ecstatic-morse
b3aecd0d55
Fix grammar in test description
...
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-13 10:39:14 -08:00
Dylan MacKenzie
3325671036
Bless modified tests
2019-12-13 10:39:14 -08:00
Dylan MacKenzie
1122404be5
Add qualif smoke tests for const loops
2019-12-13 10:39:14 -08:00
Dylan MacKenzie
99e132db97
Extend control flow basics tests with loops
2019-12-13 10:39:14 -08:00
Oliver Scherer
0b1e08a9f4
Require allow_internal_unstable for stable min_const_fn using unstable features
2019-12-12 10:22:09 +01:00
Joshua Nelson
9617d7c887
Combine similar tests for const match
...
See https://github.com/rust-lang/rust/pull/66788#issuecomment-558799307
for context.
2019-11-27 00:02:04 -05:00
Tyler Mandry
8547ea32db
Rollup merge of #66788 - ecstatic-morse:const-fn-unreachable, r=Centril
...
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-26 17:56:25 -06:00
Dylan MacKenzie
a626bf68b8
Remove test for #66758
2019-11-26 12:13:15 -08:00
Dylan MacKenzie
582affd657
Add regression test for #66756
2019-11-26 11:37:16 -08:00
Joshua Nelson
f1f83ef8f8
Test multiple variants
...
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-26 12:37:55 -05:00
Joshua Nelson
37f440fd9a
Add wildcard test for const_if_match
...
Closes https://github.com/rust-lang/rust/issues/66758
2019-11-25 19:44:35 -05:00
Dylan MacKenzie
5c377f37e4
Reorganize, bless and add tests for const control flow
...
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-21 16:55:13 -08:00