Skip to content

Commit

Permalink
Rollup merge of #80892 - camelid:intra-doc-remove-star, r=jyn514
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
JohnTitor authored Jan 11, 2021
2 parents 293a491 + e98f11b commit a7f7d70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2091,7 +2091,7 @@ fn resolve_primitive(path_str: &str, ns: Namespace) -> Option<Res> {
"array" => Array,
"tuple" => Tuple,
"unit" => Unit,
"pointer" | "*" | "*const" | "*mut" => RawPointer,
"pointer" | "*const" | "*mut" => RawPointer,
"reference" | "&" | "&mut" => Reference,
"fn" => Fn,
"never" | "!" => Never,
Expand Down
2 changes: 0 additions & 2 deletions src/test/rustdoc/intra-doc/non-path-primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' 'pointer::is_null'
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' '*const::is_null'
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' '*mut::is_null'
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.is_null"]' '*::is_null'
//! [pointer::is_null]
//! [*const::is_null]
//! [*mut::is_null]
//! [*::is_null]
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.unit.html"]' 'unit'
//! [unit]
Expand Down

0 comments on commit a7f7d70

Please sign in to comment.