Skip to content

Commit

Permalink
Fix src/test/rustdoc/foreigntype.rs
Browse files Browse the repository at this point in the history
extern types do not implement DynSized, so to implement a trait for one
you need to explicitly remove the DynSized bound for that trait
  • Loading branch information
mikeyhew committed Nov 21, 2017
1 parent 62b4c91 commit b9a69c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/rustdoc/foreigntype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(extern_types)]
#![feature(extern_types, dynsized)]

use std::marker::DynSized;

extern {
// @has foreigntype/foreigntype.ExtType.html
Expand All @@ -20,7 +22,7 @@ impl ExtType {
pub fn do_something(&self) {}
}

pub trait Trait {}
pub trait Trait: ?DynSized {}

// @has foreigntype/trait.Trait.html '//a[@class="foreigntype"]' 'ExtType'
impl Trait for ExtType {}
Expand Down

0 comments on commit b9a69c7

Please sign in to comment.