Introduce const Trait
(always-const trait bounds)
This commit is contained in:
parent
2fe50cd72c
commit
3eb48a35c8
69 changed files with 505 additions and 223 deletions
|
@ -0,0 +1,9 @@
|
|||
#![feature(const_trait_impl)]
|
||||
// edition: 2021
|
||||
|
||||
#[const_trait]
|
||||
trait Trait {}
|
||||
|
||||
fn main() {
|
||||
let _: &dyn const Trait; //~ ERROR const trait bounds are not allowed in trait object types
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue