Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b216e7b

Browse files
committedDec 16, 2023
Auto merge of #118994 - cuviper:beta-next, r=cuviper
[beta] backports - temporarily revert "ice on ambguity in mir typeck" #118736 - Update to LLVM 17.0.6 #118936 r? ghost
2 parents 4bd9c37 + ff1c216 commit b216e7b

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed
 

‎.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
[submodule "src/llvm-project"]
3434
path = src/llvm-project
3535
url = https://github.com/rust-lang/llvm-project.git
36-
branch = rustc/17.0-2023-09-19
36+
branch = rustc/17.0-2023-12-14
3737
shallow = true
3838
[submodule "src/doc/embedded-book"]
3939
path = src/doc/embedded-book

‎compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,10 @@ where
157157
}
158158

159159
let mut region_constraints = QueryRegionConstraints::default();
160-
let (output, error_info, mut obligations) =
161-
Q::fully_perform_into(self, infcx, &mut region_constraints)
162-
.map_err(|_| {
163-
infcx.tcx.sess.delay_span_bug(span, format!("error performing {self:?}"))
164-
})
165-
.and_then(|(output, error_info, obligations, certainty)| match certainty {
166-
Certainty::Proven => Ok((output, error_info, obligations)),
167-
Certainty::Ambiguous => Err(infcx
168-
.tcx
169-
.sess
170-
.delay_span_bug(span, format!("ambiguity performing {self:?}"))),
171-
})?;
160+
let (output, error_info, mut obligations, _) =
161+
Q::fully_perform_into(self, infcx, &mut region_constraints).map_err(|_| {
162+
infcx.tcx.sess.delay_span_bug(span, format!("error performing {self:?}"))
163+
})?;
172164

173165
// Typically, instantiating NLL query results does not
174166
// create obligations. However, in some cases there

‎src/llvm-project

Submodule llvm-project updated 47 files
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// The WF requirements of the *unnormalized* form of type annotations
2+
// can guide inference.
3+
// check-pass
4+
5+
pub trait EqualTo {
6+
type Ty;
7+
}
8+
impl<X> EqualTo for X {
9+
type Ty = X;
10+
}
11+
12+
trait MyTrait<U: EqualTo<Ty = Self>> {
13+
type Out;
14+
}
15+
impl<T, U: EqualTo<Ty = T>> MyTrait<U> for T {
16+
type Out = ();
17+
}
18+
19+
fn main() {
20+
let _: <_ as MyTrait<u8>>::Out;
21+
// We shoud be able to infer a value for the inference variable above.
22+
// The WF of the unnormalized projection requires `u8: EqualTo<Ty = _>`,
23+
// which is sufficient to guide inference.
24+
}

0 commit comments

Comments
 (0)
Please sign in to comment.