summaryrefslogtreecommitdiff
path: root/compiler/rustc_ty_utils
diff options
context:
space:
mode:
authorDrMeepster <19316085+DrMeepster@users.noreply.github.com>2022-09-11 00:37:49 -0700
committerDrMeepster <19316085+DrMeepster@users.noreply.github.com>2023-04-21 02:14:02 -0700
commit511e457c4ba88097ee46ef07b7ef80ce4dd4a3c5 (patch)
tree9aed1b0210cfd3c784a7c5cc89646b8d9dad5427 /compiler/rustc_ty_utils
parentb92a41c6760801a7128ca0ec69ba4ba9c9194054 (diff)
downloadrust-511e457c4ba88097ee46ef07b7ef80ce4dd4a3c5.tar.gz
offset_of
Diffstat (limited to 'compiler/rustc_ty_utils')
-rw-r--r--compiler/rustc_ty_utils/src/consts.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs
index b67607a4db6..e96df77d859 100644
--- a/compiler/rustc_ty_utils/src/consts.rs
+++ b/compiler/rustc_ty_utils/src/consts.rs
@@ -256,6 +256,7 @@ fn recurse_build<'tcx>(
ExprKind::VarRef { .. }
| ExprKind::UpvarRef { .. }
| ExprKind::StaticRef { .. }
+ | ExprKind::OffsetOf { .. }
| ExprKind::ThreadLocalRef(_) => {
error(GenericConstantTooComplexSub::OperationNotSupported(node.span))?
}
@@ -347,6 +348,7 @@ impl<'a, 'tcx> IsThirPolymorphic<'a, 'tcx> {
| thir::ExprKind::ZstLiteral { .. }
| thir::ExprKind::StaticRef { .. }
| thir::ExprKind::InlineAsm(_)
+ | thir::ExprKind::OffsetOf { .. }
| thir::ExprKind::ThreadLocalRef(_)
| thir::ExprKind::Yield { .. } => false,
}