about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2018-06-04 20:40:23 -0500
committerWho? Me?! <mark-i-m@users.noreply.github.com>2018-06-05 22:06:13 -0500
commit047464aa425f2b9cef43ce24138c9ef1d11fdddc (patch)
treeb967ffaefc493ed9615814e9ecec4ae28316b681 /src/doc/rustc-dev-guide
parent38d6e58799490bd1f9f23901e3a51da5d70745b3 (diff)
downloadrust-047464aa425f2b9cef43ce24138c9ef1d11fdddc.tar.gz
rust-047464aa425f2b9cef43ce24138c9ef1d11fdddc.zip
Add bit about ctags; close #80
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/how-to-build-and-run.md24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/doc/rustc-dev-guide/src/how-to-build-and-run.md b/src/doc/rustc-dev-guide/src/how-to-build-and-run.md
index 66c73654824..54e60ddcb4d 100644
--- a/src/doc/rustc-dev-guide/src/how-to-build-and-run.md
+++ b/src/doc/rustc-dev-guide/src/how-to-build-and-run.md
@@ -75,9 +75,9 @@ internally. The result is the compiling `rustc` is done in stages.
 For hacking, often building the stage 1 compiler is enough, but for
 final testing and release, the stage 2 compiler is used.
 
-`./x.py check` is really fast to build the rust compiler. 
-It is, in particular, very useful when you're doing some kind of 
-"type-based refactoring", like renaming a method, or changing the 
+`./x.py check` is really fast to build the rust compiler.
+It is, in particular, very useful when you're doing some kind of
+"type-based refactoring", like renaming a method, or changing the
 signature of some function.
 
 Once you've created a config.toml, you are now ready to run
@@ -155,3 +155,21 @@ in other sections:
   more details):
   - `./x.py test --stage 1 src/libstd` – runs the `#[test]` tests from libstd
   - `./x.py test --stage 1 src/test/run-pass` – runs the `run-pass` test suite
+
+### ctags
+
+One of the challenges with rustc is that the RLS can't handle it, making code
+navigation difficult. One solution is to use `ctags`. The following script can
+be used to set it up: [https://github.com/nikomatsakis/rust-etags][etags].
+
+CTAGS integrates into emacs and vim quite easily. The following can then be
+used to build and generate tags:
+
+```
+rust-ctags src/lib* && ./x.py build <something>
+```
+
+This allows you to do "jump-to-def" with whatever functions were around when
+you last built, which is ridiculously useful.
+
+[etags]: https://github.com/nikomatsakis/rust-etags