about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-10 21:19:50 +0000
committerbors <bors@rust-lang.org>2020-10-10 21:19:50 +0000
commitb1af43bc63bc7417938df056f7f25d456cc11b0e (patch)
treecb2e27c8a5a4bbe28701e04801eeb50c2a829104 /compiler/rustc_codegen_llvm/src
parent790d19cd259e9ec656c6e0bb1446e980115ba46f (diff)
parente2424a2c1f4d5502b8900a1701c7a8a3a2a28bf9 (diff)
downloadrust-b1af43bc63bc7417938df056f7f25d456cc11b0e.tar.gz
rust-b1af43bc63bc7417938df056f7f25d456cc11b0e.zip
Auto merge of #76934 - camelid:rustdoc-allow-generic-params, r=jyn514
Allow generic parameters in intra-doc links

Fixes #62834.

---

The contents of the generics will be mostly ignored (except for warning
if fully-qualified syntax is used, which is currently unsupported in
intra-doc links - see issue #74563).

* Allow links like `Vec<T>`, `Result<T, E>`, and `Option<Box<T>>`
* Allow links like `Vec::<T>::new()`
* Warn on
  * Unbalanced angle brackets (e.g. `Vec<T` or `Vec<T>>`)
  * Missing type to apply generics to (`<T>` or `<Box<T>>`)
  * Use of fully-qualified syntax (`<Vec as IntoIterator>::into_iter`)
  * Invalid path separator (`Vec:<T>:new`)
  * Too many angle brackets (`Vec<<T>>`)
  * Empty angle brackets (`Vec<>`)

Note that this implementation *does* allow some constructs that aren't
valid in the actual Rust syntax, for example `Box::<T>new()`. That may
not be supported in rustdoc in the future; it is an implementation
detail.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions