Why can std::hint::assert_unchecked make the generated code slower?

57 points PikachuIsBoss

From the documentation of std::hint::assert_unchecked: "This may allow the optimizer to simplify things, but it might also make the generated code slower." (https://doc.rust-lang.org/beta/std/hint/fn.assert_unchecked.html)

Why? If the generated code would be slower, can't the compiler just choose to ignore the hint? I'm a bit disappointed by this, because it seems desirable to be able to give the compiler as much information as possible, and not have to worry about worse runtime performance.