From d15ca0974ed716ae6c701add8757183d7550d766 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 6 Dec 2022 17:49:24 +0900 Subject: [PATCH 1/7] add a test for #104260 --- .../ui/associated-inherent-types/issue-104260.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/ui/associated-inherent-types/issue-104260.rs 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 = u8; +} + +fn main() { + let a: Foo::Bar<()>; +} From 50f090002ad782620ff00842b9f163c6bbc00d7d Mon Sep 17 00:00:00 2001 From: Boxy Date: Tue, 6 Dec 2022 16:33:19 +0000 Subject: [PATCH 2/7] add cg ping files things --- triagebot.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/triagebot.toml b/triagebot.toml index bc0b88b2bab..54523b029df 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -332,7 +332,15 @@ 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"] +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 = """ From 0070fae2dcbcdef6f107fc0acb2f078412b1e6fb Mon Sep 17 00:00:00 2001 From: Boxy Date: Tue, 6 Dec 2022 16:40:57 +0000 Subject: [PATCH 3/7] typo :( --- compiler/rustc_trait_selection/src/traits/const_evaluatable.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From 3ca5c821c250a8f7b3b99fc515521890c357da5c Mon Sep 17 00:00:00 2001 From: Boxy Date: Tue, 6 Dec 2022 16:45:11 +0000 Subject: [PATCH 4/7] CONSISTENCY Co-authored-by: lcnr --- triagebot.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/triagebot.toml b/triagebot.toml index 54523b029df..49945e5c533 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -331,7 +331,7 @@ 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" +message = "Some changes occurred in `const_evaluatable.rs`" cc = ["@BoxyUwU"] [mentions."compiler/rustc_middle/src/ty/abstract_const.rs"] From 75aec4703dea7ef8e13924ccfa3a3d2e8c5c7cff Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Mon, 5 Dec 2022 12:04:25 +0000 Subject: [PATCH 5/7] llvm-wrapper: adapt for and LLVM API change --- compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 11 ++++++++++- compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) 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 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 216c35d6da0..c717479a6a6 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), From 958a1ae0f764471e911ccf35582d1fb9bf063d61 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 6 Dec 2022 11:56:22 -0700 Subject: [PATCH 6/7] rustdoc: remove redundant CSS `.import-item .stab { font-size }` This sets the exact same font size that `.stab` has by default anyway. It used to be slightly different, but dd5ff428edbc7cd4fa600b81f27bbec28589704f made it identical. --- src/librustdoc/html/static/css/rustdoc.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 528e99d2ce0..a4df41b15c0 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -1015,7 +1015,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; From bc38c2ae67e5a5b6e67c592e3fdf67737785dbe0 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 6 Dec 2022 14:22:56 -0500 Subject: [PATCH 7/7] unstable-book: Add `ignore` to `abi_efiapi` example code This example doesn't compile on targets that don't support UEFI, as reported here: https://github.com/rust-lang/rust/pull/104793#issuecomment-1339783727 --- src/doc/unstable-book/src/language-features/abi-efiapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }