54bd3a7b8d
Tweak some structured suggestions to be more verbose and accurate Addressing some issues I found while working on #127282. ``` error: this URL is not a hyperlink --> $DIR/auxiliary/include-str-bare-urls.md:1:11 | LL | HEADS UP! https://example.com MUST SHOW UP IN THE STDERR FILE! | ^^^^^^^^^^^^^^^^^^^ | = note: bare URLs are not automatically turned into clickable links note: the lint level is defined here --> $DIR/include-str-bare-urls.rs:14:9 | LL | #![deny(rustdoc::bare_urls)] | ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead | LL | HEADS UP! <https://example.com> MUST SHOW UP IN THE STDERR FILE! | + + ``` ``` error[E0384]: cannot assign twice to immutable variable `v` --> $DIR/assign-imm-local-twice.rs:7:5 | LL | v = 1; | ----- first assignment to `v` LL | println!("v={}", v); LL | v = 2; | ^^^^^ cannot assign twice to immutable variable | help: consider making this binding mutable | LL | let mut v: isize; | +++ ``` ``` error[E0393]: the type parameter `Rhs` must be explicitly specified --> $DIR/issue-22560.rs:9:23 | LL | trait Sub<Rhs=Self> { | ------------------- type parameter `Rhs` must be specified for this ... LL | type Test = dyn Add + Sub; | ^^^ | = note: because of the default `Self` reference, type parameters must be specified on object types help: set the type parameter to the desired type | LL | type Test = dyn Add + Sub<Rhs>; | +++++ ``` ``` error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable --> $DIR/issue-33819.rs:4:34 | LL | Some(ref v) => { let a = &mut v; }, | ^^^^^^ cannot borrow as mutable | help: try removing `&mut` here | LL - Some(ref v) => { let a = &mut v; }, LL + Some(ref v) => { let a = v; }, | ``` ``` help: remove the invocation before committing it to a version control system | LL - dbg!(); | ``` ``` error[E0308]: mismatched types --> $DIR/issue-39974.rs:1:21 | LL | const LENGTH: f64 = 2; | ^ expected `f64`, found integer | help: use a float literal | LL | const LENGTH: f64 = 2.0; | ++ ``` ``` error[E0529]: expected an array or slice, found `Vec<i32>` --> $DIR/match-ergonomics.rs:8:9 | LL | [&v] => {}, | ^^^^ pattern cannot match with input type `Vec<i32>` | help: consider slicing here | LL | match x[..] { | ++++ ``` ``` error[E0609]: no field `0` on type `[u32; 1]` --> $DIR/parenthesized-deref-suggestion.rs:10:21 | LL | (x as [u32; 1]).0; | ^ unknown field | help: instead of using tuple indexing, use array indexing | LL | (x as [u32; 1])[0]; | ~ + ``` |
||
---|---|---|
.. | ||
argfile | ||
auxiliary | ||
coverage | ||
doctest | ||
error-in-impl-trait | ||
generate-link-to-definition | ||
intra-doc | ||
issues | ||
lints | ||
scrape-examples | ||
suggestions | ||
synthetic-auto-trait-impls | ||
ambiguous-inherent-assoc-ty.rs | ||
apit-46976.rs | ||
bounded-hr-lifetime.rs | ||
bounded-hr-lifetime.stderr | ||
check-cfg.rs | ||
check-cfg.stderr | ||
check-doc-alias-attr-location.rs | ||
check-doc-alias-attr-location.stderr | ||
check-doc-alias-attr.rs | ||
check-doc-alias-attr.stderr | ||
circular-intra-doc-link-48414.rs | ||
const_arg_in_type_position.rs | ||
const_arg_in_type_position.stderr | ||
const-evalutation-ice.rs | ||
const-evalutation-ice.stderr | ||
crate-reference-in-block-module.rs | ||
crate-reference-in-block-module.stderr | ||
custom_code_classes_in_docs-warning3.rs | ||
custom_code_classes_in_docs-warning3.stderr | ||
deprecated-attrs.rs | ||
deprecated-attrs.stderr | ||
deref-generic.rs | ||
diagnostic-width.rs | ||
diagnostic-width.stderr | ||
disambiguator-endswith-named-suffix.rs | ||
disambiguator-endswith-named-suffix.stderr | ||
disambiguator-macro-endswith-exclamatory.rs | ||
disambiguator-macro-endswith-exclamatory.stderr | ||
doc-alias-assoc-const.rs | ||
doc-alias-assoc-const.stderr | ||
doc-alias-crate-level.rs | ||
doc-alias-crate-level.stderr | ||
doc-alias-same-name.rs | ||
doc-alias-same-name.stderr | ||
doc-cfg.rs | ||
doc-cfg.stderr | ||
doc-include-suggestion.rs | ||
doc-include-suggestion.stderr | ||
feature-gate-doc_cfg_hide.rs | ||
feature-gate-doc_cfg_hide.stderr | ||
hidden-trait-method-34423.rs | ||
ice-assoc-const-for-primitive-31808.rs | ||
ice-blanket-impl-52873.rs | ||
ice-blanket-impl-56701.rs | ||
ice-blanket-impl-119792.rs | ||
ice-blanket-impl-selection-55001.rs | ||
ice-bug-report-url.rs | ||
ice-bug-report-url.stderr | ||
ice-cross-crate-opaque-assoc-type-73061.rs | ||
ignore-block-help.rs | ||
ignore-block-help.stderr | ||
impl-fn-nesting.rs | ||
impl-fn-nesting.stderr | ||
include-str-bare-urls.rs | ||
include-str-bare-urls.stderr | ||
infinite-recursive-type.rs | ||
infinite-recursive-type.stderr | ||
inherent-assoc-consts-36031.rs | ||
invalid_associated_const.rs | ||
invalid_associated_const.stderr | ||
invalid_const_in_lifetime_position.rs | ||
invalid_const_in_lifetime_position.stderr | ||
invalid_infered_static_and_const.rs | ||
invalid_infered_static_and_const.stderr | ||
invalid-cfg.rs | ||
invalid-cfg.stderr | ||
invalid-keyword.rs | ||
invalid-keyword.stderr | ||
invalid-redundant-explicit-link.rs | ||
invalid-syntax.rs | ||
invalid-syntax.stderr | ||
invalid-theme-name.rs | ||
invalid-theme-name.stderr | ||
issue-102467.rs | ||
issue-102467.stderr | ||
issue-110629-private-type-cycle-dyn.rs | ||
issue-110629-private-type-cycle-dyn.stderr | ||
issue-110629-private-type-cycle.rs | ||
macro-docs.rs | ||
macro-docs.stderr | ||
macro-docs.stdout | ||
mismatched_arg_count.rs | ||
mismatched_arg_count.stderr | ||
nested-extern-crate-46271.rs | ||
nested-macro-rules-47639.rs | ||
normalize-cycle.rs | ||
normalize-in-inlined-type-alias.rs | ||
normalize-overflow.rs | ||
not-wf-ambiguous-normalization.rs | ||
not-wf-ambiguous-normalization.stderr | ||
output-format-html-stable.rs | ||
proc_macro_bug.rs | ||
proc_macro_bug.stderr | ||
pub-use-primitive-document-private-items-95633.rs | ||
range-pattern.rs | ||
recursive-deref-ice.rs | ||
redundant-explicit-links-123677.rs | ||
remap-path-prefix-failed-doctest-output.rs | ||
remap-path-prefix-failed-doctest-output.stdout | ||
remap-path-prefix-invalid-doctest.rs | ||
remap-path-prefix-invalid-doctest.stdout | ||
remap-path-prefix-passed-doctest-output.rs | ||
remap-path-prefix-passed-doctest-output.stdout | ||
rustc-check-passes.rs | ||
rustc-check-passes.stderr | ||
search-index-generics-recursion-bug-issue-59502.rs | ||
super-glob-40936.rs | ||
track-diagnostics.rs | ||
track-diagnostics.stderr | ||
tuple-variadic-check.rs | ||
tuple-variadic-check.stderr | ||
unable-fulfill-trait.rs | ||
unable-fulfill-trait.stderr | ||
unescaped_backticks.rs | ||
unescaped_backticks.stderr | ||
unportable-markdown.rs | ||
unportable-markdown.stderr | ||
unused-extern-crate.rs | ||
use_both_out_dir_and_output_options.rs | ||
use_both_out_dir_and_output_options.stderr | ||
wasm-safe.rs |