Rollup merge of #79374 - mendess:const-param-expr-diagnostic, r=lcnr
Add note to use nightly when using expr in const generics As recommended by `@Icnr` in #73899 and in zulip, I've added a note saying that const expressions can be used in nightly. ``` error: generic parameters may not be used in const operations --> $DIR/issue-61935.rs:10:23 | 6 | Self:FooImpl<{N==0}> | ^ cannot perform const operation using `N` | = help: const parameters may only be used as standalone arguments, i.e. `N` = note: use feature(const_generics) and feature(const_evaluatable_checked) to enable this error: aborting due to previous error ``` I hope the note is well written 😅
This commit is contained in:
commit
f049b0be96
56 changed files with 113 additions and 54 deletions
|
@ -481,6 +481,7 @@ impl<'a> Resolver<'a> {
|
|||
name
|
||||
));
|
||||
}
|
||||
err.help("use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions");
|
||||
|
||||
err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue