]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #81544 - JulianKnodt:sat_where, r=lcnr
authorJack Huey <31162821+jackh726@users.noreply.github.com>
Tue, 2 Feb 2021 21:01:39 +0000 (16:01 -0500)
committerGitHub <noreply@github.com>
Tue, 2 Feb 2021 21:01:39 +0000 (16:01 -0500)
commit3aed8b17a89e5ed856eeb5a877cf298761aee757
tree6c2e2d61124250b596b55d5c676de8b49473b640
parent76be6bb4de596ad24c62dd52baeb0cb56c8937ae
parent65256717f2b3a6cb2d4f84e834941d7433ff5e15
Rollup merge of #81544 - JulianKnodt:sat_where, r=lcnr

Add better diagnostic for unbounded Abst. Const

~~In the case where a generic abst. const requires a trivial where bound: `where TypeWithConst<const_fn(N)>: ,`,
instead of requiring a where bound, just check that only consts are being substituted in to skip over where check.~~

~~This is pretty sketchy, but I think it works. Presumably, if there is checking for type bounds added later, it can first check nested requirements, and see if they're satisfied by the current `ParamEnv`.~~

Changed the diagnostic to add a better example, which is more practical than what was previously proposed.

r? ```@lcnr```
compiler/rustc_trait_selection/src/traits/const_evaluatable.rs