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
This commit is contained in:
commit
d43674e2c9
@ -205,7 +205,12 @@ enum class LLVMRustCodeModel {
|
|||||||
None,
|
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) {
|
switch (Model) {
|
||||||
case LLVMRustCodeModel::Tiny:
|
case LLVMRustCodeModel::Tiny:
|
||||||
return CodeModel::Tiny;
|
return CodeModel::Tiny;
|
||||||
@ -638,7 +643,11 @@ LLVMRustOptimize(
|
|||||||
LLVMSelfProfileInitializeCallbacks(PIC,LlvmSelfProfiler,BeforePassCallback,AfterPassCallback);
|
LLVMSelfProfileInitializeCallbacks(PIC,LlvmSelfProfiler,BeforePassCallback,AfterPassCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LLVM_VERSION_LT(16, 0)
|
||||||
Optional<PGOOptions> PGOOpt;
|
Optional<PGOOptions> PGOOpt;
|
||||||
|
#else
|
||||||
|
std::optional<PGOOptions> PGOOpt;
|
||||||
|
#endif
|
||||||
if (PGOGenPath) {
|
if (PGOGenPath) {
|
||||||
assert(!PGOUsePath && !PGOSampleUsePath);
|
assert(!PGOUsePath && !PGOSampleUsePath);
|
||||||
PGOOpt = PGOOptions(PGOGenPath, "", "", PGOOptions::IRInstr,
|
PGOOpt = PGOOptions(PGOGenPath, "", "", PGOOptions::IRInstr,
|
||||||
|
@ -17,7 +17,9 @@
|
|||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Bitcode/BitcodeWriter.h"
|
#include "llvm/Bitcode/BitcodeWriter.h"
|
||||||
#include "llvm/Support/Signals.h"
|
#include "llvm/Support/Signals.h"
|
||||||
|
#if LLVM_VERSION_LT(16, 0)
|
||||||
#include "llvm/ADT/Optional.h"
|
#include "llvm/ADT/Optional.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -708,7 +710,11 @@ enum class LLVMRustChecksumKind {
|
|||||||
SHA256,
|
SHA256,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if LLVM_VERSION_LT(16, 0)
|
||||||
static Optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
|
static Optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
|
||||||
|
#else
|
||||||
|
static std::optional<DIFile::ChecksumKind> fromRust(LLVMRustChecksumKind Kind) {
|
||||||
|
#endif
|
||||||
switch (Kind) {
|
switch (Kind) {
|
||||||
case LLVMRustChecksumKind::None:
|
case LLVMRustChecksumKind::None:
|
||||||
return None;
|
return None;
|
||||||
@ -787,8 +793,18 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFile(
|
|||||||
const char *Filename, size_t FilenameLen,
|
const char *Filename, size_t FilenameLen,
|
||||||
const char *Directory, size_t DirectoryLen, LLVMRustChecksumKind CSKind,
|
const char *Directory, size_t DirectoryLen, LLVMRustChecksumKind CSKind,
|
||||||
const char *Checksum, size_t ChecksumLen) {
|
const char *Checksum, size_t ChecksumLen) {
|
||||||
|
|
||||||
|
#if LLVM_VERSION_LT(16, 0)
|
||||||
Optional<DIFile::ChecksumKind> llvmCSKind = fromRust(CSKind);
|
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{};
|
Optional<DIFile::ChecksumInfo<StringRef>> CSInfo{};
|
||||||
|
#else
|
||||||
|
std::optional<DIFile::ChecksumInfo<StringRef>> CSInfo{};
|
||||||
|
#endif
|
||||||
if (llvmCSKind)
|
if (llvmCSKind)
|
||||||
CSInfo.emplace(*llvmCSKind, StringRef{Checksum, ChecksumLen});
|
CSInfo.emplace(*llvmCSKind, StringRef{Checksum, ChecksumLen});
|
||||||
return wrap(Builder->createFile(StringRef(Filename, FilenameLen),
|
return wrap(Builder->createFile(StringRef(Filename, FilenameLen),
|
||||||
|
@ -64,7 +64,7 @@ pub fn is_const_evaluatable<'tcx>(
|
|||||||
ty::ConstKind::Expr(_) => {
|
ty::ConstKind::Expr(_) => {
|
||||||
// FIXME(generic_const_exprs): we have a `ConstKind::Expr` which is fully concrete, but
|
// 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
|
// 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(
|
Err(NotConstEvaluatable::Error(tcx.sess.delay_span_bug(
|
||||||
span,
|
span,
|
||||||
"evaluating `ConstKind::Expr` is not currently supported",
|
"evaluating `ConstKind::Expr` is not currently supported",
|
||||||
|
@ -12,7 +12,7 @@ Specification].
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```rust
|
```rust,ignore (not-all-targets-support-uefi)
|
||||||
#![feature(abi_efiapi)]
|
#![feature(abi_efiapi)]
|
||||||
|
|
||||||
extern "efiapi" { fn f1(); }
|
extern "efiapi" { fn f1(); }
|
||||||
|
@ -1014,7 +1014,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
|
|||||||
.import-item .stab {
|
.import-item .stab {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 0.875rem;
|
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-left: 0.3125em;
|
margin-left: 0.3125em;
|
||||||
|
14
src/test/ui/associated-inherent-types/issue-104260.rs
Normal file
14
src/test/ui/associated-inherent-types/issue-104260.rs
Normal file
@ -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<()>;
|
||||||
|
}
|
@ -331,8 +331,16 @@ message = "Some changes occurred to MIR optimizations"
|
|||||||
cc = ["@rust-lang/wg-mir-opt"]
|
cc = ["@rust-lang/wg-mir-opt"]
|
||||||
|
|
||||||
[mentions."compiler/rustc_trait_selection/src/traits/const_evaluatable.rs"]
|
[mentions."compiler/rustc_trait_selection/src/traits/const_evaluatable.rs"]
|
||||||
message = "Some changes occurred in const_evaluatable.rs"
|
message = "Some changes occurred in `const_evaluatable.rs`"
|
||||||
cc = ["@lcnr"]
|
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"]
|
[mentions."compiler/rustc_trait_selection/src/traits/engine.rs"]
|
||||||
message = """
|
message = """
|
||||||
|
Loading…
Reference in New Issue
Block a user