rust/compiler/rustc_middle/src
bors b1af43bc63 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.
2020-10-10 21:19:50 +00:00
..
dep_graph mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
hir Rollup merge of #76995 - LingMan:middle_matches, r=varkor 2020-10-06 16:25:58 +09:00
ich Implement the instruction_set attribute 2020-10-08 23:32:20 +01:00
infer use relevant span when unifying ConstVarValues 2020-09-23 11:00:44 +02:00
middle Implement the instruction_set attribute 2020-10-08 23:32:20 +01:00
mir Suggest removing &mut from borrow of &mut 2020-10-08 14:26:21 +00:00
query Fix query docs 2020-10-10 12:49:31 -07:00
traits Handle multiple applicable projection candidates 2020-10-06 11:19:31 +01:00
ty Revert calculate_dtor signature change 2020-10-09 17:18:57 +02:00
util Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
arena.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lib.rs /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
lint.rs Prevent forbid from being ignored if overriden at the same level. 2020-10-04 13:14:01 -04:00
macros.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00