Skip to content

Commit d2a4e42

Browse files
Rename intra-doc lint
1 parent e6c7868 commit d2a4e42

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/librustc/lint/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ declare_lint! {
299299
}
300300

301301
declare_lint! {
302-
pub INTRA_LINK_RESOLUTION_FAILURE,
302+
pub INTRA_DOC_LINK_RESOLUTION_FAILURE,
303303
Warn,
304304
"warn about documentation intra links resolution failure"
305305
}
@@ -357,7 +357,7 @@ impl LintPass for HardwiredLints {
357357
UNSTABLE_NAME_COLLISIONS,
358358
DUPLICATE_ASSOCIATED_TYPE_BINDINGS,
359359
DUPLICATE_MACRO_EXPORTS,
360-
INTRA_LINK_RESOLUTION_FAILURE,
360+
INTRA_DOC_LINK_RESOLUTION_FAILURE,
361361
)
362362
}
363363
}

src/librustdoc/clean/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1284,13 +1284,13 @@ fn resolution_failure(
12841284
link_range.end + code_dox_len,
12851285
);
12861286

1287-
diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_LINK_RESOLUTION_FAILURE,
1287+
diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
12881288
NodeId::new(0),
12891289
sp,
12901290
&msg);
12911291
diag.span_label(sp, "cannot be resolved, ignoring");
12921292
} else {
1293-
diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_LINK_RESOLUTION_FAILURE,
1293+
diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
12941294
NodeId::new(0),
12951295
sp,
12961296
&msg);
@@ -1310,7 +1310,7 @@ fn resolution_failure(
13101310
}
13111311
diag
13121312
} else {
1313-
cx.tcx.struct_span_lint_node(lint::builtin::INTRA_LINK_RESOLUTION_FAILURE,
1313+
cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
13141314
NodeId::new(0),
13151315
sp,
13161316
&msg)

src/librustdoc/core.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub fn run_core(search_paths: SearchPaths,
187187
_ => None
188188
};
189189

190-
let intra_link_resolution_failure_name = lint::builtin::INTRA_LINK_RESOLUTION_FAILURE.name;
190+
let intra_link_resolution_failure_name = lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE.name;
191191
let warnings_lint_name = lint::builtin::WARNINGS.name;
192192
let lints = lint::builtin::HardwiredLints.get_lints()
193193
.iter()

src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![deny(intra_link_resolution_failure)]
11+
#![deny(intra_doc_link_resolution_failure)]
1212

1313
/// [v2] //~ ERROR
1414
pub fn foo() {}

src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ error: `[v2]` cannot be resolved, ignoring it...
77
note: lint level defined here
88
--> $DIR/deny-intra-link-resolution-failure.rs:11:9
99
|
10-
11 | #![deny(intra_link_resolution_failure)]
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10+
11 | #![deny(intra_doc_link_resolution_failure)]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
1313

src/test/rustdoc-ui/intra-links-warning.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: `[Foo::baz]` cannot be resolved, ignoring it...
44
13 | //! Test with [Foo::baz], [Bar::foo], ...
55
| ^^^^^^^^ cannot be resolved, ignoring
66
|
7-
= note: #[warn(intra_link_resolution_failure)] on by default
7+
= note: #[warn(intra_doc_link_resolution_failure)] on by default
88
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
99

1010
warning: `[Bar::foo]` cannot be resolved, ignoring it...

0 commit comments

Comments
 (0)