Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1c10029

Browse files
authoredJan 24, 2024
Rollup merge of rust-lang#120285 - est31:remove_extra_pound, r=fmease
Remove extra # from url in suggestion The suggestion added in rust-lang#119805 contains an unnecessary # hash sign.
2 parents 0fcd5a1 + 9676e18 commit 1c10029

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed
 

‎compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3155,7 +3155,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
31553155
} else {
31563156
// FIXME: we may suggest array::repeat instead
31573157
err.help("consider using `core::array::from_fn` to initialize the array");
3158-
err.help("see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information");
3158+
err.help("see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information");
31593159
}
31603160

31613161
if self.tcx.sess.is_nightly_build()

‎tests/ui/array-slice-vec/repeat_empty_ok.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let headers = [Header{value: &[]}; 128];
66
|
77
= note: the `Copy` trait is required because this value will be copied for each element of the array
88
= help: consider using `core::array::from_fn` to initialize the array
9-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
9+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
1010
help: consider annotating `Header<'_>` with `#[derive(Copy)]`
1111
|
1212
LL + #[derive(Copy)]
@@ -21,7 +21,7 @@ LL | let headers = [Header{value: &[0]}; 128];
2121
|
2222
= note: the `Copy` trait is required because this value will be copied for each element of the array
2323
= help: consider using `core::array::from_fn` to initialize the array
24-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
24+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
2525
help: consider annotating `Header<'_>` with `#[derive(Copy)]`
2626
|
2727
LL + #[derive(Copy)]

‎tests/ui/const-generics/issues/issue-61336-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | [x; { N }]
66
|
77
= note: the `Copy` trait is required because this value will be copied for each element of the array
88
= help: consider using `core::array::from_fn` to initialize the array
9-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
9+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
1010
help: consider restricting type parameter `T`
1111
|
1212
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {

‎tests/ui/const-generics/issues/issue-61336.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | [x; N]
66
|
77
= note: the `Copy` trait is required because this value will be copied for each element of the array
88
= help: consider using `core::array::from_fn` to initialize the array
9-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
9+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
1010
help: consider restricting type parameter `T`
1111
|
1212
LL | fn g<T: std::marker::Copy, const N: usize>(x: T) -> [T; N] {

‎tests/ui/consts/const-blocks/migrate-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
77
= note: required for `Option<Bar>` to implement `Copy`
88
= note: the `Copy` trait is required because this value will be copied for each element of the array
99
= help: consider using `core::array::from_fn` to initialize the array
10-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
10+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
1111
help: consider annotating `Bar` with `#[derive(Copy)]`
1212
|
1313
LL + #[derive(Copy)]
@@ -23,7 +23,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
2323
= note: required for `Option<Bar>` to implement `Copy`
2424
= note: the `Copy` trait is required because this value will be copied for each element of the array
2525
= help: consider using `core::array::from_fn` to initialize the array
26-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
26+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
2727
help: consider annotating `Bar` with `#[derive(Copy)]`
2828
|
2929
LL + #[derive(Copy)]

‎tests/ui/consts/const-blocks/nll-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
77
= note: required for `Option<Bar>` to implement `Copy`
88
= note: the `Copy` trait is required because this value will be copied for each element of the array
99
= help: consider using `core::array::from_fn` to initialize the array
10-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
10+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
1111
help: consider annotating `Bar` with `#[derive(Copy)]`
1212
|
1313
LL + #[derive(Copy)]
@@ -23,7 +23,7 @@ LL | let arr: [Option<Bar>; 2] = [x; 2];
2323
= note: required for `Option<Bar>` to implement `Copy`
2424
= note: the `Copy` trait is required because this value will be copied for each element of the array
2525
= help: consider using `core::array::from_fn` to initialize the array
26-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
26+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
2727
help: consider annotating `Bar` with `#[derive(Copy)]`
2828
|
2929
LL + #[derive(Copy)]

‎tests/ui/repeat-expr/repeat-to-run-dtor-twice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let _ = [ a; 5 ];
66
|
77
= note: the `Copy` trait is required because this value will be copied for each element of the array
88
= help: consider using `core::array::from_fn` to initialize the array
9-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
9+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
1010
help: consider annotating `Foo` with `#[derive(Copy)]`
1111
|
1212
LL + #[derive(Copy)]

‎tests/ui/trait-bounds/issue-119530-sugg-from-fn.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | let string_arr = [foo(); 64];
66
|
77
= note: the `Copy` trait is required because this value will be copied for each element of the array
88
= help: consider using `core::array::from_fn` to initialize the array
9-
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html# for more information
9+
= help: see https://doc.rust-lang.org/stable/std/array/fn.from_fn.html for more information
1010

1111
error: aborting due to 1 previous error
1212

0 commit comments

Comments
 (0)
Please sign in to comment.