summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-07 00:32:57 +0000
committerbors <bors@rust-lang.org>2022-12-07 00:32:57 +0000
commitd43674e2c9b1a7b134ef76378c30e822c75c9aa1 (patch)
treeadc30e8c94cb6bfbb6ca35288d6c6545ffc8f1c5
parent023b5136b597053f76941b54eeae668219e6e18d (diff)
parent62d5beed0f29c32147c7c91308d201b8940711b8 (diff)
downloadrust-d43674e2c9b1a7b134ef76378c30e822c75c9aa1.tar.gz
Auto merge of #105397 - matthiaskrgr:rollup-xv5imz8, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #105298 (llvm-wrapper: adapt for an LLVM API change) - #105358 (Add a test for #104260) - #105380 (add const generics ping files things for me) - #105382 (remove an excess `this`) - #105388 (rustdoc: remove redundant CSS `.import-item .stab { font-size }`) - #105390 (unstable-book: Add `ignore` to `abi_efiapi` example code) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp11
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp16
-rw-r--r--compiler/rustc_trait_selection/src/traits/const_evaluatable.rs2
-rw-r--r--src/doc/unstable-book/src/language-features/abi-efiapi.md2
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css1
-rw-r--r--src/test/ui/associated-inherent-types/issue-104260.rs14
-rw-r--r--triagebot.toml12
7 files changed, 52 insertions, 6 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 7f4d63eed8b..1a3d458c300 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -205,7 +205,12 @@ enum class LLVMRustCodeModel {
None,
};
-static Optional<CodeModel::Model> fromRust(LLVMRustCodeModel Model) {
+#if LLVM_VERSION_LT(16, 0)
+static Optional<CodeModel::Model>
+#else
+static std::optional<CodeModel::Model>
+#endif
+fromRust(LLVMRustCodeModel Model) {
switch (Model) {
case LLVMRustCodeModel::Tiny:
return CodeModel::Tiny;
@@ -638,7 +643,11 @@ LLVMRustOptimize(
LLVMSelfProfileInitializeCallbacks(PIC,LlvmSelfProfiler,BeforePassCallback,AfterPassCallback);
}
+#if LLVM_VERSION_LT(16, 0)
Optional<PGOOptions> PGOOpt;
+#else
+ std::optional<PGOOptions> PGOOpt;
+#endif
if (PGOGenPath) {
assert(!PGOUsePath && !PGOSampleUsePath);
PGOOpt = PGOOptions(PGOGenPath, "", "", PGOOptions::IRInstr,
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 792d921c6a4..3a748f38995 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -17,7 +17,9 @@
#include "llvm/Pass.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/Support/Signals.h"
+#if LLVM_VERSION_LT(16, 0)
#include "llvm/ADT/Optional.h"
+#endif
#include <iostream>
@@ -708,7 +710,11 @@ enum class LLVMRustChecksumKind {
SHA256,
};
+#if LLVM_VERSION_LT(16, 0)
static Optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
+#else
+static std::optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
+#endif
switch (Kind) {
case LLVMRustChecksumKind::None:
return None;
@@ -787,8 +793,18 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFile(
const char *Filename, size_t FilenameLen,
const char *Directory, size_t DirectoryLen, LLVMRustChecksumKind CSKind,
const char *Checksum, size_t ChecksumLen) {
+
+#if LLVM_VERSION_LT(16, 0)
Optional<DIFile::ChecksumKind> llvmCSKind = fromRust(CSKind);
+#else
+ std::optional<DIFile::ChecksumKind> llvmCSKind = fromRust(CSKind);
+#endif
+
+#if LLVM_VERSION_LT(16, 0)
Optional<DIFile::ChecksumInfo<StringRef>> CSInfo{};
+#else
+ std::optional<DIFile::ChecksumInfo<StringRef>> CSInfo{};
+#endif
if (llvmCSKind)
CSInfo.emplace(*llvmCSKind, StringRef{Checksum, ChecksumLen});
return wrap(Builder->createFile(StringRef(Filename, FilenameLen),
diff --git a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
index d01c6bac296..7cc0999478a 100644
--- a/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
+++ b/compiler/rustc_trait_selection/src/traits/const_evaluatable.rs
@@ -64,7 +64,7 @@ pub fn is_const_evaluatable<'tcx>(
ty::ConstKind::Expr(_) => {
// FIXME(generic_const_exprs): we have a `ConstKind::Expr` which is fully concrete, but
// currently it is not possible to evaluate `ConstKind::Expr` so we are unable to tell if it
- // is evaluatable or not. For now we just ICE until this is implemented this.
+ // is evaluatable or not. For now we just ICE until this is implemented.
Err(NotConstEvaluatable::Error(tcx.sess.delay_span_bug(
span,
"evaluating `ConstKind::Expr` is not currently supported",
diff --git a/src/doc/unstable-book/src/language-features/abi-efiapi.md b/src/doc/unstable-book/src/language-features/abi-efiapi.md
index 11ef0cfdb14..b492da88474 100644
--- a/src/doc/unstable-book/src/language-features/abi-efiapi.md
+++ b/src/doc/unstable-book/src/language-features/abi-efiapi.md
@@ -12,7 +12,7 @@ Specification].
Example:
-```rust
+```rust,ignore (not-all-targets-support-uefi)
#![feature(abi_efiapi)]
extern "efiapi" { fn f1(); }
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 0cd15768ac6..5ebc545d10c 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -1014,7 +1014,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
.import-item .stab {
border-radius: 3px;
display: inline-block;
- font-size: 0.875rem;
line-height: 1.2;
margin-bottom: 0;
margin-left: 0.3125em;
diff --git a/src/test/ui/associated-inherent-types/issue-104260.rs b/src/test/ui/associated-inherent-types/issue-104260.rs
new file mode 100644
index 00000000000..a73cd1775b4
--- /dev/null
+++ b/src/test/ui/associated-inherent-types/issue-104260.rs
@@ -0,0 +1,14 @@
+// check-pass
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Foo;
+
+impl Foo {
+ type Bar<T> = u8;
+}
+
+fn main() {
+ let a: Foo::Bar<()>;
+}
diff --git a/triagebot.toml b/triagebot.toml
index bc0b88b2bab..49945e5c533 100644
--- a/triagebot.toml
+++ b/triagebot.toml
@@ -331,8 +331,16 @@ message = "Some changes occurred to MIR optimizations"
cc = ["@rust-lang/wg-mir-opt"]
[mentions."compiler/rustc_trait_selection/src/traits/const_evaluatable.rs"]
-message = "Some changes occurred in const_evaluatable.rs"
-cc = ["@lcnr"]
+message = "Some changes occurred in `const_evaluatable.rs`"
+cc = ["@BoxyUwU"]
+
+[mentions."compiler/rustc_middle/src/ty/abstract_const.rs"]
+message = "Some changes occured in `abstract_const.rs`"
+cc = ["@BoxyUwU"]
+
+[mentions."compiler/rustc_ty_utils/src/consts.rs"]
+message = "Some changes occured in `rustc_ty_utils::consts.rs`"
+cc = ["@BoxyUwU"]
[mentions."compiler/rustc_trait_selection/src/traits/engine.rs"]
message = """