1
Fork 0

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:
Jonas Schievink 2020-11-24 13:17:51 +01:00 committed by GitHub
commit f049b0be96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 113 additions and 54 deletions

View file

@ -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
}