Skip to content

Rollup of 10 pull requests #134019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
18f8657
Pass -bnoipath when adding rust upstream dynamic crates
Aug 9, 2024
1ae1f8c
Clarify comment
daltenty Dec 6, 2024
61fd92e
Removed Unnecessary Spaces From RELEASES.md
rohit141914 Dec 6, 2024
5d8233e
Define acronym for thread local storage
Will-Low Dec 6, 2024
120d6b2
Fix: typo in E0751 error explanation
off019 Dec 7, 2024
ab2ee7a
Use option "-sf" for the AIX "ln" command.
xingxue-ibm Dec 6, 2024
f884f18
Move tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs`
Zalathar Dec 7, 2024
db9e368
Actually walk into lifetimes and attrs in EarlyContextAndPass
compiler-errors Dec 7, 2024
0a48b96
Move more tests into `tests/ui/link-native-libs`
Zalathar Dec 7, 2024
8aacd1c
compiletest: show the difference between the normalized output and th…
jyn514 Dec 2, 2024
9b07e75
Add allocate_bytes and refactor allocate_str in InterpCx for raw byte…
shamb0 Dec 4, 2024
68253e1
Don't suggest restricting bound with unstable traits on stable
estebank Nov 27, 2024
d13c348
reword trait bound suggestion message to include the bounds
estebank Nov 28, 2024
568b0ac
Add test for lack of suggestion in stable
estebank Nov 28, 2024
3f2a63a
Use trait name instead of full constraint in suggestion message
estebank Nov 28, 2024
d860e5b
Mention type parameter in more cases and don't suggest ~const bound a…
estebank Nov 28, 2024
cb4db0a
Account for `impl Trait` in "add bound" suggestion message
estebank Nov 28, 2024
af09423
fix rustdoc test
estebank Nov 28, 2024
b466405
Do not talk about "trait `<Foo = Bar>`"
estebank Nov 28, 2024
6277fb0
Use run-make `diff` output for stable output test
estebank Nov 29, 2024
25ad047
Tweak wording
estebank Dec 7, 2024
b9f68fe
Rollup merge of #133522 - estebank:dont-suggest-unstable-trait, r=com…
workingjubilee Dec 8, 2024
c8cb6d2
Rollup merge of #133733 - jyn514:compiletest-diffs, r=jieyouxu
workingjubilee Dec 8, 2024
13ea986
Rollup merge of #133861 - shamb0:refactor_InterpCx_allocate_str, r=Ra…
workingjubilee Dec 8, 2024
eca5d60
Rollup merge of #133967 - daltenty:daltenty/bnoipath, r=jieyouxu
workingjubilee Dec 8, 2024
43f7177
Rollup merge of #133976 - rohit141914:master, r=workingjubilee
workingjubilee Dec 8, 2024
7e014de
Rollup merge of #133980 - xingxue-ibm:ln-option-aix, r=jieyouxu
workingjubilee Dec 8, 2024
72938f6
Rollup merge of #133987 - Will-Low:DefineTlsAcronym, r=workingjubilee
workingjubilee Dec 8, 2024
a402cda
Rollup merge of #133992 - compiler-errors:walk-fully, r=jieyouxu
workingjubilee Dec 8, 2024
4cd5e64
Rollup merge of #133993 - LuanOldCode:fix-e0571-typo, r=compiler-errors
workingjubilee Dec 8, 2024
f47a3f3
Rollup merge of #133996 - Zalathar:ui-link-native-libs, r=jieyouxu
workingjubilee Dec 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use trait name instead of full constraint in suggestion message
```
help: consider restricting type parameter `T` with traits `Copy` and `Trait`
   |
LL | fn duplicate_custom<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) {
   |                      ++++++++++++++
```

```
help: consider restricting type parameter `V` with trait `Copy`
   |
LL | fn index<'a, K, V: std::marker::Copy>(map: &'a HashMap<K, V>, k: K) -> &'a V {
   |                  +++++++++++++++++++
