Merge hir::IsAuto into ast::IsAuto.
This commit is contained in:
parent
cb233f5420
commit
738faadc31
@ -449,7 +449,7 @@ fn lower_item_kind(
|
||||
.map(|item| self.lower_trait_item_ref(item))
|
||||
.collect();
|
||||
hir::ItemKind::Trait(
|
||||
self.lower_is_auto(is_auto),
|
||||
is_auto,
|
||||
unsafety,
|
||||
self.lower_generics(generics, ImplTraitContext::disallowed()),
|
||||
bounds,
|
||||
@ -1275,13 +1275,6 @@ fn lower_method_sig(
|
||||
(generics, hir::FnSig { header, decl })
|
||||
}
|
||||
|
||||
fn lower_is_auto(&mut self, a: IsAuto) -> hir::IsAuto {
|
||||
match a {
|
||||
IsAuto::Yes => hir::IsAuto::Yes,
|
||||
IsAuto::No => hir::IsAuto::No,
|
||||
}
|
||||
}
|
||||
|
||||
fn lower_fn_header(&mut self, h: FnHeader) -> hir::FnHeader {
|
||||
hir::FnHeader {
|
||||
unsafety: h.unsafety,
|
||||
|
@ -21,7 +21,7 @@
|
||||
use syntax::source_map::Spanned;
|
||||
use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, AsmDialect};
|
||||
use syntax::ast::{Attribute, Label, LitKind, StrStyle, FloatTy, IntTy, UintTy};
|
||||
pub use syntax::ast::{Mutability, Constness, Unsafety, Movability, CaptureBy};
|
||||
pub use syntax::ast::{Mutability, Constness, Unsafety, Movability, CaptureBy, IsAuto};
|
||||
use syntax::attr::{InlineAttr, OptimizeAttr};
|
||||
use syntax::symbol::{Symbol, kw};
|
||||
use syntax::tokenstream::TokenStream;
|
||||
@ -2122,13 +2122,6 @@ pub fn has_implicit_self(&self) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
/// Is the trait definition an auto trait?
|
||||
#[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, HashStable)]
|
||||
pub enum IsAuto {
|
||||
Yes,
|
||||
No
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, HashStable,
|
||||
Ord, RustcEncodable, RustcDecodable, Debug)]
|
||||
pub enum IsAsync {
|
||||
|
@ -170,6 +170,7 @@ fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHas
|
||||
impl_stable_hash_for!(enum ::syntax::ast::AttrStyle { Outer, Inner });
|
||||
impl_stable_hash_for!(enum ::syntax::ast::Movability { Static, Movable });
|
||||
impl_stable_hash_for!(enum ::syntax::ast::CaptureBy { Value, Ref });
|
||||
impl_stable_hash_for!(enum ::syntax::ast::IsAuto { Yes, No });
|
||||
|
||||
impl<'a> HashStable<StableHashingContext<'a>> for [ast::Attribute] {
|
||||
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
|
||||
|
Loading…
Reference in New Issue
Block a user