Rollup merge of #119505 - fmease:no-host-param-for-trait-fns, r=fee1-dead
Don't synthesize host effect params for trait associated functions marked const Fixes #113378. r? fee1-dead or compiler
This commit is contained in:
@@ -6,6 +6,10 @@ Erroneous code example:
|
||||
trait Foo {
|
||||
const fn bar() -> u32; // error!
|
||||
}
|
||||
|
||||
impl Foo for () {
|
||||
const fn bar() -> u32 { 0 } // error!
|
||||
}
|
||||
```
|
||||
|
||||
Trait methods cannot be declared `const` by design. For more information, see
|
||||
|
||||
Reference in New Issue
Block a user