```
  • Loading branch information
estebank committed Dec 7, 2024
commit 3f2a63a68bbf4e84f7e409659bb64bdd75db39e5
84 changes: 61 additions & 23 deletions compiler/rustc_middle/src/ty/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ use std::fmt::Write;
use std::ops::ControlFlow;

use rustc_data_structures::fx::FxHashMap;
use rustc_errors::{Applicability, Diag, DiagArgValue, IntoDiagArg, into_diag_arg_using_display};
use rustc_errors::{
Applicability, Diag, DiagArgValue, IntoDiagArg, into_diag_arg_using_display, pluralize,
};
use rustc_hir::def::DefKind;
use rustc_hir::def_id::DefId;
use rustc_hir::{self as hir, LangItem, PredicateOrigin, WherePredicateKind};
Expand Down Expand Up @@ -288,7 +290,11 @@ pub fn suggest_constraining_type_params<'a>(
None => true,
};
if stable || tcx.sess.is_nightly_build() {
grouped.entry(param_name).or_insert(Vec::new()).push((constraint, def_id));
grouped.entry(param_name).or_insert(Vec::new()).push((
constraint,
def_id,
if stable { "" } else { "unstable " },
));
if !stable {
unstable_suggestion = true;
}
Expand All @@ -303,10 +309,10 @@ pub fn suggest_constraining_type_params<'a>(
let Some(param) = param else { return false };

{
let mut sized_constraints = constraints.extract_if(|(_, def_id)| {
let mut sized_constraints = constraints.extract_if(|(_, def_id, _)| {
def_id.is_some_and(|def_id| tcx.is_lang_item(def_id, LangItem::Sized))
});
if let Some((_, def_id)) = sized_constraints.next() {
if let Some((_, def_id, _)) = sized_constraints.next() {
applicability = Applicability::MaybeIncorrect;

err.span_label(param.span, "this type parameter needs to be `Sized`");
Expand All @@ -325,15 +331,52 @@ pub fn suggest_constraining_type_params<'a>(
.collect();

constraints
.retain(|(_, def_id)| def_id.map_or(true, |def| !bound_trait_defs.contains(&def)));
.retain(|(_, def_id, _)| def_id.map_or(true, |def| !bound_trait_defs.contains(&def)));

if constraints.is_empty() {
continue;
}

let mut constraint = constraints.iter().map(|&(c, _)| c).collect::<Vec<_>>();
let mut constraint = constraints.iter().map(|&(c, _, _)| c).collect::<Vec<_>>();
constraint.sort();
constraint.dedup();
let all_stable = constraints.iter().all(|&(_, _, stable)| stable.is_empty());
let all_unstable = constraints.iter().all(|&(_, _, stable)| !stable.is_empty());
let post = if all_stable || all_unstable {
// Don't redundantly say "trait `X`, trait `Y`", instead "traits `X` and `Y`"
let mut trait_names = constraints
.iter()
.map(|&(c, def_id, _)| match def_id {
None => format!("`{c}`"),
Some(def_id) => format!("`{}`", tcx.item_name(def_id)),
})
.collect::<Vec<_>>();
trait_names.sort();
trait_names.dedup();
let n = trait_names.len();
let stable = if all_stable { "" } else { "unstable " };
format!("{stable}trait{} {}", pluralize!(n), match &trait_names[..] {
[t] => t.to_string(),
[ts @ .., last] => format!("{} and {last}", ts.join(", ")),
[] => return false,
},)
} else {
// We're more explicit when there's a mix of stable and unstable traits.
let mut trait_names = constraints
.iter()
.map(|&(c, def_id, stable)| match def_id {
None => format!("{stable}trait `{c}`"),
Some(def_id) => format!("{stable}trait `{}`", tcx.item_name(def_id)),
})
.collect::<Vec<_>>();
trait_names.sort();
trait_names.dedup();
match &trait_names[..] {
[t] => t.to_string(),
[ts @ .., last] => format!("{} and {last}", ts.join(", ")),
[] => return false,
}
};
let constraint = constraint.join(" + ");
let mut suggest_restrict = |span, bound_list_non_empty, open_paren_sp| {
let suggestion = if span_to_replace.is_some() {
Expand All @@ -351,18 +394,18 @@ pub fn suggest_constraining_type_params<'a>(
if let Some(open_paren_sp) = open_paren_sp {
suggestions.push((
open_paren_sp,
constraint.clone(),
post.clone(),
"(".to_string(),
RestrictBoundFurther,
));
suggestions.push((
span,
constraint.clone(),
post.clone(),
format!("){suggestion}"),
RestrictBoundFurther,
));
} else {
suggestions.push((span, constraint.clone(), suggestion, RestrictBoundFurther));
suggestions.push((span, post.clone(), suggestion, RestrictBoundFurther));
}
};

Expand Down Expand Up @@ -420,8 +463,8 @@ pub fn suggest_constraining_type_params<'a>(
// - insert: `, X: Bar`
suggestions.push((
generics.tail_span_for_predicate_suggestion(),
constraint.clone(),
constraints.iter().fold(String::new(), |mut string, &(constraint, _)| {
post,
constraints.iter().fold(String::new(), |mut string, &(constraint, _, _)| {
write!(string, ", {param_name}: {constraint}").unwrap();
string
}),
Expand Down Expand Up @@ -450,7 +493,7 @@ pub fn suggest_constraining_type_params<'a>(
// default (`<T=Foo>`), so we suggest adding `where T: Bar`.
suggestions.push((
generics.tail_span_for_predicate_suggestion(),
constraint.clone(),
post,
format!("{where_prefix} {param_name}: {constraint}"),
SuggestChangingConstraintsMessage::RestrictTypeFurther { ty: param_name },
));
Expand All @@ -464,7 +507,7 @@ pub fn suggest_constraining_type_params<'a>(
if let Some(colon_span) = param.colon_span {
suggestions.push((
colon_span.shrink_to_hi(),
constraint.clone(),
post,
format!(" {constraint}"),
SuggestChangingConstraintsMessage::RestrictType { ty: param_name },
));
Expand All @@ -477,7 +520,7 @@ pub fn suggest_constraining_type_params<'a>(
// - help: consider restricting this type parameter with `T: Foo`
suggestions.push((
param.span.shrink_to_hi(),
constraint.clone(),
post,
format!(": {constraint}"),
SuggestChangingConstraintsMessage::RestrictType { ty: param_name },
));
Expand All @@ -490,21 +533,16 @@ pub fn suggest_constraining_type_params<'a>(
.collect::<Vec<_>>();
let suggested = !suggestions.is_empty();
if suggestions.len() == 1 {
let (span, constraint, suggestion, msg) = suggestions.pop().unwrap();
let post = format!(
" with {}trait{} `{constraint}`",
if unstable_suggestion { "unstable " } else { "" },
if constraint.contains('+') { "s" } else { "" },
);
let (span, post, suggestion, msg) = suggestions.pop().unwrap();
let msg = match msg {
SuggestChangingConstraintsMessage::RestrictBoundFurther => {
format!("consider further restricting this bound{post}")
format!("consider further restricting this bound with {post}")
}
SuggestChangingConstraintsMessage::RestrictType { ty } => {
format!("consider restricting type parameter `{ty}`{post}")
format!("consider restricting type parameter `{ty}` with {post}")
}
SuggestChangingConstraintsMessage::RestrictTypeFurther { ty } => {
format!("consider further restricting type parameter `{ty}`{post}")
format!("consider further restricting type parameter `{ty}` with {post}")
}
SuggestChangingConstraintsMessage::RemoveMaybeUnsized => {
format!("consider removing the `?Sized` bound to make the type parameter `Sized`")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: the trait bound `C: Bar<5>` is not satisfied
LL | pub struct Structure<C: Tec> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
help: consider further restricting this bound with trait `Bar<5>`
help: consider further restricting this bound with trait `Bar`
|
LL | pub struct Structure<C: Tec + Bar<5>> {
| ++++++++
Expand All @@ -15,7 +15,7 @@ error[E0277]: the trait bound `C: Bar<5>` is not satisfied
LL | _field: C::BarType,
| ^^^^^^^^^^ the trait `Bar<5>` is not implemented for `C`
|
help: consider further restricting this bound with trait `Bar<5>`
help: consider further restricting this bound with trait `Bar`
|
LL | pub struct Structure<C: Tec + Bar<5>> {
| ++++++++
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/associated-types/defaults-suitability.current.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ note: required by a bound in `Foo::Bar`
|
LL | type Bar: Clone = Vec<T>;
| ^^^^^ required by this bound in `Foo::Bar`
help: consider restricting type parameter `T` with trait `std::clone::Clone`
help: consider restricting type parameter `T` with trait `Clone`
|
LL | trait Foo<T: std::clone::Clone> {
| +++++++++++++++++++
Expand Down Expand Up @@ -132,7 +132,7 @@ LL | Self::Baz: Clone,
...
LL | type Baz = T;
| --- required by a bound in this associated type
help: consider further restricting type parameter `T` with trait `std::clone::Clone`
help: consider further restricting type parameter `T` with trait `Clone`
|
LL | Self::Baz: Clone, T: std::clone::Clone
| ~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/associated-types/defaults-suitability.next.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ note: required by a bound in `Foo::Bar`
|
LL | type Bar: Clone = Vec<T>;
| ^^^^^ required by this bound in `Foo::Bar`
help: consider restricting type parameter `T` with trait `std::clone::Clone`
help: consider restricting type parameter `T` with trait `Clone`
|
LL | trait Foo<T: std::clone::Clone> {
| +++++++++++++++++++
Expand Down Expand Up @@ -132,7 +132,7 @@ LL | Self::Baz: Clone,
...
LL | type Baz = T;
| --- required by a bound in this associated type
help: consider further restricting type parameter `T` with trait `std::clone::Clone`
help: consider further restricting type parameter `T` with trait `Clone`
|
LL | Self::Baz: Clone, T: std::clone::Clone
| ~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: the trait bound `for<'b> T: X<'b, T>` is not satisfied
LL | impl<S, T> X<'_, T> for (S,) {
| ^^^^^^^^ the trait `for<'b> X<'b, T>` is not implemented for `T`
|
help: consider restricting type parameter `T` with trait `for<'b> X<'b, T>`
help: consider restricting type parameter `T` with trait `X`
|
LL | impl<S, T: for<'b> X<'b, T>> X<'_, T> for (S,) {
| ++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ note: required by a bound in `copy`
|
LL | fn copy<U: Setup + ?Sized>(from: &U::From) -> U::From {
| ^^^^^ required by this bound in `copy`
help: consider restricting type parameter `T` with trait `std::marker::Copy`
help: consider restricting type parameter `T` with trait `Copy`
|
LL | pub fn copy_any<T: std::marker::Copy>(t: &T) -> T {
| +++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ note: required by a bound in `Complete::Assoc`
|
LL | type Assoc: Partial<Self>;
| ^^^^^^^^^^^^^ required by this bound in `Complete::Assoc`
help: consider restricting type parameter `T` with trait `std::marker::Copy`
help: consider restricting type parameter `T` with trait `Copy`
|
LL | impl<T: std::marker::Copy> Complete for T {
| +++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/issue-70818.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ note: captured value is not `Send`
|
LL | async { (ty, ty1) }
| ^^^ has type `U` which is not `Send`
help: consider restricting type parameter `U` with trait `std::marker::Send`
help: consider restricting type parameter `U` with trait `Send`
|
LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
| +++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/async-await/issue-86507.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ note: captured value is not `Send` because `&` references cannot be sent unless
LL | let x = x;
| ^ has type `&T` which is not `Send`, because `T` is not `Sync`
= note: required for the cast from `Pin<Box<{async block@$DIR/issue-86507.rs:18:17: 18:27}>>` to `Pin<Box<(dyn Future<Output = ()> + Send + 'async_trait)>>`
help: consider further restricting this bound with trait `std::marker::Sync`
help: consider further restricting this bound with trait `Sync`
|
LL | fn bar<'me, 'async_trait, T: Send + std::marker::Sync>(x: &'me T)
| +++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/binop/issue-93927.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LL | val == val
| |
| MyType<T>
|
help: consider further restricting this bound with trait `std::cmp::Eq`
help: consider further restricting this bound with trait `Eq`
|
LL | fn cond<T: PartialEq + std::cmp::Eq>(val: MyType<T>) -> bool {
| ++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ note: required by a bound in `Foo`
|
LL | trait Foo : Send+Sync { }
| ^^^^ required by this bound in `Foo`
help: consider further restricting this bound with trait `std::marker::Send`
help: consider further restricting this bound with trait `Send`
|
LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
| +++++++++++++++++++
Expand All @@ -27,7 +27,7 @@ note: required by a bound in `Foo`
|
LL | trait Foo : Send+Sync { }
| ^^^^ required by this bound in `Foo`
help: consider further restricting this bound with trait `std::marker::Sync`
help: consider further restricting this bound with trait `Sync`
|
LL | impl <T: Send + std::marker::Sync> Foo for (T,T) { }
| +++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ note: required by a bound in `RequiresRequiresShareAndSend`
|
LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
| ^^^^ required by this bound in `RequiresRequiresShareAndSend`
help: consider further restricting this bound with trait `std::marker::Send`
help: consider further restricting this bound with trait `Send`
|
LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }
| +++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ note: required by a bound in `Foo`
|
LL | trait Foo : Send { }
| ^^^^ required by this bound in `Foo`
help: consider further restricting this bound with trait `std::marker::Send`
help: consider further restricting this bound with trait `Send`
|
LL | impl <T: Sync+'static + std::marker::Send> Foo for T { }
| +++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ note: required by a bound in `X`
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
| ^^^^ required by this bound in `X`
help: consider further restricting this bound with trait `std::marker::Send`
help: consider further restricting this bound with trait `Send`
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
| +++++++++++++++++++
Expand All @@ -25,7 +25,7 @@ note: required by a bound in `X`
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
| ^^^^ required by this bound in `X`
help: consider further restricting this bound with trait `std::marker::Send`
help: consider further restricting this bound with trait `Send`
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
| +++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/closures/closure-bounds-subtype.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ help: use parentheses to call this type parameter
|
LL | take_const_owned(f());
| ++
help: consider further restricting this bound with trait `std::marker::Sync`
help: consider further restricting this bound with trait `Sync`
|
LL | fn give_owned<F>(f: F) where F: FnOnce() + Send + std::marker::Sync {
| +++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/const-generics/issues/issue-61336-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | [x; { N }]
= note: the `Copy` trait is required because this value will be copied for each element of the array
= help: consider using `core::array::from_fn` to initialize the array
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider restricting type parameter `T` with trait `std::marker::Copy`
help: consider restricting type parameter `T` with trait `Copy`
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
| +++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/const-generics/issues/issue-61336.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LL | [x; N]
= note: the `Copy` trait is required because this value will be copied for each element of the array
= help: consider using `core::array::from_fn` to initialize the array
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider restricting type parameter `T` with trait `std::marker::Copy`
help: consider restricting type parameter `T` with trait `Copy`
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {
| +++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/consts/ct-var-in-collect_all_mismatches.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LL | fn unsatisfied(self)
LL | where
LL | T: Bar<N>,
| ^^^^^^ required by this bound in `Foo::<T, N>::unsatisfied`
help: consider restricting type parameter `T` with trait `Bar<N>`
help: consider restricting type parameter `T` with trait `Bar`
|
LL | impl<T: Bar<N>, const N: usize> Foo<T, N> {
| ++++++++
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/dropck/explicit-drop-bounds.bad1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ note: required by a bound in `DropMe`
|
LL | struct DropMe<T: Copy>(T);
| ^^^^ required by this bound in `DropMe`
help: consider further restricting type parameter `T` with trait `std::marker::Copy`
help: consider further restricting type parameter `T` with trait `Copy`
|
LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
| ~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -25,7 +25,7 @@ note: required by a bound in `DropMe`
|
LL | struct DropMe<T: Copy>(T);
| ^^^^ required by this bound in `DropMe`
help: consider further restricting type parameter `T` with trait `std::marker::Copy`
help: consider further restricting type parameter `T` with trait `Copy`
|
LL | [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
| ~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading