mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-03 03:58:52 +00:00
14 lines
304 B
Rust
14 lines
304 B
Rust
#![feature(const_trait_impl)]
|
|
#![feature(effects)]
|
|
|
|
struct S;
|
|
trait T {}
|
|
|
|
impl const dyn T {
|
|
//~^ ERROR inherent impls cannot be `const`
|
|
//~| ERROR the const parameter `host` is not constrained by the impl trait, self type, or
|
|
pub const fn new() -> std::sync::Mutex<dyn T> {}
|
|
}
|
|
|
|
fn main() {}
|