mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
05287d1e81
Add test for never type fallback in try blocks with `Into<!>` ### Summary Adds UI tests for issue rust-lang/rust#125364, which involves the interaction between never type fallback, try blocks, and `From`/`Into` trait bounds. ### Changes - Added `tests/ui/never_type/try-block-never-type-fallback.rs` - Tests both edition 2021 (where the issue manifests) and edition 2024 (where it's fixed) ### Issue Closes rust-lang/rust#125364 ### Testing ```bash ./x test tests/ui/never_type/try-block-never-type-fallback.rs ``` Both test variants pass: e2021: Correctly fails with expected error e2024: Compiles successfully (check-pass) ### Notes This test documents the edition-dependent behavior of never type fallback in try blocks, as requested in the original issue. cc `@WaffleLapkin`