Skip to content

Commit a7f7d70

Browse files
authored
Rollup merge of #80892 - camelid:intra-doc-remove-star, r=jyn514
rustdoc: Remove `*` intra-doc alias for `pointer` It's not valid Rust code and it can easily be confused with a wildcard glob pattern or something else. People can always use `pointer` instead, so it's just removing an alias. It hasn't hit stable yet (I think it's still on nightly), so it's okay to remove it. (We can always add it back later if we change our mind too.) r? `@jyn514` cc #80885 (comment)
2 parents 293a491 + e98f11b commit a7f7d70

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,7 @@ fn resolve_primitive(path_str: &str, ns: Namespace) -> Option<Res> {
20912091
"array" => Array,
20922092
"tuple" => Tuple,
20932093
"unit" => Unit,
2094-
"pointer" | "*" | "*const" | "*mut" => RawPointer,
2094+
"pointer" | "*const" | "*mut" => RawPointer,
20952095
"reference" | "&" | "&mut" => Reference,
20962096
"fn" => Fn,
20972097
"never" | "!" => Never,

src/test/rustdoc/intra-doc/non-path-primitives.rs

-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' 'pointer::is_null'
1212
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' '*const::is_null'
1313
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' '*mut::is_null'
14-
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' '*::is_null'
1514
//! [pointer::is_null]
1615
//! [*const::is_null]
1716
//! [*mut::is_null]
18-
//! [*::is_null]
1917
2018
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.unit.html"]' 'unit'
2119
//! [unit]

0 commit comments

Comments
 (0)