]> git.lizzy.rs Git - rust.git/blob - src/test/ui/return/return-unit-from-diverging.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / return / return-unit-from-diverging.rs
1 // Test that we get the usual error that we'd get for any other return type and not something about
2 // diverging functions not being able to return.
3
4 fn fail() -> ! {
5     return; //~ ERROR in a function whose return type is not
6 }
7
8 fn main() {
9 }