Rollup merge of #120285 - est31:remove_extra_pound, r=fmease

Remove extra # from url in suggestion

The suggestion added in #119805 contains an unnecessary # hash sign.
This commit is contained in:
León Orell Valerian Liehr 2024-01-24 15:43:14 +01:00 committed by GitHub
commit 7403d5821a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 11 additions and 11 deletions

View File

@ -3155,7 +3155,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
} else {
// FIXME: we may suggest array::repeat instead
err.help("consider using `core::array::from_fn` to initialize the array");
err.help("see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information");
err.help("see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information");
}
if self.tcx.sess.is_nightly_build()

View File

@ -6,7 +6,7 @@ LL | let headers = [Header{value: &[]}; 128];
|
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider annotating `Header<'_>` with `#[derive(Copy)]`
|
LL + #[derive(Copy)]
@ -21,7 +21,7 @@ LL | let headers = [Header{value: &[0]}; 128];
|
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider annotating `Header<'_>` with `#[derive(Copy)]`
|
LL + #[derive(Copy)]

View File

@ -6,7 +6,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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider restricting type parameter `T`
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {

View File

@ -6,7 +6,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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider restricting type parameter `T`
|
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {

View File

@ -7,7 +7,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: required for `Option<Bar>` to implement `Copy`
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider annotating `Bar` with `#[derive(Copy)]`
|
LL + #[derive(Copy)]
@ -23,7 +23,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: required for `Option<Bar>` to implement `Copy`
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider annotating `Bar` with `#[derive(Copy)]`
|
LL + #[derive(Copy)]

View File

@ -7,7 +7,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: required for `Option<Bar>` to implement `Copy`
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider annotating `Bar` with `#[derive(Copy)]`
|
LL + #[derive(Copy)]
@ -23,7 +23,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
= note: required for `Option<Bar>` to implement `Copy`
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider annotating `Bar` with `#[derive(Copy)]`
|
LL + #[derive(Copy)]

View File

@ -6,7 +6,7 @@ LL | let _ = [ a; 5 ];
|
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
help: consider annotating `Foo` with `#[derive(Copy)]`
|
LL + #[derive(Copy)]

View File

@ -6,7 +6,7 @@ LL | let string_arr = [foo(); 64];
|
= 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: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
error: aborting due to 1 previous error