Revert "Auto merge of #86853 - usbalbin:const_try, r=oli-obk"
This reverts commitc6007fdc70, reversing changes made to69c1c6a173.
This commit is contained in:
parent
b6057bf7b7
commit
81bb5a54c3
7 changed files with 8 additions and 58 deletions
|
|
@ -1,23 +0,0 @@
|
|||
// run-pass
|
||||
|
||||
#![feature(try_trait_v2)]
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_try)]
|
||||
#![feature(const_convert)]
|
||||
|
||||
fn main() {
|
||||
const fn result() -> Result<bool, ()> {
|
||||
Err(())?;
|
||||
Ok(true)
|
||||
}
|
||||
|
||||
const FOO: Result<bool, ()> = result();
|
||||
assert_eq!(Err(()), FOO);
|
||||
|
||||
const fn option() -> Option<()> {
|
||||
None?;
|
||||
Some(())
|
||||
}
|
||||
const BAR: Option<()> = option();
|
||||
assert_eq!(None, BAR);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue