Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "see issue" consistent #63008

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc/lint/mod.rs
Expand Up @@ -737,7 +737,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
} else {
format!("{} in a future release!", STANDARD_MESSAGE)
};
let citation = format!("for more information, see {}",
let citation = format!("see {} for more information",
future_incompatible.reference);
err.warn(&explanation);
err.note(&citation);
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/session/mod.rs
Expand Up @@ -1315,9 +1315,9 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
sess.target.target.options.is_like_msvc &&
sess.panic_strategy() == PanicStrategy::Unwind &&
sess.opts.prints.iter().all(|&p| p == PrintRequest::NativeStaticLibs) {
sess.err("Profile-guided optimization does not yet work in conjunction \
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 <https://github.com/rust-lang/rust/issues/61002> for details.");
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/traits/error_reporting.rs
Expand Up @@ -728,8 +728,8 @@ 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 \
Rust's type-inference algorithm (see issue #48950 \
<https://github.com/rust-lang/rust/issues/48950> \
for more info). Consider whether you meant to use the \
type `()` here instead.");
}
Expand Down
3 changes: 2 additions & 1 deletion src/librustc/ty/error.rs
Expand Up @@ -287,7 +287,8 @@ impl<'tcx> TyCtxt<'tcx> {
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");
see issue #46062 <https://github.com/rust-lang/rust/issues/46062> \
for more information");
}
}
_ => {}
Expand Down
39 changes: 26 additions & 13 deletions src/librustc_lint/lib.rs
Expand Up @@ -457,37 +457,50 @@ pub fn register_builtins(store: &mut lint::LintStore, sess: Option<&Session>) {
store.register_removed("transmute_from_fn_item_types",
"always cast functions before transmuting them");
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 <https://github.com/rust-lang/rust/issues/33685>");
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 <https://github.com/rust-lang/rust/issues/36886>");
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 <https://github.com/rust-lang/rust/issues/36888>");
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 <https://github.com/rust-lang/rust/issues/36889>");
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 <https://github.com/rust-lang/rust/issues/36890>");
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 <https://github.com/rust-lang/rust/issues/36891>");
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 <https://github.com/rust-lang/rust/issues/36892>");
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 <https://github.com/rust-lang/rust/issues/37166>");
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 <https://github.com/rust-lang/rust/issues/38260>");
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 <https://github.com/rust-lang/rust/issues/48950>");
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 <https://github.com/rust-lang/rust/issues/48950>");
store.register_removed("private_no_mangle_fns",
"no longer a warning, `#[no_mangle]` functions always exported");
store.register_removed("private_no_mangle_statics",
"no longer a warning, `#[no_mangle]` statics always exported");
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 <https://github.com/rust-lang/rust/issues/57742>");
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 <https://github.com/rust-lang/rust/issues/46205>");
}

