Make issue references consistent

This commit is contained in:
Matthias Prechtl 2020-02-07 13:06:35 +01:00
parent 1ad6b5e1e6
commit f35a7c38da
16 changed files with 89 additions and 50 deletions

View File

@ -700,11 +700,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
if self.predicate_may_hold(&unit_obligation) { if self.predicate_may_hold(&unit_obligation) {
err.note( err.note(
"the trait is implemented for `()`. \ "the trait is implemented for `()`. \
Possibly this error has been caused by changes to \ Possibly this error has been caused by changes to \
Rust's type-inference algorithm \ Rust's type-inference algorithm (see issue #48950 \
(see: https://github.com/rust-lang/rust/issues/48950 \ <https://github.com/rust-lang/rust/issues/48950> \
for more info). Consider whether you meant to use the \ for more information). Consider whether you meant to use \
type `()` here instead.", the type `()` here instead.",
); );
} }
} }

View File

@ -1508,9 +1508,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
); );
if suggest_const_in_array_repeat_expressions { if suggest_const_in_array_repeat_expressions {
err.note( err.note(
"this array initializer can be evaluated at compile-time, for more \ "this array initializer can be evaluated at compile-time, see issue \
information, see issue \ #48147 <https://github.com/rust-lang/rust/issues/49147> \
https://github.com/rust-lang/rust/issues/49147", for more information",
); );
if tcx.sess.opts.unstable_features.is_nightly_build() { if tcx.sess.opts.unstable_features.is_nightly_build() {
err.help( err.help(

View File

@ -483,8 +483,9 @@ impl Trait for X {
if ty.is_closure() || ty.is_generator() { if ty.is_closure() || ty.is_generator() {
db.note( db.note(
"closures cannot capture themselves or take themselves as argument;\n\ "closures cannot capture themselves or take themselves as argument;\n\
this error may be the result of a recent compiler bug-fix,\n\ this error may be the result of a recent compiler bug-fix,\n\
see https://github.com/rust-lang/rust/issues/46062 for more details", see issue #46062 <https://github.com/rust-lang/rust/issues/46062>\n\
for more information",
); );
} }
} }

View File

@ -996,7 +996,8 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
) )
.span_label(predicate.span, "not supported") .span_label(predicate.span, "not supported")
.note( .note(
"for more information, see https://github.com/rust-lang/rust/issues/20041", "see issue #20041 <https://github.com/rust-lang/rust/issues/20041> \
for more information",
) )
.emit(); .emit();
} }

View File

@ -324,47 +324,58 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
); );
store.register_removed( store.register_removed(
"hr_lifetime_in_assoc_type", "hr_lifetime_in_assoc_type",
"converted into hard error, see https://github.com/rust-lang/rust/issues/33685", "converted into hard error, see issue #33685 \
<https://github.com/rust-lang/rust/issues/33685> for more information",
); );
store.register_removed( store.register_removed(
"inaccessible_extern_crate", "inaccessible_extern_crate",
"converted into hard error, see https://github.com/rust-lang/rust/issues/36886", "converted into hard error, see issue #36886 \
<https://github.com/rust-lang/rust/issues/36886> for more information",
); );
store.register_removed( store.register_removed(
"super_or_self_in_global_path", "super_or_self_in_global_path",
"converted into hard error, see https://github.com/rust-lang/rust/issues/36888", "converted into hard error, see issue #36888 \
<https://github.com/rust-lang/rust/issues/36888> for more information",
); );
store.register_removed( store.register_removed(
"overlapping_inherent_impls", "overlapping_inherent_impls",
"converted into hard error, see https://github.com/rust-lang/rust/issues/36889", "converted into hard error, see issue #36889 \
<https://github.com/rust-lang/rust/issues/36889> for more information",
); );
store.register_removed( store.register_removed(
"illegal_floating_point_constant_pattern", "illegal_floating_point_constant_pattern",
"converted into hard error, see https://github.com/rust-lang/rust/issues/36890", "converted into hard error, see issue #36890 \
<https://github.com/rust-lang/rust/issues/36890> for more information",
); );
store.register_removed( store.register_removed(
"illegal_struct_or_enum_constant_pattern", "illegal_struct_or_enum_constant_pattern",
"converted into hard error, see https://github.com/rust-lang/rust/issues/36891", "converted into hard error, see issue #36891 \
<https://github.com/rust-lang/rust/issues/36891> for more information",
); );
store.register_removed( store.register_removed(
"lifetime_underscore", "lifetime_underscore",
"converted into hard error, see https://github.com/rust-lang/rust/issues/36892", "converted into hard error, see issue #36892 \
<https://github.com/rust-lang/rust/issues/36892> for more information",
); );
store.register_removed( store.register_removed(
"extra_requirement_in_impl", "extra_requirement_in_impl",
"converted into hard error, see https://github.com/rust-lang/rust/issues/37166", "converted into hard error, see issue #37166 \
<https://github.com/rust-lang/rust/issues/37166> for more information",
); );
store.register_removed( store.register_removed(
"legacy_imports", "legacy_imports",
"converted into hard error, see https://github.com/rust-lang/rust/issues/38260", "converted into hard error, see issue #38260 \
<https://github.com/rust-lang/rust/issues/38260> for more information",
); );
store.register_removed( store.register_removed(
"coerce_never", "coerce_never",
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950", "converted into hard error, see issue #48950 \
<https://github.com/rust-lang/rust/issues/48950> for more information",
); );
store.register_removed( store.register_removed(
"resolve_trait_on_defaulted_unit", "resolve_trait_on_defaulted_unit",
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950", "converted into hard error, see issue #48950 \
<https://github.com/rust-lang/rust/issues/48950> for more information",
); );
store.register_removed( store.register_removed(
"private_no_mangle_fns", "private_no_mangle_fns",
@ -377,35 +388,43 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) {
store.register_removed("bad_repr", "replaced with a generic attribute input check"); store.register_removed("bad_repr", "replaced with a generic attribute input check");
store.register_removed( store.register_removed(
"duplicate_matcher_binding_name", "duplicate_matcher_binding_name",
"converted into hard error, see https://github.com/rust-lang/rust/issues/57742", "converted into hard error, see issue #57742 \
<https://github.com/rust-lang/rust/issues/57742> for more information",
); );
store.register_removed( store.register_removed(
"incoherent_fundamental_impls", "incoherent_fundamental_impls",
"converted into hard error, see https://github.com/rust-lang/rust/issues/46205", "converted into hard error, see issue #46205 \
<https://github.com/rust-lang/rust/issues/46205> for more information",
); );
store.register_removed( store.register_removed(
"legacy_constructor_visibility", "legacy_constructor_visibility",
"converted into hard error, see https://github.com/rust-lang/rust/issues/39207", "converted into hard error, see issue #39207 \
<https://github.com/rust-lang/rust/issues/39207> for more information",
); );
store.register_removed( store.register_removed(
"legacy_directory_ownership", "legacy_directory_ownership",
"converted into hard error, see https://github.com/rust-lang/rust/issues/37872", "converted into hard error, see issue #37872 \
<https://github.com/rust-lang/rust/issues/37872> for more information",
); );
store.register_removed( store.register_removed(
"safe_extern_statics", "safe_extern_statics",
"converted into hard error, see https://github.com/rust-lang/rust/issues/36247", "converted into hard error, see issue #36247 \
<https://github.com/rust-lang/rust/issues/36247> for more information",
); );
store.register_removed( store.register_removed(
"parenthesized_params_in_types_and_modules", "parenthesized_params_in_types_and_modules",
"converted into hard error, see https://github.com/rust-lang/rust/issues/42238", "converted into hard error, see issue #42238 \
<https://github.com/rust-lang/rust/issues/42238> for more information",
); );
store.register_removed( store.register_removed(
"duplicate_macro_exports", "duplicate_macro_exports",
"converted into hard error, see https://github.com/rust-lang/rust/issues/35896", "converted into hard error, see issue #35896 \
<https://github.com/rust-lang/rust/issues/35896> for more information",
); );
store.register_removed( store.register_removed(
"nested_impl_trait", "nested_impl_trait",
"converted into hard error, see https://github.com/rust-lang/rust/issues/59014", "converted into hard error, see issue #59014 \
<https://github.com/rust-lang/rust/issues/59014> for more information",
); );
store.register_removed("plugin_as_library", "plugins have been deprecated and retired"); store.register_removed("plugin_as_library", "plugins have been deprecated and retired");
} }

