2020-03-02 10:53:58 -08:00
|
|
|
// Regression test for #69615.
|
|
|
|
|
|
|
|
#![feature(const_trait_impl, const_fn)]
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
|
|
|
pub trait MyTrait {
|
|
|
|
fn method(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
impl const MyTrait for () {
|
|
|
|
fn method(&self) {
|
2020-05-21 12:49:38 -07:00
|
|
|
loop {} //~ ERROR `loop` is not allowed in a `const fn`
|
2020-03-02 10:53:58 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|