diff options
| author | Michael Goulet <michael@errs.io> | 2022-01-19 20:07:04 -0800 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-01-19 20:07:04 -0800 |
| commit | b7e443397471062e5681ecefb6638577cefb9571 (patch) | |
| tree | 3f04c86244e49b76c558c75a4d58873b18c0021c /compiler/rustc_const_eval/src/transform | |
| parent | 8547f5732c003080f940a23eaf3e2e9c052934ae (diff) | |
| download | rust-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/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs | 2 |
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; } |
