diff options
| author | Malo Jaffré <jaffre.malo@gmail.com> | 2017-12-31 17:17:01 +0100 |
|---|---|---|
| committer | Malo Jaffré <jaffre.malo@gmail.com> | 2018-01-01 14:44:12 +0100 |
| commit | cbb32a94181d359ca16659b3e74303e945e8ea92 (patch) | |
| tree | 785a92dda4d9ec7b385d05d81db60a8a615cd5a7 /src/libsyntax_pos | |
| parent | 8395798d1aa33bb6ee74d05825bb775a75a9b70e (diff) | |
Fix docs for future pulldown migration
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/hygiene.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index 55342c2768a..06a9306501c 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -10,10 +10,10 @@ //! Machinery for hygienic macros, inspired by the MTWT[1] paper. //! -//! [1] Matthew Flatt, Ryan Culpepper, David Darais, and Robert Bruce Findler. -//! 2012. *Macros that work together: Compile-time bindings, partial expansion, +//! [1] Matthew Flatt, Ryan Culpepper, David Darais, and Robert Bruce Findler. 2012. +//! *Macros that work together: Compile-time bindings, partial expansion, //! and definition contexts*. J. Funct. Program. 22, 2 (March 2012), 181-216. -//! DOI=10.1017/S0956796812000093 http://dx.doi.org/10.1017/S0956796812000093 +//! DOI=10.1017/S0956796812000093 <http://dx.doi.org/10.1017/S0956796812000093> use Span; use symbol::{Ident, Symbol}; @@ -224,6 +224,7 @@ impl SyntaxContext { /// Adjust this context for resolution in a scope created by the given expansion. /// For example, consider the following three resolutions of `f`: + /// /// ```rust /// mod foo { pub fn f() {} } // `f`'s `SyntaxContext` is empty. /// m!(f); @@ -255,7 +256,8 @@ impl SyntaxContext { /// Adjust this context for resolution in a scope created by the given expansion /// via a glob import with the given `SyntaxContext`. - /// For example, + /// For example: + /// /// ```rust /// m!(f); /// macro m($i:ident) { @@ -293,6 +295,7 @@ impl SyntaxContext { } /// Undo `glob_adjust` if possible: + /// /// ```rust /// if let Some(privacy_checking_scope) = self.reverse_glob_adjust(expansion, glob_ctxt) { /// assert!(self.glob_adjust(expansion, glob_ctxt) == Some(privacy_checking_scope)); |
