Merge pull request #727 from oli-obk/similar_names

lint on binding-names that are too similar
This commit is contained in:
Manish Goregaokar 2016-03-21 10:35:36 +05:30
commit 523c596171
19 changed files with 557 additions and 94 deletions

View file

@ -102,8 +102,8 @@ macro_rules! if_let_chain {
/// Returns true if the two spans come from differing expansions (i.e. one is from a macro and one
/// isn't).
pub fn differing_macro_contexts(sp1: Span, sp2: Span) -> bool {
sp1.expn_id != sp2.expn_id
pub fn differing_macro_contexts(lhs: Span, rhs: Span) -> bool {
rhs.expn_id != lhs.expn_id
}
/// Returns true if this `expn_info` was expanded by any macro.
pub fn in_macro<T: LintContext>(cx: &T, span: Span) -> bool {