提交 b0fca5f7 编写于 作者: G Gianni Ciccarelli

support `default impl` for specialization

    rebase after support for llvm-3.7
上级 6427fdce
...@@ -1346,7 +1346,7 @@ fn lower_item_kind(&mut self, ...@@ -1346,7 +1346,7 @@ fn lower_item_kind(&mut self,
hir::ItemImpl(self.lower_unsafety(unsafety), hir::ItemImpl(self.lower_unsafety(unsafety),
self.lower_impl_polarity(polarity), self.lower_impl_polarity(polarity),
self.lower_defaultness(defaultness), self.lower_defaultness(defaultness, true /* [1] */),
self.lower_generics(generics), self.lower_generics(generics),
ifce, ifce,
self.lower_ty(ty), self.lower_ty(ty),
......
...@@ -823,8 +823,9 @@ pub fn print_visibility(&mut self, vis: &hir::Visibility) -> io::Result<()> { ...@@ -823,8 +823,9 @@ pub fn print_visibility(&mut self, vis: &hir::Visibility) -> io::Result<()> {
} }
pub fn print_defaultness(&mut self, defaultness: hir::Defaultness) -> io::Result<()> { pub fn print_defaultness(&mut self, defaultness: hir::Defaultness) -> io::Result<()> {
if let hir::Defaultness::Default = defaultness { match defaultness {
self.word_nbsp("default")?; hir::Defaultness::Default { .. } => self.word_nbsp("default")?,
hir::Defaultness::Final => (),
} }
Ok(()) Ok(())
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册