diff options
| author | bors <bors@rust-lang.org> | 2018-10-26 21:46:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-10-26 21:46:13 +0000 |
| commit | fa45602b71c59c6315fdb07e925dec61f5827ad9 (patch) | |
| tree | 5f4e8068e3e90fed1a3718e693d7fcab2a25a1cc /src/libsyntax_ext | |
| parent | 3e6f30ec3e6bda159063fcd126dcb14725fef92d (diff) | |
| parent | 81a609bd4c7a8244e1cedaf9d34824b241deadbb (diff) | |
| download | rust-fa45602b71c59c6315fdb07e925dec61f5827ad9.tar.gz rust-fa45602b71c59c6315fdb07e925dec61f5827ad9.zip | |
Auto merge of #54929 - csmoe:cfg_lint, r=petrochenkov
Suggest to remove prefix `b` in cfg attribute lint string Closes #54926 r? @estebank
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 28a2c11ceb1..002ecce58e6 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -202,8 +202,8 @@ use syntax::source_map::{self, respan}; use syntax::util::move_map::MoveMap; use syntax::ptr::P; use syntax::symbol::{Symbol, keywords}; +use syntax::parse::ParseSess; use syntax_pos::{DUMMY_SP, Span}; -use errors::Handler; use self::ty::{LifetimeBounds, Path, Ptr, PtrTy, Self_, Ty}; @@ -412,7 +412,7 @@ impl<'a> TraitDef<'a> { match *item { Annotatable::Item(ref item) => { let is_packed = item.attrs.iter().any(|attr| { - for r in attr::find_repr_attrs(&cx.parse_sess.span_diagnostic, attr) { + for r in attr::find_repr_attrs(&cx.parse_sess, attr) { if let attr::ReprPacked(_) = r { return true; } @@ -811,10 +811,10 @@ impl<'a> TraitDef<'a> { } } -fn find_repr_type_name(diagnostic: &Handler, type_attrs: &[ast::Attribute]) -> &'static str { +fn find_repr_type_name(sess: &ParseSess, type_attrs: &[ast::Attribute]) -> &'static str { let mut repr_type_name = "isize"; for a in type_attrs { - for r in &attr::find_repr_attrs(diagnostic, a) { + for r in &attr::find_repr_attrs(sess, a) { repr_type_name = match *r { attr::ReprPacked(_) | attr::ReprSimd | attr::ReprAlign(_) | attr::ReprTransparent => continue, @@ -1390,7 +1390,7 @@ impl<'a> MethodDef<'a> { // discriminant_test = __self0_vi == __self1_vi && __self0_vi == __self2_vi && ... let mut discriminant_test = cx.expr_bool(sp, true); - let target_type_name = find_repr_type_name(&cx.parse_sess.span_diagnostic, type_attrs); + let target_type_name = find_repr_type_name(&cx.parse_sess, type_attrs); let mut first_ident = None; for (&ident, self_arg) in vi_idents.iter().zip(&self_args) { |
