diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 7f4d63eed8bdf..1a3d458c30067 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 fromRust(LLVMRustCodeModel Model) { +#if LLVM_VERSION_LT(16, 0) +static Optional +#else +static std::optional +#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 PGOOpt; +#else + std::optional 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 792d921c6a4f9..3a748f38995bb 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 @@ -708,7 +710,11 @@ enum class LLVMRustChecksumKind { SHA256, }; +#if LLVM_VERSION_LT(16, 0) static Optional fromRust(LLVMRustChecksumKind Kind) { +#else +static std::optional 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 llvmCSKind = fromRust(CSKind); +#else + std::optional llvmCSKind = fromRust(CSKind); +#endif + +#if LLVM_VERSION_LT(16, 0) Optional> CSInfo{}; +#else + std::optional> 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 d01c6bac2963b..7cc0999478a3e 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 11ef0cfdb1422..b492da88474ee 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 0cd15768ac6e8..5ebc545d10c2b 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 0000000000000..a73cd1775b462 --- /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 = u8; +} + +fn main() { + let a: Foo::Bar<()>; +} diff --git a/triagebot.toml b/triagebot.toml index bc0b88b2babd2..49945e5c533cb 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 = """