Closed leonardo-m closed 9 months ago
rustc does give an error, I just tried it in playground. https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=3738d9497ef1eb7f17534a96d45bfb0e
But still, rustc shouldn't give clippy error which needs to run clippy.
what do you mean? In playground it is panic: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=5d058b58ab0a07db5ec2143c6e0a45c3
also, the clippy error is actually a rustc error. lints in clippy start with clippy::
, like clippy::<lint_name>
.
Oh, how come @lzutao your comment was 10 seconds (mine at 15 seconds) then suddenly became 20 seconds even though I post it first but your timing was faster?
Oh, thank you, then this is just about extending that to const generics.
We don't do any post-monomorphization constant evaluation, so perhaps this should be closed as wontfix?
This is an enhancement request. This code gives no warnings nor errors in rustc (1.48.0-nightly 73dc675b9 2020-09-06):
Clippy gives one error:
But I'd like rustc to give two errors, both the error given by Clippy and the similar error inside the const generic.