View File

@ -565,7 +565,10 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
fn error_min_const_fn_violation(tcx: TyCtxt<'_>, span: Span, msg: Cow<'_, str>) { fn error_min_const_fn_violation(tcx: TyCtxt<'_>, span: Span, msg: Cow<'_, str>) {
struct_span_err!(tcx.sess, span, E0723, "{}", msg) struct_span_err!(tcx.sess, span, E0723, "{}", msg)
.note("for more information, see issue https://github.com/rust-lang/rust/issues/57563") .note(
"see issue #57563 <https://github.com/rust-lang/rust/issues/57563> \
for more information",
)
.help("add `#![feature(const_fn)]` to the crate attributes to enable") .help("add `#![feature(const_fn)]` to the crate attributes to enable")
.emit(); .emit();
} }
@ -593,9 +596,9 @@ fn check_short_circuiting_in_const_local(item: &Item<'_, 'tcx>) {
*span, *span,
&format!( &format!(
"use of {} here does not actually short circuit due to \ "use of {} here does not actually short circuit due to \
the const evaluator presently not being able to do control flow. \ the const evaluator presently not being able to do control flow. \
See https://github.com/rust-lang/rust/issues/49146 for more \ See issue #49146 <https://github.com/rust-lang/rust/issues/49146> \
information.", for more information.",
kind kind
), ),
); );

