diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-01-03 16:08:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-03 16:08:30 +0100 |
| commit | 8bce6fc35eeb9c0e4260766f2c734a89c1523f5d (patch) | |
| tree | 81077362d15d38a08dcb50c07a8416558ee2e902 /compiler/rustc_error_codes/src | |
| parent | 39c2e6db3f59fb201b95bc486dab809aeb577fe7 (diff) | |
| parent | aa799049d731f2922c237b27211d4e19b4db918b (diff) | |
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
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0379.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0379.md b/compiler/rustc_error_codes/src/error_codes/E0379.md index ab438e41447..35f546cfdb7 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0379.md +++ b/compiler/rustc_error_codes/src/error_codes/E0379.md @@ -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 |
