Only inherit const stability for methods of impl const Trait
blocks
This commit is contained in:
parent
949bdd8b79
commit
5bac1c9229
5 changed files with 74 additions and 16 deletions
|
@ -929,7 +929,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
|
|||
if callee_is_unstable_unmarked {
|
||||
trace!("callee_is_unstable_unmarked");
|
||||
// We do not use `const` modifiers for intrinsic "functions", as intrinsics are
|
||||
// `extern` funtions, and these have way to get marked `const`. So instead we
|
||||
// `extern` funtions, and these have no way to get marked `const`. So instead we
|
||||
// use `rustc_const_(un)stable` attributes to mean that the intrinsic is `const`
|
||||
if self.ccx.is_const_stable_const_fn() || is_intrinsic {
|
||||
self.check_op(ops::FnCallUnstable(callee, None));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue