rust/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/span-bug-issue-121418.rs
2024-03-07 06:27:09 +00:00

16 lines
387 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> {}
//~^ ERROR mismatched types
//~| ERROR cannot be known at compilation time
}
fn main() {}