diff --git a/src/librustc/traits/error_reporting/mod.rs b/src/librustc/traits/error_reporting/mod.rs index 6d3719b32d0..c28d507b0b2 100644 --- a/src/librustc/traits/error_reporting/mod.rs +++ b/src/librustc/traits/error_reporting/mod.rs @@ -700,11 +700,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { if self.predicate_may_hold(&unit_obligation) { err.note( "the trait is implemented for `()`. \ - Possibly this error has been caused by changes to \ - Rust's type-inference algorithm \ - (see: https://github.com/rust-lang/rust/issues/48950 \ - for more info). Consider whether you meant to use the \ - type `()` here instead.", + Possibly this error has been caused by changes to \ + Rust's type-inference algorithm (see issue #48950 \ + \ + for more information). Consider whether you meant to use \ + the type `()` here instead.", ); } } diff --git a/src/librustc/traits/error_reporting/suggestions.rs b/src/librustc/traits/error_reporting/suggestions.rs index b2973c642a2..34e403e6701 100644 --- a/src/librustc/traits/error_reporting/suggestions.rs +++ b/src/librustc/traits/error_reporting/suggestions.rs @@ -1508,9 +1508,9 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { ); if suggest_const_in_array_repeat_expressions { err.note( - "this array initializer can be evaluated at compile-time, for more \ - information, see issue \ - https://github.com/rust-lang/rust/issues/49147", + "this array initializer can be evaluated at compile-time, see issue \ + #48147 \ + for more information", ); if tcx.sess.opts.unstable_features.is_nightly_build() { err.help( diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index 0282f409b32..6c5458e6e58 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -483,8 +483,9 @@ impl Trait for X { if ty.is_closure() || ty.is_generator() { db.note( "closures cannot capture themselves or take themselves as argument;\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", + this error may be the result of a recent compiler bug-fix,\n\ + see issue #46062 \n\ + for more information", ); } } diff --git a/src/librustc_ast_passes/ast_validation.rs b/src/librustc_ast_passes/ast_validation.rs index 79ed7f234f7..057acec9598 100644 --- a/src/librustc_ast_passes/ast_validation.rs +++ b/src/librustc_ast_passes/ast_validation.rs @@ -996,7 +996,8 @@ impl<'a> Visitor<'a> for AstValidator<'a> { ) .span_label(predicate.span, "not supported") .note( - "for more information, see https://github.com/rust-lang/rust/issues/20041", + "see issue #20041 \ + for more information", ) .emit(); } diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 78e9d0f14f2..07ee1cbb27d 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -324,47 +324,58 @@ fn register_builtins(store: &mut LintStore, no_interleave_lints: bool) { ); store.register_removed( "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 \ + for more information", ); store.register_removed( "inaccessible_extern_crate", - "converted into hard error, see https://github.com/rust-lang/rust/issues/36886", + "converted into hard error, see issue #36886 \ + for more information", ); store.register_removed( "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 \ + for more information", ); store.register_removed( "overlapping_inherent_impls", - "converted into hard error, see https://github.com/rust-lang/rust/issues/36889", + "converted into hard error, see issue #36889 \ + for more information", ); store.register_removed( "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 \ + for more information", ); store.register_removed( "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 \ + for more information", ); store.register_removed( "lifetime_underscore", - "converted into hard error, see https://github.com/rust-lang/rust/issues/36892", + "converted into hard error, see issue #36892 \ + for more information", ); store.register_removed( "extra_requirement_in_impl", - "converted into hard error, see https://github.com/rust-lang/rust/issues/37166", + "converted into hard error, see issue #37166 \ + for more information", ); store.register_removed( "legacy_imports", - "converted into hard error, see https://github.com/rust-lang/rust/issues/38260", + "converted into hard error, see issue #38260 \ + for more information", ); store.register_removed( "coerce_never", - "converted into hard error, see https://github.com/rust-lang/rust/issues/48950", + "converted into hard error, see issue #48950 \ + for more information", ); store.register_removed( "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 \ + for more information", ); store.register_removed( "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( "duplicate_matcher_binding_name", - "converted into hard error, see https://github.com/rust-lang/rust/issues/57742", + "converted into hard error, see issue #57742 \ + for more information", ); store.register_removed( "incoherent_fundamental_impls", - "converted into hard error, see https://github.com/rust-lang/rust/issues/46205", + "converted into hard error, see issue #46205 \ + for more information", ); store.register_removed( "legacy_constructor_visibility", - "converted into hard error, see https://github.com/rust-lang/rust/issues/39207", + "converted into hard error, see issue #39207 \ + for more information", ); store.register_removed( "legacy_directory_ownership", - "converted into hard error, see https://github.com/rust-lang/rust/issues/37872", + "converted into hard error, see issue #37872 \ + for more information", ); store.register_removed( "safe_extern_statics", - "converted into hard error, see https://github.com/rust-lang/rust/issues/36247", + "converted into hard error, see issue #36247 \ + for more information", ); store.register_removed( "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 \ + for more information", ); store.register_removed( "duplicate_macro_exports", - "converted into hard error, see https://github.com/rust-lang/rust/issues/35896", + "converted into hard error, see issue #35896 \ + for more information", ); store.register_removed( "nested_impl_trait", - "converted into hard error, see https://github.com/rust-lang/rust/issues/59014", + "converted into hard error, see issue #59014 \ + for more information", ); store.register_removed("plugin_as_library", "plugins have been deprecated and retired"); } diff --git a/src/librustc_mir/transform/check_consts/validation.rs b/src/librustc_mir/transform/check_consts/validation.rs index 35107a31aa1..94c2f77335c 100644 --- a/src/librustc_mir/transform/check_consts/validation.rs +++ b/src/librustc_mir/transform/check_consts/validation.rs @@ -565,7 +565,10 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> { fn error_min_const_fn_violation(tcx: TyCtxt<'_>, span: Span, msg: Cow<'_, str>) { 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 \ + for more information", + ) .help("add `#![feature(const_fn)]` to the crate attributes to enable") .emit(); } @@ -593,9 +596,9 @@ fn check_short_circuiting_in_const_local(item: &Item<'_, 'tcx>) { *span, &format!( "use of {} here does not actually short circuit due to \ - the const evaluator presently not being able to do control flow. \ - See https://github.com/rust-lang/rust/issues/49146 for more \ - information.", + the const evaluator presently not being able to do control flow. \ + See issue #49146 \ + for more information.", kind ), ); diff --git a/src/librustc_parse/lexer/mod.rs b/src/librustc_parse/lexer/mod.rs index af56e9d344d..e60f1138ddc 100644 --- a/src/librustc_parse/lexer/mod.rs +++ b/src/librustc_parse/lexer/mod.rs @@ -248,8 +248,9 @@ impl<'a> StringReader<'a> { a future release!", ) .note( - "for more information, see issue #42326 \ - ", + "see issue #42326 \ + \ + for more information", ) .emit(); None diff --git a/src/librustc_parse/parser/diagnostics.rs b/src/librustc_parse/parser/diagnostics.rs index 7c015c7a1d7..237b3cc13d3 100644 --- a/src/librustc_parse/parser/diagnostics.rs +++ b/src/librustc_parse/parser/diagnostics.rs @@ -366,8 +366,8 @@ impl<'a> Parser<'a> { type: `: `", ); err.note( - "for more information, see \ - https://github.com/rust-lang/rust/issues/23416", + "see issue #23416 \ + for more information", ); } } diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs index d9832141695..eacc95e0395 100644 --- a/src/librustc_parse/parser/expr.rs +++ b/src/librustc_parse/parser/expr.rs @@ -1295,7 +1295,10 @@ impl<'a> Parser<'a> { `proc_macro::Literal::*_unsuffixed` for code that will desugar \ to tuple field access", ); - err.note("for more context, see https://github.com/rust-lang/rust/issues/60210"); + err.note( + "see issue #60210 \ + for more information", + ); err } else { self.struct_span_err(sp, &format!("suffixes on {} are invalid", kind)) diff --git a/src/librustc_passes/check_attr.rs b/src/librustc_passes/check_attr.rs index 3ff1ba3bbfc..a877c1de175 100644 --- a/src/librustc_passes/check_attr.rs +++ b/src/librustc_passes/check_attr.rs @@ -120,8 +120,8 @@ impl CheckAttrVisitor<'tcx> { a future release!", ) .note( - "for more information, see issue #65833 \ - ", + "see issue #65833 \ + for more information", ) .emit(); true diff --git a/src/librustc_session/parse.rs b/src/librustc_session/parse.rs index 32642300262..6a4871b6da0 100644 --- a/src/librustc_session/parse.rs +++ b/src/librustc_session/parse.rs @@ -86,8 +86,8 @@ pub fn feature_err_issue<'a>( if let Some(n) = find_feature_issue(feature, issue) { err.note(&format!( - "for more information, see https://github.com/rust-lang/rust/issues/{}", - n, + "see issue #{} for more information", + n, n, )); } diff --git a/src/librustc_session/session.rs b/src/librustc_session/session.rs index 648dd6ad32a..6f003043aa9 100644 --- a/src/librustc_session/session.rs +++ b/src/librustc_session/session.rs @@ -1125,7 +1125,8 @@ fn validate_commandline_args_with_session_available(sess: &Session) { sess.err( "Profile-guided optimization does not yet work in conjunction \ with `-Cpanic=unwind` on Windows when targeting MSVC. \ - See https://github.com/rust-lang/rust/issues/61002 for details.", + See issue #61002 \ + for more information.", ); } diff --git a/src/librustc_typeck/check/demand.rs b/src/librustc_typeck/check/demand.rs index e0f9fcc6932..2ebd3079ccc 100644 --- a/src/librustc_typeck/check/demand.rs +++ b/src/librustc_typeck/check/demand.rs @@ -797,9 +797,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ); err.warn( "if the rounded value cannot be represented by the target \ - integer type, including `Inf` and `NaN`, casting will cause \ - undefined behavior \ - (https://github.com/rust-lang/rust/issues/10184)", + integer type, including `Inf` and `NaN`, casting will cause \ + undefined behavior \ + (see issue #10184 \ + for more information)", ); } true diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 2a450f4b4e8..1a3016cd9d3 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -2440,7 +2440,10 @@ fn associated_item_predicates( trait_item.span, &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 \ + for more information", + ) .emit(); had_error = true; } diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 1b776930d7a..33b3e800374 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -570,7 +570,10 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &rustc_errors::Han if matches.opt_present(flag) { let mut err = 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 \ + for more information", + ); if *flag == "no-defaults" { err.help("you may want to use --document-private-items"); diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index 429988db9d8..c3c07e2e02c 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -416,7 +416,10 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt considered deprecated", name )); - msg.warn("please see https://github.com/rust-lang/rust/issues/44136"); + msg.warn( + "see issue #44136 \ + for more information", + ); if name == "no_default_passes" { msg.help("you may want to use `#![doc(document_private_items)]`");