#![feature(trivial_bounds)] allows invalid code to compile #67801
Labels
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
The following code compiles:
despite the fact that we are moving out of a reference to a
!Copy
type.I don't think this can actually lead to unsoundness, since it's impossible to actually call
weird
. However, I would still expect type-checking to not attempt to assume that trivially false bounds are actually true.The text was updated successfully, but these errors were encountered: