Skip to content

Commit 01f97c3

Browse files
eupnpunitkoura
andcommitted
Unify Github issue links in diagnostics
Co-authored-by: eupn <eupn@protonmail.com> Co-authored-by: Punit Singh Koura <pkoura@andrew.cmu.edu>
1 parent 4a18848 commit 01f97c3

File tree

15 files changed

+38
-32
lines changed

15 files changed

+38
-32
lines changed

src/librustc/lint/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
737737
} else {
738738
format!("{} in a future release!", STANDARD_MESSAGE)
739739
};
740-
let citation = format!("for more information, see {}",
740+
let citation = format!("see {} for more information",
741741
future_incompatible.reference);
742742
err.warn(&explanation);
743743
err.note(&citation);

src/librustc/session/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
13171317
sess.opts.prints.iter().all(|&p| p == PrintRequest::NativeStaticLibs) {
13181318
sess.err("Profile-guided optimization does not yet work in conjunction \
13191319
with `-Cpanic=unwind` on Windows when targeting MSVC. \
1320-
See https://github.com/rust-lang/rust/issues/61002 for details.");
1320+
See issue #61002 <https://github.com/rust-lang/rust/issues/61002> for details.");
13211321
}
13221322
}
13231323

src/librustc/traits/error_reporting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
729729
err.note("the trait is implemented for `()`. \
730730
Possibly this error has been caused by changes to \
731731
Rust's type-inference algorithm \
732-
(see: https://github.com/rust-lang/rust/issues/48950 \
732+
(see issue #48950 <https://github.com/rust-lang/rust/issues/48950> \
733733
for more info). Consider whether you meant to use the \
734734
type `()` here instead.");
735735
}

src/librustc/ty/error.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ impl<'tcx> TyCtxt<'tcx> {
287287
if ty.is_closure() || ty.is_generator() {
288288
db.note("closures cannot capture themselves or take themselves as argument;\n\
289289
this error may be the result of a recent compiler bug-fix,\n\
290-
see https://github.com/rust-lang/rust/issues/46062 for more details");
290+
see issue #46062 <https://github.com/rust-lang/rust/issues/46062> \
291+
for more information");
291292
}
292293
}
293294
_ => {}

src/librustc_lint/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -457,37 +457,37 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
457457
store.register_removed("transmute_from_fn_item_types",
458458
"always cast functions before transmuting them");
459459
store.register_removed("hr_lifetime_in_assoc_type",
460-
"converted into hard error, see https://github.com/rust-lang/rust/issues/33685");
460+
"converted into hard error, see issue #33685 <https://github.com/rust-lang/rust/issues/33685>");
461461
store.register_removed("inaccessible_extern_crate",
462-
"converted into hard error, see https://github.com/rust-lang/rust/issues/36886");
462+
"converted into hard error, see issue #36886 <https://github.com/rust-lang/rust/issues/36886>");
463463
store.register_removed("super_or_self_in_global_path",
464-
"converted into hard error, see https://github.com/rust-lang/rust/issues/36888");
464+
"converted into hard error, see issue #36888 <https://github.com/rust-lang/rust/issues/36888>");
465465
store.register_removed("overlapping_inherent_impls",
466-
"converted into hard error, see https://github.com/rust-lang/rust/issues/36889");
466+
"converted into hard error, see issue #36889 <https://github.com/rust-lang/rust/issues/36889>");
467467
store.register_removed("illegal_floating_point_constant_pattern",
468-
"converted into hard error, see https://github.com/rust-lang/rust/issues/36890");
468+
"converted into hard error, see issue #36890 <https://github.com/rust-lang/rust/issues/36890>");
469469
store.register_removed("illegal_struct_or_enum_constant_pattern",
470-
"converted into hard error, see https://github.com/rust-lang/rust/issues/36891");
470+
"converted into hard error, see issue #36891 <https://github.com/rust-lang/rust/issues/36891>");
471471
store.register_removed("lifetime_underscore",
472-
"converted into hard error, see https://github.com/rust-lang/rust/issues/36892");
472+
"converted into hard error, see issue #36892 <https://github.com/rust-lang/rust/issues/36892>");
473473
store.register_removed("extra_requirement_in_impl",
474-
"converted into hard error, see https://github.com/rust-lang/rust/issues/37166");
474+
"converted into hard error, see issue #37166 <https://github.com/rust-lang/rust/issues/37166>");
475475
store.register_removed("legacy_imports",
476-
"converted into hard error, see https://github.com/rust-lang/rust/issues/38260");
476+
"converted into hard error, see issue #38260 <https://github.com/rust-lang/rust/issues/38260>");
477477
store.register_removed("coerce_never",
478-
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950");
478+
"converted into hard error, see issue #48950 <https://github.com/rust-lang/rust/issues/48950>");
479479
store.register_removed("resolve_trait_on_defaulted_unit",
480-
"converted into hard error, see https://github.com/rust-lang/rust/issues/48950");
480+
"converted into hard error, see issue #48950 <https://github.com/rust-lang/rust/issues/48950>");
481481
store.register_removed("private_no_mangle_fns",
482482
"no longer a warning, `#[no_mangle]` functions always exported");
483483
store.register_removed("private_no_mangle_statics",
484484
"no longer a warning, `#[no_mangle]` statics always exported");
485485
store.register_removed("bad_repr",
486486
"replaced with a generic attribute input check");
487487
store.register_removed("duplicate_matcher_binding_name",
488-
"converted into hard error, see https://github.com/rust-lang/rust/issues/57742");
488+
"converted into hard error, see issue #57742 <https://github.com/rust-lang/rust/issues/57742>");
489489
store.register_removed("incoherent_fundamental_impls",
490-
"converted into hard error, see https://github.com/rust-lang/rust/issues/46205");
490+
"converted into hard error, see issue #46205 <https://github.com/rust-lang/rust/issues/46205>");
491491
}
492492