View File

@ -248,8 +248,9 @@ impl<'a> StringReader<'a> {
a future release!", a future release!",
) )
.note( .note(
"for more information, see issue #42326 \ "see issue #42326 \
<https://github.com/rust-lang/rust/issues/42326>", <https://github.com/rust-lang/rust/issues/42326> \
for more information",
) )
.emit(); .emit();
None None

View File

@ -366,8 +366,8 @@ impl<'a> Parser<'a> {
type: `<expr>: <type>`", type: `<expr>: <type>`",
); );
err.note( err.note(
"for more information, see \ "see issue #23416 <https://github.com/rust-lang/rust/issues/23416> \
https://github.com/rust-lang/rust/issues/23416", for more information",
); );
} }
} }

View File

@ -1295,7 +1295,10 @@ impl<'a> Parser<'a> {
`proc_macro::Literal::*_unsuffixed` for code that will desugar \ `proc_macro::Literal::*_unsuffixed` for code that will desugar \
to tuple field access", to tuple field access",
); );
err.note("for more context, see https://github.com/rust-lang/rust/issues/60210"); err.note(
"see issue #60210 <https://github.com/rust-lang/rust/issues/60210> \
for more information",
);
err err
} else { } else {
self.struct_span_err(sp, &format!("suffixes on {} are invalid", kind)) self.struct_span_err(sp, &format!("suffixes on {} are invalid", kind))

View File

@ -120,8 +120,8 @@ impl CheckAttrVisitor<'tcx> {
a future release!", a future release!",
) )
.note( .note(
"for more information, see issue #65833 \ "see issue #65833 <https://github.com/rust-lang/rust/issues/65833> \
<https://github.com/rust-lang/rust/issues/65833>", for more information",
) )
.emit(); .emit();
true true

View File

@ -86,8 +86,8 @@ pub fn feature_err_issue<'a>(
if let Some(n) = find_feature_issue(feature, issue) { if let Some(n) = find_feature_issue(feature, issue) {
err.note(&format!( err.note(&format!(
"for more information, see https://github.com/rust-lang/rust/issues/{}", "see issue #{} <https://github.com/rust-lang/rust/issues/{}> for more information",
n, n, n,
)); ));
} }

View File

@ -1125,7 +1125,8 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
sess.err( sess.err(
"Profile-guided optimization does not yet work in conjunction \ "Profile-guided optimization does not yet work in conjunction \
with `-Cpanic=unwind` on Windows when targeting MSVC. \ with `-Cpanic=unwind` on Windows when targeting MSVC. \
See https://github.com/rust-lang/rust/issues/61002 for details.", See issue #61002 <https://github.com/rust-lang/rust/issues/61002> \
for more information.",
); );
} }

View File

@ -797,9 +797,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
); );
err.warn( err.warn(
"if the rounded value cannot be represented by the target \ "if the rounded value cannot be represented by the target \
integer type, including `Inf` and `NaN`, casting will cause \ integer type, including `Inf` and `NaN`, casting will cause \
undefined behavior \ undefined behavior \
(https://github.com/rust-lang/rust/issues/10184)", (see issue #10184 <https://github.com/rust-lang/rust/issues/10184> \
for more information)",
); );
} }
true true

View File

@ -2440,7 +2440,10 @@ fn associated_item_predicates(
trait_item.span, trait_item.span,
&format!("{}-generic associated types are not yet implemented", arg_kind), &format!("{}-generic associated types are not yet implemented", arg_kind),
) )
.note("for more information, see https://github.com/rust-lang/rust/issues/44265") .note(
"for more information, see issue #44265 \
<https://github.com/rust-lang/rust/issues/44265> for more information",
)
.emit(); .emit();
had_error = true; had_error = true;
} }

View File

@ -570,7 +570,10 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &rustc_errors::Han
if matches.opt_present(flag) { if matches.opt_present(flag) {
let mut err = let mut err =
diag.struct_warn(&format!("the '{}' flag is considered deprecated", flag)); diag.struct_warn(&format!("the '{}' flag is considered deprecated", flag));
err.warn("please see https://github.com/rust-lang/rust/issues/44136"); err.warn(
"see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
for more information",
);
if *flag == "no-defaults" { if *flag == "no-defaults" {
err.help("you may want to use --document-private-items"); err.help("you may want to use --document-private-items");

View File

@ -416,7 +416,10 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
considered deprecated", considered deprecated",
name name
)); ));
msg.warn("please see https://github.com/rust-lang/rust/issues/44136"); msg.warn(
"see issue #44136 <https://github.com/rust-lang/rust/issues/44136> \
for more information",
);
if name == "no_default_passes" { if name == "no_default_passes" {
msg.help("you may want to use `#![doc(document_private_items)]`"); msg.help("you may want to use `#![doc(document_private_items)]`");