From daf5f5a4d10513ff42e79fa7ef8819b170f3a13d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 21 Oct 2013 13:08:31 -0700 Subject: Drop the '2' suffix from logging macros Who doesn't like a massive renaming? --- src/libsyntax/attr.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/libsyntax/attr.rs') diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 47b31a4f76d..40b7ff29e24 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -168,17 +168,17 @@ pub fn mk_sugared_doc_attr(text: @str, lo: BytePos, hi: BytePos) -> Attribute { /// span included in the `==` comparison a plain MetaItem. pub fn contains(haystack: &[@ast::MetaItem], needle: @ast::MetaItem) -> bool { - debug2!("attr::contains (name={})", needle.name()); + debug!("attr::contains (name={})", needle.name()); do haystack.iter().any |item| { - debug2!(" testing: {}", item.name()); + debug!(" testing: {}", item.name()); item.node == needle.node } } pub fn contains_name(metas: &[AM], name: &str) -> bool { - debug2!("attr::contains_name (name={})", name); + debug!("attr::contains_name (name={})", name); do metas.iter().any |item| { - debug2!(" testing: {}", item.name()); + debug!(" testing: {}", item.name()); name == item.name() } } @@ -279,23 +279,23 @@ pub fn test_cfg> // this would be much nicer as a chain of iterator adaptors, but // this doesn't work. let some_cfg_matches = do metas.any |mi| { - debug2!("testing name: {}", mi.name()); + debug!("testing name: {}", mi.name()); if "cfg" == mi.name() { // it is a #[cfg()] attribute - debug2!("is cfg"); + debug!("is cfg"); no_cfgs = false; // only #[cfg(...)] ones are understood. match mi.meta_item_list() { Some(cfg_meta) => { - debug2!("is cfg(...)"); + debug!("is cfg(...)"); do cfg_meta.iter().all |cfg_mi| { - debug2!("cfg({}[...])", cfg_mi.name()); + debug!("cfg({}[...])", cfg_mi.name()); match cfg_mi.node { ast::MetaList(s, ref not_cfgs) if "not" == s => { - debug2!("not!"); + debug!("not!"); // inside #[cfg(not(...))], so these need to all // not match. not_cfgs.iter().all(|mi| { - debug2!("cfg(not({}[...]))", mi.name()); + debug!("cfg(not({}[...]))", mi.name()); !contains(cfg, *mi) }) } @@ -309,7 +309,7 @@ pub fn test_cfg> false } }; - debug2!("test_cfg (no_cfgs={}, some_cfg_matches={})", no_cfgs, some_cfg_matches); + debug!("test_cfg (no_cfgs={}, some_cfg_matches={})", no_cfgs, some_cfg_matches); no_cfgs || some_cfg_matches } -- cgit 1.4.1-3-g733a5