Allow default associated types
This commit is contained in:
parent
b43958d96e
commit
fcffe854b8
@ -389,9 +389,9 @@ pub fn visit_trait_item(&mut self, ti: &ast::TraitItem) {
|
||||
ti.id,
|
||||
ast::Defaultness::Final);
|
||||
}
|
||||
ast::TraitItemKind::Type(ref type_param_bounds, _) => {
|
||||
ast::TraitItemKind::Type(ref type_param_bounds, ref type_default) => {
|
||||
let rewrite = rewrite_associated_type(ti.ident,
|
||||
None,
|
||||
type_default.as_ref(),
|
||||
Some(type_param_bounds),
|
||||
&self.get_context(),
|
||||
self.block_indent);
|
||||
|
4
tests/target/associated_type_defaults.rs
Normal file
4
tests/target/associated_type_defaults.rs
Normal file
@ -0,0 +1,4 @@
|
||||
#![feature(associated_type_defaults)]
|
||||
trait Foo {
|
||||
type Bar = ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user