mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-18 19:32:02 +00:00
22 lines
372 B
Rust
22 lines
372 B
Rust
//@ compile-flags: -Znext-solver
|
|
|
|
// Regression test for #69615.
|
|
|
|
#![feature(const_trait_impl)]
|
|
|
|
#[const_trait]
|
|
pub trait MyTrait {
|
|
fn method(&self) -> Option<()>;
|
|
}
|
|
|
|
impl const MyTrait for () {
|
|
fn method(&self) -> Option<()> {
|
|
Some(())?;
|
|
//~^ ERROR `?` is not allowed on
|
|
//~| ERROR `?` is not allowed on
|
|
None
|
|
}
|
|
}
|
|
|
|
fn main() {}
|