Rollup merge of #80885 - camelid:intra-doc-str-ref, r=jyn514
rustdoc: Resolve `&str` as `str` People almost always are referring to `&str`, not `str`, so this will save a manual link resolve in many cases. Note that we already accept `&` (resolves to `reference`) in intra-doc links, so this shouldn't cause breakage. r? `@jyn514`
This commit is contained in:
commit
7e160256e4
2 changed files with 10 additions and 1 deletions
|
|
@ -2085,7 +2085,7 @@ fn resolve_primitive(path_str: &str, ns: Namespace) -> Option<Res> {
|
|||
"f64" => F64,
|
||||
"char" => Char,
|
||||
"bool" | "true" | "false" => Bool,
|
||||
"str" => Str,
|
||||
"str" | "&str" => Str,
|
||||
// See #80181 for why these don't have symbols associated.
|
||||
"slice" => Slice,
|
||||
"array" => Array,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue