about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-31 17:29:54 +0200
committerGitHub <noreply@github.com>2022-03-31 17:29:54 +0200
commit1f86789bb3a67c21b88c0f4050d4794de2a128ba (patch)
tree03bc7ae2cecaf9ed436211148558a25498399cd8 /compiler/rustc_middle/src
parenteb0e8c3418fd4f89743b5b12c84e4f683748ea1a (diff)
parent89c66eb42d385975c91d79de139b50c298414d71 (diff)
downloadrust-1f86789bb3a67c21b88c0f4050d4794de2a128ba.tar.gz
rust-1f86789bb3a67c21b88c0f4050d4794de2a128ba.zip
Rollup merge of #95517 - lcnr:rustc_borrowck-misc, r=jackh726
small rustc_borrowck cleanup

r? `@jackh726` because of the second commit, seems like that comment was missed in #91243
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/traits/mod.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs
index 3d0a0d2a58e..1f18260d915 100644
--- a/compiler/rustc_middle/src/traits/mod.rs
+++ b/compiler/rustc_middle/src/traits/mod.rs
@@ -236,11 +236,12 @@ pub enum ObligationCauseCode<'tcx> {
     SizedBoxType,
     /// Inline asm operand type must be `Sized`.
     InlineAsmSized,
-    /// `[T, ..n]` implies that `T` must be `Copy`.
-    /// If the function in the array repeat expression is a `const fn`,
-    /// display a help message suggesting to move the function call to a
-    /// new `const` item while saying that `T` doesn't implement `Copy`.
-    RepeatVec(bool),
+    /// `[expr; N]` requires `type_of(expr): Copy`.
+    RepeatElementCopy {
+        /// If element is a `const fn` we display a help message suggesting to move the
+        /// function call to a new `const` item while saying that `T` doesn't implement `Copy`.
+        is_const_fn: bool,
+    },
 
     /// Types of fields (other than the last, except for packed structs) in a struct must be sized.
     FieldSized {