about summary refs log tree commit diff
path: root/src/test/rustdoc/proc-macro.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-72/+0
2021-11-28Fix warnings in rustdoc HTML testsNoah Lev-1/+1
Now that compiletest denies warnings in these tests, they need fixing!
2021-04-17rustdoc: use more precise relative URLSMichael Howell-3/+3
Instead of using a depth counter and adding "../" to get to the top, this commit makes rustdoc actually compare the path of what it's linking from to the path that it's linking to. This makes the resulting HTML shorter. Here's a comparison of one of the largest (non-source) files in the Rust standard library docs (about 4% improvement before gzipping). $ wc -c struct.Wrapping.old.html struct.Wrapping.new.html 2387389 struct.Wrapping.old.html 2298538 struct.Wrapping.new.html Most if it can be efficiently gzipped away. $ wc -c struct.Wrapping.old.html.gz struct.Wrapping.new.html.gz 70679 struct.Wrapping.old.html.gz 70050 struct.Wrapping.new.html.gz But it also makes a difference in the final DOM size, reducing it from 91MiB to 82MiB.
2019-08-24Improve Rustdoc's handling of procedural macrosAaron Hill-1/+2
Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-07-11Remove `MacroKind::ProcMacroStub`Vadim Petrochenkov-1/+1
It's internal to resolve and always results in `Res::Err` outside of resolve. Instead put `DefKind::Fn`s themselves into the macro namespace, it's ok. Proc macro stubs are items placed into macro namespase for functions that define proc macros. https://github.com/rust-lang/rust/pull/52383 The rustdoc test is changed because the old test didn't actually reproduce the ICE it was supposed to reproduce.
2019-01-22add intra-doc link test to proc-macro testQuietMisdreavus-0/+5
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-08rustdoc: Fix local reexports of proc macrosOliver Middleton-0/+13
Filter out `ProcMacroStub`s to avoid an ICE during cleaning. Also add proc macros to `cache().paths` so it can generate links.
2018-11-30tests: use `force-host` and `no-prefer-dynamic` in all proc_macro tests.Eduard-Mihai Burtescu-0/+3
2018-11-30tests: remove ignore-stage1 where possible in proc_macro tests.Eduard-Mihai Burtescu-2/+0
2018-09-27check for proc-macros in "all items"QuietMisdreavus-0/+8
2018-09-25handle proc-macros as macros instead of functionsQuietMisdreavus-0/+54