Skip to content

Commit d43674e

Browse files
committed
Auto merge of rust-lang#105397 - matthiaskrgr:rollup-xv5imz8, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - rust-lang#105298 (llvm-wrapper: adapt for an LLVM API change) - rust-lang#105358 (Add a test for rust-lang#104260) - rust-lang#105380 (add const generics ping files things for me) - rust-lang#105382 (remove an excess `this`) - rust-lang#105388 (rustdoc: remove redundant CSS `.import-item .stab { font-size }`) - rust-lang#105390 (unstable-book: Add `ignore` to `abi_efiapi` example code) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 023b513 + 62d5bee commit d43674e

File tree

7 files changed

+52
-6
lines changed

7 files changed

+52
-6
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ enum class LLVMRustCodeModel {
205205
None,
206206
};
207207

208-
static Optional<CodeModel::Model> fromRust(LLVMRustCodeModel Model) {
208+
#if LLVM_VERSION_LT(16, 0)
209+
static Optional<CodeModel::Model>
210+
#else
211+
static std::optional<CodeModel::Model>
212+
#endif
213+
fromRust(LLVMRustCodeModel Model) {
209214
switch (Model) {
210215
case LLVMRustCodeModel::Tiny:
211216
return CodeModel::Tiny;
@@ -638,7 +643,11 @@ LLVMRustOptimize(
638643
LLVMSelfProfileInitializeCallbacks(PIC,LlvmSelfProfiler,BeforePassCallback,AfterPassCallback);
639644
}
640645

646+
#if LLVM_VERSION_LT(16, 0)
641647
Optional<PGOOptions> PGOOpt;
648+
#else
649+
std::optional<PGOOptions> PGOOpt;
650+
#endif
642651
if (PGOGenPath) {
643652
assert(!PGOUsePath && !PGOSampleUsePath);
644653
PGOOpt = PGOOptions(PGOGenPath, "", "", PGOOptions::IRInstr,

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
#include "llvm/Pass.h"
1818
#include "llvm/Bitcode/BitcodeWriter.h"
1919
#include "llvm/Support/Signals.h"
20+
#if LLVM_VERSION_LT(16, 0)
2021
#include "llvm/ADT/Optional.h"
22+
#endif
2123

2224
#include <iostream>
2325

@@ -708,7 +710,11 @@ enum class LLVMRustChecksumKind {
708710
SHA256,
709711
};
710712

713+
#if LLVM_VERSION_LT(16, 0)
711714
static Optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
715+
#else
716+
static std::optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
717+
#endif
712718
switch (Kind) {
713719
case LLVMRustChecksumKind::None:
714720
return None;
@@ -787,8 +793,18 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFile(
787793
const char *Filename, size_t FilenameLen,
788794
const char *Directory, size_t DirectoryLen, LLVMRustChecksumKind CSKind,
789795
const char *Checksum, size_t ChecksumLen) {
796+
797+
#if LLVM_VERSION_LT(16, 0)
790798
Optional<DIFile::ChecksumKind> llvmCSKind = fromRust(CSKind);
799+
#else
800+
std::optional<DIFile::ChecksumKind> llvmCSKind = fromRust(CSKind);
801+
#endif
802+
803+
#if LLVM_VERSION_LT(16, 0)
791804
Optional<DIFile::ChecksumInfo<StringRef>> CSInfo{};
805+
#else
806+
std::optional<DIFile::ChecksumInfo<StringRef>> CSInfo{};
807+
#endif
792808
if (llvmCSKind)
793809
CSInfo.emplace(*llvmCSKind, StringRef{Checksum, ChecksumLen});
794810
return wrap(Builder->createFile(StringRef(Filename, FilenameLen),

compiler/rustc_trait_selection/src/traits/const_evaluatable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub fn is_const_evaluatable<'tcx>(
6464
ty::ConstKind::Expr(_) => {
6565
// FIXME(generic_const_exprs): we have a `ConstKind::Expr` which is fully concrete, but
6666
// currently it is not possible to evaluate `ConstKind::Expr` so we are unable to tell if it
67-
// is evaluatable or not. For now we just ICE until this is implemented this.
67+
// is evaluatable or not. For now we just ICE until this is implemented.
6868
Err(NotConstEvaluatable::Error(tcx.sess.delay_span_bug(
6969
span,
7070
"evaluating `ConstKind::Expr` is not currently supported",

src/doc/unstable-book/src/language-features/abi-efiapi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Specification].
1212

1313
Example:
1414

15-
```rust
15+
```rust,ignore (not-all-targets-support-uefi)
1616
#![feature(abi_efiapi)]
1717
1818
extern "efiapi" { fn f1(); }

src/librustdoc/html/static/css/rustdoc.css

-1
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
10141014
.import-item .stab {
10151015
border-radius: 3px;
10161016
display: inline-block;
1017-
font-size: 0.875rem;
10181017
line-height: 1.2;
10191018
margin-bottom: 0;
10201019
margin-left: 0.3125em;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// check-pass
2+
3+
#![feature(inherent_associated_types)]
4+
#![allow(incomplete_features)]
5+
6+
struct Foo;
7+
8+
impl Foo {
9+
type Bar<T> = u8;
10+
}
11+
12+
fn main() {
13+
let a: Foo::Bar<()>;
14+
}

triagebot.toml

+10-2
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,16 @@ message = "Some changes occurred to MIR optimizations"
331331
cc = ["@rust-lang/wg-mir-opt"]
332332

333333
[mentions."compiler/rustc_trait_selection/src/traits/const_evaluatable.rs"]
334-
message = "Some changes occurred in const_evaluatable.rs"
335-
cc = ["@lcnr"]
334+
message = "Some changes occurred in `const_evaluatable.rs`"
335+
cc = ["@BoxyUwU"]
336+
337+
[mentions."compiler/rustc_middle/src/ty/abstract_const.rs"]
338+
message = "Some changes occured in `abstract_const.rs`"
339+
cc = ["@BoxyUwU"]
340+
341+
[mentions."compiler/rustc_ty_utils/src/consts.rs"]
342+
message = "Some changes occured in `rustc_ty_utils::consts.rs`"
343+
cc = ["@BoxyUwU"]
336344

337345
[mentions."compiler/rustc_trait_selection/src/traits/engine.rs"]
338346
message = """

0 commit comments

Comments
 (0)