rust/tests/ui/reachable
2026-01-26 17:34:31 +00:00
..
auxiliary
artificial-block.rs Adjust artificial-block.rs 2024-12-10 11:34:13 +08:00
boolean-negation-in-unreachable-code-7344.rs Move tests/ui/{unreachable-code => reachable} 2025-12-02 18:14:08 +01:00
diverging-expressions-unreachable-code.rs cleaned up some tests 2025-07-10 18:50:35 +05:00
expr_add.rs
expr_add.stderr
expr_again.rs
expr_again.stderr Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
expr_andand.rs
expr_array.rs
expr_array.stderr
expr_assign.rs
expr_assign.stderr Evaluating place expr that is never read from does not diverge 2024-10-05 18:36:47 -04:00
expr_block.rs
expr_block.stderr Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
expr_call.rs
expr_call.stderr
expr_cast.rs don't warn on explicit casts of never to any 2025-08-02 02:03:20 +02:00
expr_if.rs
expr_if.stderr Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
expr_loop.rs
expr_loop.stderr Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
expr_match.rs Consider arm to diverge if guard diverges 2024-12-24 19:12:13 +00:00
expr_match.stderr Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
expr_method.rs
expr_method.stderr
expr_oror.rs
expr_repeat.rs
expr_repeat.stderr
expr_return.rs
expr_return.stderr
expr_return_in_macro.rs
expr_return_in_macro.stderr
expr_struct.rs
expr_struct.stderr
expr_tup.rs
expr_tup.stderr
expr_type.rs
expr_type.stderr Make type_ascribe! not a built-in 2024-03-20 22:28:56 -04:00
expr_unary.rs
expr_unary.stderr Make E0614 a structured error 2025-02-25 16:56:04 +00:00
expr_while.rs
expr_while.stderr
foreign-priv.rs
guard_read_for_never.rs Supress unused_parens lint for guard patterns 2026-01-09 16:15:39 +00:00
issue-948.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
issue-11225-1.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issue-11225-2.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issue-11225-3.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
nested_type_ascription.rs Move tests/ui/{unreachable-code => reachable} 2025-12-02 18:14:08 +01:00
reachable-unnameable-type-alias.rs
README.md
type_ascribe_never_field.rs add one more test for type ascription of never 2025-12-03 14:00:45 +01:00
unreachable-arm.rs
unreachable-arm.stderr Reword the "unreachable pattern" explanations 2024-08-19 21:39:57 +02:00
unreachable-bool-read-7246.rs Move tests/ui/{unreachable-code => reachable} 2025-12-02 18:14:08 +01:00
unreachable-bool-read-7246.stderr Move tests/ui/{unreachable-code => reachable} 2025-12-02 18:14:08 +01:00
unreachable-by-call-arguments-issue-139627.rs Consistent with treating Ctor Call as Struct in liveness analysis 2025-04-14 14:29:14 +08:00
unreachable-code-diverging-expressions.rs cleaned up some tests 2025-07-10 18:50:35 +05:00
unreachable-code-ret.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
unreachable-code-ret.stderr Do not mention -Zmacro-backtrace for std macros that are a wrapper around a compiler intrinsic 2026-01-26 17:34:31 +00:00
unreachable-code.rs
unreachable-code.stderr
unreachable-in-call.rs
unreachable-in-call.stderr
unreachable-loop-patterns.rs remove feature(never_type_fallback) 2025-11-27 22:48:00 +01:00
unreachable-loop-patterns.stderr remove feature(never_type_fallback) 2025-11-27 22:48:00 +01:00
unreachable-try-pattern.rs don't warn on explicit casts of never to any 2025-08-02 02:03:20 +02:00
unreachable-try-pattern.stderr don't warn on explicit casts of never to any 2025-08-02 02:03:20 +02:00
unreachable-variant.rs
unreachable-variant.stderr
unwarned-match-on-never.rs
unwarned-match-on-never.stderr Be far more strict about what we consider to be a read of never 2024-10-05 19:10:47 -04:00

A variety of tests around reachability. These tests in general check two things:

  • that we get unreachable code warnings in reasonable locations;
  • that we permit coercions into ! from expressions which diverge, where an expression "diverges" if it must execute some subexpression of type !, or it has type ! itself.