Skip to content

Commit 44575f7

Browse files
committed
Rename mtwt to hygiene
1 parent 76ed445 commit 44575f7

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

src/librustc/session/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
735735
"for every macro invocation, print its name and arguments"),
736736
enable_nonzeroing_move_hints: bool = (false, parse_bool,
737737
"force nonzeroing move optimization on"),
738-
keep_mtwt_tables: bool = (false, parse_bool,
739-
"don't clear the resolution tables after analysis"),
738+
keep_hygiene_data: bool = (false, parse_bool,
739+
"don't clear the hygiene data after analysis"),
740740
keep_ast: bool = (false, parse_bool,
741741
"keep the AST after lowering it to HIR"),
742742
show_span: Option<String> = (None, parse_opt_string,

src/librustc_driver/driver.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ pub fn compile_input(sess: &Session,
236236
Ok(())
237237
}
238238

239-
fn keep_mtwt_tables(sess: &Session) -> bool {
240-
sess.opts.debugging_opts.keep_mtwt_tables
239+
fn keep_hygiene_data(sess: &Session) -> bool {
240+
sess.opts.debugging_opts.keep_hygiene_data
241241
}
242242

243243
fn keep_ast(sess: &Session) -> bool {
@@ -479,7 +479,7 @@ pub fn phase_1_parse_input<'a>(sess: &'a Session,
479479
input: &Input)
480480
-> PResult<'a, ast::Crate> {
481481
// These may be left in an incoherent state after a previous compile.
482-
syntax::ext::mtwt::reset_hygiene_data();
482+
syntax::ext::hygiene::reset_hygiene_data();
483483
// `clear_ident_interner` can be used to free memory, but it does not restore the initial state.
484484
token::reset_ident_interner();
485485
let continue_after_error = sess.opts.continue_parse_after_error;
@@ -760,9 +760,9 @@ pub fn phase_2_configure_and_expand<'a, F>(sess: &Session,
760760
hir_map::Forest::new(lower_crate(sess, &krate, &mut resolver), &sess.dep_graph)
761761
});
762762

763-
// Discard MTWT tables that aren't required past lowering to HIR.
764-
if !keep_mtwt_tables(sess) {
765-
syntax::ext::mtwt::reset_hygiene_data();
763+
// Discard hygiene data, which isn't required past lowering to HIR.
764+
if !keep_hygiene_data(sess) {
765+
syntax::ext::hygiene::reset_hygiene_data();
766766
}
767767

768768
Ok(ExpansionResult {

src/librustc_resolve/assign_ids.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Resolver;
1212
use rustc::session::Session;
1313
use syntax::ast;
14-
use syntax::ext::mtwt::Mark;
14+
use syntax::ext::hygiene::Mark;
1515
use syntax::fold::{self, Folder};
1616
use syntax::ptr::P;
1717
use syntax::util::move_map::MoveMap;

src/librustc_resolve/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ use rustc::ty::subst::{ParamSpace, FnSpace, TypeSpace};
5353
use rustc::hir::{Freevar, FreevarMap, TraitCandidate, TraitMap, GlobMap};
5454
use rustc::util::nodemap::{NodeMap, NodeSet, FnvHashMap, FnvHashSet};
5555

56-
use syntax::ext::mtwt::Mark;
56+
use syntax::ext::hygiene::Mark;
5757
use syntax::ast::{self, FloatTy};
5858
use syntax::ast::{CRATE_NODE_ID, Name, NodeId, CrateNum, IntTy, UintTy};
5959
use syntax::parse::token::{self, keywords};

src/libsyntax/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub use util::ThinVec;
1919
use syntax_pos::{mk_sp, Span, DUMMY_SP, ExpnId};
2020
use codemap::{respan, Spanned};
2121
use abi::Abi;
22-
use ext::mtwt::SyntaxContext;
22+
use ext::hygiene::SyntaxContext;
2323
use parse::token::{self, keywords, InternedString};
2424
use print::pprust;
2525
use ptr::P;

src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use ast::{Block, Crate, Ident, Mac_, Name, PatKind};
1212
use ast::{MacStmtStyle, Stmt, StmtKind, ItemKind};
1313
use ast;
14-
use ext::mtwt::Mark;
14+
use ext::hygiene::Mark;
1515
use attr::{self, HasAttrs};
1616
use attr::AttrMetaMethods;
1717
use codemap::{dummy_spanned, ExpnInfo, NameAndSpan, MacroBang, MacroAttribute};

src/libsyntax/ext/mtwt.rs renamed to src/libsyntax/ext/hygiene.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Machinery for hygienic macros, as described in the MTWT[1] paper.
11+
//! Machinery for hygienic macros, inspired by the MTWT[1] paper.
1212
//!
1313
//! [1] Matthew Flatt, Ryan Culpepper, David Darais, and Robert Bruce Findler.
1414
//! 2012. *Macros that work together: Compile-time bindings, partial expansion,

src/libsyntax/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub mod ext {
127127
pub mod base;
128128
pub mod build;
129129
pub mod expand;
130-
pub mod mtwt;
130+
pub mod hygiene;
131131
pub mod quote;
132132
pub mod source_util;
133133

0 commit comments

Comments
 (0)