rust/tests/ui/rfcs/rfc-0000-never_patterns
Matthias Krüger 042cc7269c
Rollup merge of #120104 - Nadrieril:never-pat-diverges, r=compiler-errors
never_patterns: Count `!` bindings as diverging

A binding that is a never pattern is not reachable, hence counts as diverging code. This allows in particular `fn foo(!: Void) -> SomeType {}` to typecheck.

r? ``@compiler-errors``
2024-01-22 22:12:07 +01:00
..
120240-async-fn-never-arg.rs Test async fn 2024-01-22 16:24:37 +01:00
120240-async-fn-never-arg.stderr Test async fn 2024-01-22 16:24:37 +01:00
bindings.rs Add more tests 2024-01-10 23:25:27 +01:00
bindings.stderr Add more tests 2024-01-10 23:25:27 +01:00
check.rs Satisfy tidy 2023-12-03 12:25:46 +01:00
check.stderr Satisfy tidy 2023-12-03 12:25:46 +01:00
diverge-causes-unreachable-code.rs Never pattern in let statement diverges 2024-01-22 15:12:57 +01:00
diverge-causes-unreachable-code.stderr Never pattern in let statement diverges 2024-01-22 15:12:57 +01:00
diverges-not.rs Never pattern in function arguments diverges 2024-01-22 15:12:57 +01:00
diverges-not.stderr Never pattern in function arguments diverges 2024-01-22 15:12:57 +01:00
diverges.rs Test async fn 2024-01-22 16:24:37 +01:00
ICE-119271-never-arm-attr-in-guard.rs Don't drop a hir node after lowering 2023-12-26 09:45:54 +01:00
ICE-119271-never-arm-attr-in-guard.stderr Bless tests 2024-01-13 12:46:58 -05:00
macros.rs Document behavior of ! with MbE 2024-01-05 19:24:44 +01:00
parse.rs Check bindings around never patterns 2024-01-09 17:00:24 +01:00
parse.stderr Check bindings around never patterns 2024-01-09 17:00:24 +01:00
typeck.fail.stderr Split-off the passing tests to ensure they pass 2024-01-18 21:15:25 +01:00
typeck.rs Split-off the passing tests to ensure they pass 2024-01-18 21:15:25 +01:00
unreachable.exh_pats.stderr Consistently warn unreachable subpatterns 2024-01-18 17:29:54 +01:00
unreachable.rs Consistently warn unreachable subpatterns 2024-01-18 17:29:54 +01:00