]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-39984.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-39984.rs
CommitLineData
60c5eb7d 1// check-pass
0bf4aa26
XL
2#![allow(dead_code)]
3#![allow(unreachable_code)]
8bb4bdeb
XL
4// Regression test for issue #39984.
5//
6// The key here is that the error type of the `Ok` call ought to be
7// constrained to `String`, even though it is dead-code.
32a655c1 8
8bb4bdeb 9fn main() {}
32a655c1 10
8bb4bdeb
XL
11fn t() -> Result<(), String> {
12 return Err("".into());
13 Ok(())
54a0048b 14}