about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/span-bug-issue-121418.rs
blob: 50a7e12f2a78ab14d290612a48fddc219b069d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![feature(const_trait_impl)]

struct S;
trait T {}

impl const dyn T {
    //~^ ERROR inherent impls cannot be `const`
    pub const fn new() -> std::sync::Mutex<dyn T> {}
    //~^ ERROR mismatched types
    //~| ERROR cannot be known at compilation time
}

fn main() {}