Skip to content

Make "see issue" consistent #63008

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc/lint/mod.rs
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 2 additions & 2 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
@@ -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.");
}
}

4 changes: 2 additions & 2 deletions src/librustc/traits/error_reporting.rs
Original file line number Diff line number Diff line change
@@ -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.");
}
3 changes: 2 additions & 1 deletion src/librustc/ty/error.rs
Original file line number Diff line number Diff line change
@@ -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");
}
}
_ => {}
39 changes: 26 additions & 13 deletions src/librustc_lint/lib.rs
Original file line number Diff line number Diff line change
@@ -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>) {
9 changes: 5 additions & 4 deletions src/librustc_mir/transform/qualify_consts.rs
Original file line number Diff line number Diff line change
@@ -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",
);
@@ -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 {
4 changes: 2 additions & 2 deletions src/librustc_typeck/check/demand.rs
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
@@ -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"),
2 changes: 1 addition & 1 deletion src/librustdoc/config.rs
Original file line number Diff line number Diff line change
@@ -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");
3 changes: 2 additions & 1 deletion src/librustdoc/core.rs
Original file line number Diff line number Diff line change
@@ -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)]`");
7 changes: 5 additions & 2 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -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",
@@ -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,
));
}
4 changes: 2 additions & 2 deletions src/libsyntax/parse/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
5 changes: 3 additions & 2 deletions src/libsyntax/parse/lexer/mod.rs
Original file line number Diff line number Diff line change
@@ -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 {
3 changes: 2 additions & 1 deletion src/libsyntax/parse/literal.rs
Original file line number Diff line number Diff line change
@@ -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 {
4 changes: 2 additions & 2 deletions src/test/rustdoc-ui/deprecated-attrs.stderr
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions src/test/ui-fulldeps/hash-stable-is-unstable.stderr
Original file line number Diff line number Diff line change
@@ -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?
@@ -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?
@@ -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?
@@ -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?
@@ -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
6 changes: 3 additions & 3 deletions src/test/ui/anon-params-deprecated.stderr
Original file line number Diff line number Diff line change
@@ -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
@@ -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
@@ -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

Loading