diff options
| author | onur-ozkan <work@onurozkan.dev> | 2024-02-25 01:11:09 +0300 |
|---|---|---|
| committer | onur-ozkan <work@onurozkan.dev> | 2024-03-20 00:12:00 +0300 |
| commit | 81d7d7aabd5cdfb1e574a7ebae0b884e3aad8dea (patch) | |
| tree | 7b003fbadf54c0ce043735b0557cfc5937b24ef5 /compiler/rustc_const_eval | |
| parent | a61bf3093eb57d6b63522d3ec1f4acceede0363b (diff) | |
| download | rust-81d7d7aabd5cdfb1e574a7ebae0b884e3aad8dea.tar.gz rust-81d7d7aabd5cdfb1e574a7ebae0b884e3aad8dea.zip | |
resolve clippy errors
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/intern.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intern.rs b/compiler/rustc_const_eval/src/interpret/intern.rs index 17bb59aae8f..6775a179872 100644 --- a/compiler/rustc_const_eval/src/interpret/intern.rs +++ b/compiler/rustc_const_eval/src/interpret/intern.rs @@ -291,7 +291,9 @@ pub fn intern_const_alloc_for_constprop< return Ok(()); } // Move allocation to `tcx`. - for _ in intern_shallow(ecx, alloc_id, Mutability::Not).map_err(|()| err_ub!(DeadLocal))? { + if let Some(_) = + (intern_shallow(ecx, alloc_id, Mutability::Not).map_err(|()| err_ub!(DeadLocal))?).next() + { // We are not doing recursive interning, so we don't currently support provenance. // (If this assertion ever triggers, we should just implement a // proper recursive interning loop -- or just call `intern_const_alloc_recursive`. |
