Skip to content

Commit 79f178b

Browse files
committedApr 2, 2022
Auto merge of rust-lang#95581 - Dylan-DPC:rollup-2suh5h1, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - rust-lang#95354 (Handle rustc_const_stable attribute in library feature collector) - rust-lang#95373 (invalid_value lint: detect invalid initialization of arrays) - rust-lang#95430 (Disable #[thread_local] support on i686-pc-windows-msvc) - rust-lang#95544 (Add error message suggestion for missing noreturn in naked function) - rust-lang#95556 (Implement provenance preserving methods on NonNull) - rust-lang#95557 (Fix `thread_local!` macro to be compatible with `no_implicit_prelude`) - rust-lang#95559 (small type system refactoring) - rust-lang#95560 (convert more `DefId`s to `LocalDefId`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents c75909c + 1c82fac commit 79f178b

File tree

49 files changed

+389
-192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+389
-192
lines changed
 

‎compiler/rustc_infer/src/infer/canonical/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ impl<'cx, 'tcx> InferCtxt<'cx, 'tcx> {
4949
/// At the end of processing, the substitution S (once
5050
/// canonicalized) then represents the values that you computed
5151
/// for each of the canonical inputs to your query.
52-
5352
pub fn instantiate_canonical_with_fresh_inference_vars<T>(
5453
&self,
5554
span: Span,

‎compiler/rustc_infer/src/infer/combine.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,12 @@ use super::glb::Glb;
2727
use super::lub::Lub;
2828
use super::sub::Sub;
2929
use super::type_variable::TypeVariableValue;
30-
use super::unify_key::replace_if_possible;
31-
use super::unify_key::{ConstVarValue, ConstVariableValue};
32-
use super::unify_key::{ConstVariableOrigin, ConstVariableOriginKind};
3330
use super::{InferCtxt, MiscVariable, TypeTrace};
34-
3531
use crate::traits::{Obligation, PredicateObligations};
36-
3732
use rustc_data_structures::sso::SsoHashMap;
3833
use rustc_hir::def_id::DefId;
34+
use rustc_middle::infer::unify_key::{ConstVarValue, ConstVariableValue};
35+
use rustc_middle::infer::unify_key::{ConstVariableOrigin, ConstVariableOriginKind};
3936
use rustc_middle::traits::ObligationCause;
4037
use rustc_middle::ty::error::{ExpectedFound, TypeError};
4138
use rustc_middle::ty::relate::{self, Relate, RelateResult, TypeRelation};
@@ -140,8 +137,8 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
140137
return Ok(a);
141138
}
142139

143-
let a = replace_if_possible(&mut self.inner.borrow_mut().const_unification_table(), a);
144-
let b = replace_if_possible(&mut self.inner.borrow_mut().const_unification_table(), b);
140+
let a = self.shallow_resolve(a);
141+
let b = self.shallow_resolve(b);
145142

146143
let a_is_expected = relation.a_is_expected();
147144

0 commit comments

Comments
 (0)