Skip to content

Commit e987343

Browse files
committed
merge diverging-fallback-no-leak into an existing test
1 parent b1efa8e commit e987343

6 files changed

+7
-110
lines changed

tests/ui/editions/never-type-fallback-breaking.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,10 @@ fn fully_apit() -> Result<(), ()> {
7575
//[e2024]~^ error: the trait bound `!: Default` is not satisfied
7676
Ok(())
7777
}
78+
79+
fn return_as_argument() {
80+
//[e2021]~^ error: this function depends on never type fallback being `()`
81+
//[e2021]~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in Rust 2024 and in a future release in all editions!
82+
takes_apit2(return);
83+
//[e2024]~^ error: trait bound `!: Test` is not satisfied
84+
}

tests/ui/never_type/diverging-fallback-no-leak.e2021.stderr

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/ui/never_type/diverging-fallback-no-leak.e2024.stderr

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/ui/never_type/diverging-fallback-no-leak.fallback.stderr

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/ui/never_type/diverging-fallback-no-leak.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)