pub fn register_internals(store: &mut lint::LintStore, sess: Option<&Session>) {
Expand Down
9 changes: 5 additions & 4 deletions src/librustc_mir/transform/qualify_consts.rs
Expand Up @@ -1624,8 +1624,9 @@ impl MirPass for QualifyAndPromoteConstants {
"{}",
err,
);
diag.note("for more information, see issue \
https://github.com/rust-lang/rust/issues/57563");
diag.note("see issue \
#57563 <https://github.com/rust-lang/rust/issues/57563> \
for more information");
diag.help(
"add `#![feature(const_fn)]` to the crate attributes to enable",
);
Expand Down Expand Up @@ -1668,8 +1669,8 @@ impl MirPass for QualifyAndPromoteConstants {
*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.", kind),
See issue #49146 <https://github.com/rust-lang/rust/issues/49146> \
for more information.", kind),
);
}
for local in locals {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_typeck/check/demand.rs
Expand Up @@ -727,8 +727,8 @@ 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)");
undefined behavior. See issue #10184 \
<https://github.com/rust-lang/rust/issues/10184>");
}
true
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Expand Up @@ -4528,7 +4528,7 @@ fn fatally_break_rust(sess: &Session) {
handler.note_without_error("the compiler expectedly panicked. this is a feature.");
handler.note_without_error(
"we would appreciate a joke overview: \
https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675"
see issue #43162 <https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675>"
);
handler.note_without_error(&format!("rustc {} running on {}",
option_env!("CFG_VERSION").unwrap_or("unknown_version"),
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/config.rs
Expand Up @@ -518,7 +518,7 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &errors::Handler)
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 <https://github.com/rust-lang/rust/issues/44136>");

if *flag == "no-defaults" {
err.help("you may want to use --document-private-items");
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/core.rs
Expand Up @@ -402,7 +402,8 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
fn report_deprecated_attr(name: &str, diag: &errors::Handler) {
let mut msg = diag.struct_warn(&format!("the `#![doc({})]` attribute is \
considered deprecated", 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>");

if name == "no_default_passes" {
msg.help("you may want to use `#![doc(document_private_items)]`");
Expand Down
7 changes: 5 additions & 2 deletions src/libsyntax/feature_gate.rs
Expand Up @@ -1389,7 +1389,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
(sym::link_section, Whitelisted, template!(NameValueStr: "name"), Ungated),
(sym::no_builtins, Whitelisted, template!(Word), Ungated),
(sym::no_debug, Whitelisted, template!(Word), Gated(
Stability::Deprecated("https://github.com/rust-lang/rust/issues/29721", None),
Stability::Deprecated("issue #29721 <https://github.com/rust-lang/rust/issues/29721>",
None),
sym::no_debug,
"the `#[no_debug]` attribute was an experimental feature that has been \
deprecated due to lack of demand",
Expand Down Expand Up @@ -1746,7 +1747,9 @@ fn leveled_feature_err<'a, S: Into<MultiSpan>>(
None | Some(0) => {} // We still accept `0` as a stand-in for backwards compatibility
Some(n) => {
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,
));
}
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/parse/diagnostics.rs
Expand Up @@ -411,8 +411,8 @@ impl<'a> Parser<'a> {
} else {
err.note("`#![feature(type_ascription)]` lets you annotate an expression with a \
type: `<expr>: <type>`");
err.note("for more information, see \
https://github.com/rust-lang/rust/issues/23416");
err.note("see issue #23416 <https://github.com/rust-lang/rust/issues/23416> \
for more information");
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/libsyntax/parse/lexer/mod.rs
Expand Up @@ -262,8 +262,9 @@ impl<'a> StringReader<'a> {
.warn("this was previously accepted by the compiler but is \
being phased out; it will become a hard error in \
a future release!")
.note("for more information, see issue #42326 \
<https://github.com/rust-lang/rust/issues/42326>")
.note("see issue \
#42326 <https://github.com/rust-lang/rust/issues/42326> \
for more information")
.emit();
None
} else {
Expand Down
3 changes: 2 additions & 1 deletion src/libsyntax/parse/literal.rs
Expand Up @@ -373,7 +373,8 @@ crate fn expect_no_suffix(diag: &Handler, sp: Span, kind: &str, suffix: Option<S
to tuple field access",
);
err.note(
"for more context, see https://github.com/rust-lang/rust/issues/60210",
"see issue #60210 <https://github.com/rust-lang/rust/issues/60210> \
for more information"
);
err
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/test/rustdoc-ui/deprecated-attrs.stderr
@@ -1,9 +1,9 @@
warning: the `#![doc(no_default_passes)]` attribute is considered deprecated
|
= warning: please see https://github.com/rust-lang/rust/issues/44136
= warning: see issue #44136 <https://github.com/rust-lang/rust/issues/44136>
= help: you may want to use `#![doc(document_private_items)]`

warning: the `#![doc(passes = "...")]` attribute is considered deprecated
|
= warning: please see https://github.com/rust-lang/rust/issues/44136
= warning: see issue #44136 <https://github.com/rust-lang/rust/issues/44136>

2 changes: 1 addition & 1 deletion src/test/ui-fulldeps/gated-plugin.stderr
Expand Up @@ -4,7 +4,7 @@ error[E0658]: compiler plugins are experimental and possibly buggy
LL | #![plugin(attr_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= note: see issue #29597 <https://github.com/rust-lang/rust/issues/29597> for more information
= help: add `#![feature(plugin)]` to the crate attributes to enable

error: aborting due to previous error
Expand Down
10 changes: 5 additions & 5 deletions src/test/ui-fulldeps/hash-stable-is-unstable.stderr
Expand Up @@ -8,7 +8,7 @@ error[E0658]: use of unstable library feature 'rustc_private': this crate is bei
LL | extern crate rustc_data_structures;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/27812
= note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
= help: add `#![feature(rustc_private)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
Expand All @@ -17,7 +17,7 @@ error[E0658]: use of unstable library feature 'rustc_private': this crate is bei
LL | extern crate rustc;
| ^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/27812
= note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
= help: add `#![feature(rustc_private)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
Expand All @@ -26,7 +26,7 @@ error[E0658]: use of unstable library feature 'rustc_private': this crate is bei
LL | extern crate rustc_macros;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/27812
= note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
= help: add `#![feature(rustc_private)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
Expand All @@ -35,7 +35,7 @@ error[E0658]: use of unstable library feature 'rustc_private': this crate is bei
LL | use rustc_macros::HashStable;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/27812
= note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
= help: add `#![feature(rustc_private)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead?
Expand All @@ -44,7 +44,7 @@ error[E0658]: use of unstable library feature 'rustc_private': this crate is bei
LL | #[derive(HashStable)]
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/27812
= note: see issue #27812 <https://github.com/rust-lang/rust/issues/27812> for more information
= help: add `#![feature(rustc_private)]` to the crate attributes to enable

error: aborting due to 6 previous errors
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/anon-params-deprecated.stderr
Expand Up @@ -10,7 +10,7 @@ note: lint level defined here
LL | #![warn(anonymous_parameters)]
| ^^^^^^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
= note: see issue #41686 <https://github.com/rust-lang/rust/issues/41686> for more information

warning: anonymous parameters are deprecated and will be removed in the next edition.
--> $DIR/anon-params-deprecated.rs:12:30
Expand All @@ -19,7 +19,7 @@ LL | fn bar_with_default_impl(String, String) {}
| ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
= note: see issue #41686 <https://github.com/rust-lang/rust/issues/41686> for more information

warning: anonymous parameters are deprecated and will be removed in the next edition.
--> $DIR/anon-params-deprecated.rs:12:38
Expand All @@ -28,5 +28,5 @@ LL | fn bar_with_default_impl(String, String) {}
| ^^^^^^ help: Try naming the parameter or explicitly ignoring it: `_: String`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
= note: see issue #41686 <https://github.com/rust-lang/rust/issues/41686> for more information