提交 53382220 编写于 作者: E Eduard Burtescu

rustc: don't allow(non_camel_case_types) in resolve.

上级 1c2df5cc
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![allow(non_camel_case_types)]
pub use self::PrivateDep::*; pub use self::PrivateDep::*;
pub use self::ImportUse::*; pub use self::ImportUse::*;
pub use self::TraitItemKind::*; pub use self::TraitItemKind::*;
...@@ -90,13 +88,13 @@ ...@@ -90,13 +88,13 @@
pub type DefMap = RefCell<NodeMap<Def>>; pub type DefMap = RefCell<NodeMap<Def>>;
#[deriving(Copy)] #[deriving(Copy)]
struct binding_info { struct BindingInfo {
span: Span, span: Span,
binding_mode: BindingMode, binding_mode: BindingMode,
} }
// Map from the name in a pattern to its binding mode. // Map from the name in a pattern to its binding mode.
type BindingMap = HashMap<Name,binding_info>; type BindingMap = HashMap<Name, BindingInfo>;
// Trait method resolution // Trait method resolution
pub type TraitMap = NodeMap<Vec<DefId> >; pub type TraitMap = NodeMap<Vec<DefId> >;
...@@ -4809,9 +4807,10 @@ fn binding_mode_map(&mut self, pat: &Pat) -> BindingMap { ...@@ -4809,9 +4807,10 @@ fn binding_mode_map(&mut self, pat: &Pat) -> BindingMap {
let mut result = HashMap::new(); let mut result = HashMap::new();
pat_bindings(&self.def_map, pat, |binding_mode, _id, sp, path1| { pat_bindings(&self.def_map, pat, |binding_mode, _id, sp, path1| {
let name = mtwt::resolve(path1.node); let name = mtwt::resolve(path1.node);
result.insert(name, result.insert(name, BindingInfo {
binding_info {span: sp, span: sp,
binding_mode: binding_mode}); binding_mode: binding_mode
});
}); });
return result; return result;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册