We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75b7e52 commit 1ec2b9bCopy full SHA for 1ec2b9b
compiler/rustc_trait_selection/src/traits/wf.rs
@@ -31,26 +31,24 @@ pub fn obligations<'a, 'tcx>(
31
if resolved_ty == ty {
32
// No progress, bail out to prevent "livelock".
33
return None;
34
+ } else {
35
+ resolved_ty
36
}
-
- resolved_ty
37
38
_ => ty,
39
40
.into()
41
42
GenericArgKind::Const(ct) => {
43
match ct.kind() {
44
- ty::ConstKind::Infer(infer) => {
45
- let resolved = infcx.shallow_resolve(infer);
46
- if resolved == infer {
+ ty::ConstKind::Infer(_) => {
+ let resolved = infcx.shallow_resolve(ct);
+ if resolved == ct {
47
// No progress.
48
49
50
+ resolved
51
- infcx
52
- .tcx
53
- .mk_const(ty::ConstS { kind: ty::ConstKind::Infer(resolved), ty: ct.ty() })
54
55
_ => ct,
56
0 commit comments