Auto merge of #82935 - henryboisdequin:diagnostic-cleanups, r=estebank
Diagnostic cleanups Follow up to #81503 Helps with #82916 (don't show note if `span` is `DUMMY_SP`)
This commit is contained in:
commit
0cc64a34e9
6 changed files with 46 additions and 12 deletions
|
@ -1908,7 +1908,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
|
||||
if is_const_fn {
|
||||
err.help(
|
||||
"consider creating a new `const` item and initializing with the result \
|
||||
"consider creating a new `const` item and initializing it with the result \
|
||||
of the function call to be used in the repeat position, like \
|
||||
`const VAL: Type = const_fn();` and `let x = [VAL; 42];`",
|
||||
);
|
||||
|
@ -1916,7 +1916,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
|
|||
|
||||
if self.tcx.sess.is_nightly_build() && is_const_fn {
|
||||
err.help(
|
||||
"create an inline `const` block, see PR \
|
||||
"create an inline `const` block, see RFC \
|
||||
#2920 <https://github.com/rust-lang/rfcs/pull/2920> \
|
||||
for more information",
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue