about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-01-19 20:07:04 -0800
committerMichael Goulet <michael@errs.io>2022-01-19 20:07:04 -0800
commitb7e443397471062e5681ecefb6638577cefb9571 (patch)
tree3f04c86244e49b76c558c75a4d58873b18c0021c /compiler/rustc_const_eval/src
parent8547f5732c003080f940a23eaf3e2e9c052934ae (diff)
downloadrust-b7e443397471062e5681ecefb6638577cefb9571.tar.gz
rust-b7e443397471062e5681ecefb6638577cefb9571.zip
Foreign types are trivially drop
- Also rename a trivial_const_drop to match style of other functions in
  the util module.
- Also add a test for `const Drop` that doesn't depend on a `~const`
  bound.
- Also comment a bit why we remove the const bound during dropck impl
  check.
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
index 8dfdbf5d9dd..91610b15eb9 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
@@ -148,7 +148,7 @@ impl Qualif for NeedsNonConstDrop {
 
     fn in_any_value_of_ty<'tcx>(cx: &ConstCx<'_, 'tcx>, ty: Ty<'tcx>) -> bool {
         // Avoid selecting for simple cases, such as builtin types.
-        if ty::util::trivial_const_drop(ty) {
+        if ty::util::is_trivially_const_drop(ty) {
             return false;
         }