Skip to content

Commit

Permalink
Auto merge of rust-lang#118994 - cuviper:beta-next, r=cuviper
Browse files Browse the repository at this point in the history
[beta] backports

- temporarily revert "ice on ambguity in mir typeck" rust-lang#118736
- Update to LLVM 17.0.6 rust-lang#118936

r? ghost
  • Loading branch information
bors committed Dec 16, 2023
2 parents 4bd9c37 + ff1c216 commit 52efffb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/17.0-2023-09-19
branch = rustc/17.0-2023-12-14
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
Expand Down
16 changes: 4 additions & 12 deletions compiler/rustc_trait_selection/src/traits/query/type_op/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,10 @@ where
}

let mut region_constraints = QueryRegionConstraints::default();
let (output, error_info, mut obligations) =
Q::fully_perform_into(self, infcx, &mut region_constraints)
.map_err(|_| {
infcx.tcx.sess.delay_span_bug(span, format!("error performing {self:?}"))
})
.and_then(|(output, error_info, obligations, certainty)| match certainty {
Certainty::Proven => Ok((output, error_info, obligations)),
Certainty::Ambiguous => Err(infcx
.tcx
.sess
.delay_span_bug(span, format!("ambiguity performing {self:?}"))),
})?;
let (output, error_info, mut obligations, _) =
Q::fully_perform_into(self, infcx, &mut region_constraints).map_err(|_| {
infcx.tcx.sess.delay_span_bug(span, format!("error performing {self:?}"))
})?;

// Typically, instantiating NLL query results does not
// create obligations. However, in some cases there
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
Submodule llvm-project updated 47 files
+46 −2 .github/workflows/release-binaries.yml
+2 −1 clang-tools-extra/clangd/XRefs.cpp
+14 −1 clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
+4 −0 clang/docs/ReleaseNotes.rst
+0 −3 clang/include/clang/Driver/Options.td
+4 −7 clang/include/clang/Frontend/DependencyOutputOptions.h
+1 −10 clang/include/clang/Frontend/Utils.h
+15 −1 clang/lib/Basic/Targets/OSTargets.h
+0 −3 clang/lib/Driver/ToolChains/Clang.cpp
+25 −13 clang/lib/Driver/ToolChains/WebAssembly.cpp
+2 −2 clang/lib/Format/TokenAnnotator.cpp
+3 −1 clang/lib/Format/WhitespaceManager.cpp
+1 −1 clang/lib/Format/WhitespaceManager.h
+7 −25 clang/lib/Frontend/DependencyFile.cpp
+4 −4 clang/lib/Lex/ModuleMap.cpp
+7 −12 clang/lib/Sema/SemaOverload.cpp
+1 −1 clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
+24 −0 clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p2468R2.cppm
+102 −0 clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp
+10 −2 clang/test/CodeGenCXX/float128-declarations.cpp
+0 −6 clang/test/Driver/canonical-system-headers.c
+6 −6 clang/test/Driver/wasm-toolchain.c
+0 −0 clang/test/Preprocessor/Inputs/canonical-system-headers/a.h
+0 −16 clang/test/Preprocessor/canonical-system-headers.c
+32 −0 clang/unittests/Format/FormatTest.cpp
+11 −0 clang/unittests/Format/FormatTestComments.cpp
+3 −3 compiler-rt/test/lit.common.cfg.py
+1 −1 libcxx/include/__config
+3 −2 libcxx/include/__memory/shared_ptr.h
+27 −0 libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
+1 −1 libcxx/utils/libcxx/test/format.py
+2 −2 libcxx/utils/libcxx/test/params.py
+1 −1 llvm/CMakeLists.txt
+23 −0 llvm/include/llvm/CodeGen/TargetInstrInfo.h
+1 −1 llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+2 −2 llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
+1 −1 llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
+18 −5 llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+2 −0 llvm/lib/Target/AArch64/AArch64InstrInfo.h
+5 −5 llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+33 −0 llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir
+21 −0 llvm/test/CodeGen/RISCV/aext.ll
+1 −1 llvm/test/lit.cfg.py
+5 −3 llvm/tools/llvm-shlib/CMakeLists.txt
+1 −1 llvm/utils/gn/secondary/llvm/version.gni
+2 −2 llvm/utils/lit/lit/TestRunner.py
+1 −1 llvm/utils/lit/lit/__init__.py
24 changes: 24 additions & 0 deletions tests/ui/wf/unnormalized-projection-guides-inference.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// The WF requirements of the *unnormalized* form of type annotations
// can guide inference.
// check-pass

pub trait EqualTo {
type Ty;
}
impl<X> EqualTo for X {
type Ty = X;
}

trait MyTrait<U: EqualTo<Ty = Self>> {
type Out;
}
impl<T, U: EqualTo<Ty = T>> MyTrait<U> for T {
type Out = ();
}

fn main() {
let _: <_ as MyTrait<u8>>::Out;
// We shoud be able to infer a value for the inference variable above.
// The WF of the unnormalized projection requires `u8: EqualTo<Ty = _>`,
// which is sufficient to guide inference.
}

0 comments on commit 52efffb

Please sign in to comment.