Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (12 sloc) 351 Bytes
// build-pass (FIXME(62277): could be check-pass?)
#![allow(dead_code)]
#![allow(unreachable_code)]
// Regression test for issue #39984.
//
// The key here is that the error type of the `Ok` call ought to be
// constrained to `String`, even though it is dead-code.
fn main() {}
fn t() -> Result<(), String> {
return Err("".into());
Ok(())
}
You can’t perform that action at this time.