493493
pub fn register_internals(store: &mut lint::LintStore, sess: Option<&Session>) {

src/librustc_mir/transform/qualify_consts.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,8 +1623,9 @@ impl MirPass for QualifyAndPromoteConstants {
16231623
"{}",
16241624
err,
16251625
);
1626-
diag.note("for more information, see issue \
1627-
https://github.com/rust-lang/rust/issues/57563");
1626+
diag.note("see issue \
1627+
#57563 <https://github.com/rust-lang/rust/issues/57563> \
1628+
for more information");
16281629
diag.help(
16291630
"add `#![feature(const_fn)]` to the crate attributes to enable",
16301631
);
@@ -1667,7 +1668,7 @@ impl MirPass for QualifyAndPromoteConstants {
16671668
*span,
16681669
&format!("use of {} here does not actually short circuit due to \
16691670
the const evaluator presently not being able to do control flow. \
1670-
See https://github.com/rust-lang/rust/issues/49146 for more \
1671+
See issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more \
16711672
information.", kind),
16721673
);
16731674
}

src/librustc_typeck/check/demand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
728728
err.warn("if the rounded value cannot be represented by the target \
729729
integer type, including `Inf` and `NaN`, casting will cause \
730730
undefined behavior \
731-
(https://github.com/rust-lang/rust/issues/10184)");
731+
see issue #10184 <https://github.com/rust-lang/rust/issues/10184>");
732732
}
733733
true
734734
}

src/librustc_typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4528,7 +4528,7 @@ fn fatally_break_rust(sess: &Session) {
45284528
handler.note_without_error("the compiler expectedly panicked. this is a feature.");
45294529
handler.note_without_error(
45304530
"we would appreciate a joke overview: \
4531-
https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675"
4531+
see issue #43162 <https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675>"
45324532
);
45334533
handler.note_without_error(&format!("rustc {} running on {}",
45344534
option_env!("CFG_VERSION").unwrap_or("unknown_version"),

src/librustdoc/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
518518
if matches.opt_present(flag) {
519519
let mut err = diag.struct_warn(&format!("the '{}' flag is considered deprecated",
520520
flag));
521-
err.warn("please see https://github.com/rust-lang/rust/issues/44136");
521+
err.warn("please see issue #44136 <https://github.com/rust-lang/rust/issues/44136>");
522522

523523
if *flag == "no-defaults" {
524524
err.help("you may want to use --document-private-items");

src/librustdoc/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
402402
fn report_deprecated_attr(name: &str, diag: &errors::Handler) {
403403
let mut msg = diag.struct_warn(&format!("the `#![doc({})]` attribute is \
404404
considered deprecated", name));
405-
msg.warn("please see https://github.com/rust-lang/rust/issues/44136");
405+
msg.warn("please see issue #44136 <https://github.com/rust-lang/rust/issues/44136>");
406406

407407
if name == "no_default_passes" {
408408
msg.help("you may want to use `#![doc(document_private_items)]`");

src/libsyntax/feature_gate.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
13911391
(sym::link_section, Whitelisted, template!(NameValueStr: "name"), Ungated),
13921392
(sym::no_builtins, Whitelisted, template!(Word), Ungated),
13931393
(sym::no_debug, Whitelisted, template!(Word), Gated(
1394-
Stability::Deprecated("https://github.com/rust-lang/rust/issues/29721", None),
1394+
Stability::Deprecated("issue #29721 <https://github.com/rust-lang/rust/issues/29721>", None),
13951395
sym::no_debug,
13961396
"the `#[no_debug]` attribute was an experimental feature that has been \
13971397
deprecated due to lack of demand",
@@ -1748,7 +1748,9 @@ fn leveled_feature_err<'a, S: Into<MultiSpan>>(
17481748
None | Some(0) => {} // We still accept `0` as a stand-in for backwards compatibility
17491749
Some(n) => {
17501750
err.note(&format!(
1751-
"for more information, see https://github.com/rust-lang/rust/issues/{}",
1751+
"see issue #{} <https://github.com/rust-lang/rust/issues/{}> \
1752+
for more information",
1753+
n,
17521754
n,
17531755
));
17541756
}

src/libsyntax/parse/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ impl<'a> Parser<'a> {
411411
} else {
412412
err.note("`#![feature(type_ascription)]` lets you annotate an expression with a \
413413
type: `<expr>: <type>`");
414-
err.note("for more information, see \
415-
https://github.com/rust-lang/rust/issues/23416");
414+
err.note("see issue #23416 <https://github.com/rust-lang/rust/issues/23416> \
415+
for more information");
416416
}
417417
}
418418
}

src/libsyntax/parse/lexer/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ impl<'a> StringReader<'a> {
303303
.warn("this was previously accepted by the compiler but is \
304304
being phased out; it will become a hard error in \
305305
a future release!")
306-
.note("for more information, see issue #42326 \
307-
<https://github.com/rust-lang/rust/issues/42326>")
306+
.note("see issue \
307+
#42326 <https://github.com/rust-lang/rust/issues/42326> \
308+
for more information")
308309
.emit();
309310
None
310311
} else {

src/libsyntax/parse/literal.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ crate fn expect_no_suffix(diag: &Handler, sp: Span, kind: &str, suffix: Option<S
373373
to tuple field access",
374374
);
375375
err.note(
376-
"for more context, see https://github.com/rust-lang/rust/issues/60210",
376+
"see issue #60210 <https://github.com/rust-lang/rust/issues/60210> \
377+
for more information",
377378
);
378379
err
379380
} else {

src/test/ui/consts/const-eval/match-test-ptr-null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn main() {
55
let _: [u8; 0] = [4; {
66
match &1 as *const i32 as usize {
77
//~^ ERROR casting pointers to integers in constants
8-
//~| NOTE for more information, see
8+
//~| NOTE see issue #
99
//~| ERROR constant contains unimplemented expression type
1010
0 => 42, //~ ERROR constant contains unimplemented expression type
1111
//~^ NOTE "pointer arithmetic or comparison" needs an rfc before being allowed

0 commit comments

Comments
 (0)