Skip to content

Commit e98f11b

Browse files
committed
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.)
1 parent 080ee6f commit e98f11b

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
@@ -2092,7 +2092,7 @@ fn resolve_primitive(path_str: &str, ns: Namespace) -> Option<Res> {
20922092
"array" => Array,
20932093
"tuple" => Tuple,
20942094
"unit" => Unit,
2095-
"pointer" | "*" | "*const" | "*mut" => RawPointer,
2095+
"pointer" | "*const" | "*mut" => RawPointer,
20962096
"reference" | "&" | "&mut" => Reference,
20972097
"fn" => Fn,
20982098
"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)