Skip to content

Commit 738faad

Browse files
committed
Merge hir::IsAuto into ast::IsAuto.
1 parent cb233f5 commit 738faad

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

src/librustc/hir/lowering/item.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ impl LoweringContext<'_> {
449449
.map(|item| self.lower_trait_item_ref(item))
450450
.collect();
451451
hir::ItemKind::Trait(
452-
self.lower_is_auto(is_auto),
452+
is_auto,
453453
unsafety,
454454
self.lower_generics(generics, ImplTraitContext::disallowed()),
455455
bounds,
@@ -1275,13 +1275,6 @@ impl LoweringContext<'_> {
12751275
(generics, hir::FnSig { header, decl })
12761276
}
12771277

1278-
fn lower_is_auto(&mut self, a: IsAuto) -> hir::IsAuto {
1279-
match a {
1280-
IsAuto::Yes => hir::IsAuto::Yes,
1281-
IsAuto::No => hir::IsAuto::No,
1282-
}
1283-
}
1284-
12851278
fn lower_fn_header(&mut self, h: FnHeader) -> hir::FnHeader {
12861279
hir::FnHeader {
12871280
unsafety: h.unsafety,

src/librustc/hir/mod.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use syntax_pos::{Span, DUMMY_SP, MultiSpan};
2121
use syntax::source_map::Spanned;
2222
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, AsmDialect};
2323
use syntax::ast::{Attribute, Label, LitKind, StrStyle, FloatTy, IntTy, UintTy};
24-
pub use syntax::ast::{Mutability, Constness, Unsafety, Movability, CaptureBy};
24+
pub use syntax::ast::{Mutability, Constness, Unsafety, Movability, CaptureBy, IsAuto};
2525
use syntax::attr::{InlineAttr, OptimizeAttr};
2626
use syntax::symbol::{Symbol, kw};
2727
use syntax::tokenstream::TokenStream;
@@ -2122,13 +2122,6 @@ impl ImplicitSelfKind {
21222122
}
21232123
}
21242124

2125-
/// Is the trait definition an auto trait?
2126-
#[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, HashStable)]
2127-
pub enum IsAuto {
2128-
Yes,
2129-
No
2130-
}
2131-
21322125
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, HashStable,
21332126
Ord, RustcEncodable, RustcDecodable, Debug)]
21342127
pub enum IsAsync {

src/librustc/ich/impls_syntax.rs

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ impl_stable_hash_for!(enum ::syntax::ast::StrStyle { Cooked, Raw(pounds) });
170170
impl_stable_hash_for!(enum ::syntax::ast::AttrStyle { Outer, Inner });
171171
impl_stable_hash_for!(enum ::syntax::ast::Movability { Static, Movable });
172172
impl_stable_hash_for!(enum ::syntax::ast::CaptureBy { Value, Ref });
173+
impl_stable_hash_for!(enum ::syntax::ast::IsAuto { Yes, No });
173174

174175
impl<'a> HashStable<StableHashingContext<'a>> for [ast::Attribute] {
175176
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {

0 commit comments

Comments
 (0)