diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1146,7 +1146,7 @@ impl Builder { /// [`ParseCallbacks`](./callbacks/trait.ParseCallbacks.html) documentation. pub fn parse_callbacks( mut self, - cb: Box<callbacks::ParseCallbacks>, + cb: Box<dyn callbacks::ParseCallbacks>, ) -> Self { self.options.parse_callbacks = Some(cb); self @@ -1500,7 +1500,7 @@ struct BindgenOptions { /// A user-provided visitor to allow customizing different kinds of /// situations. - parse_callbacks: Option<Box<callbacks::ParseCallbacks>>, + parse_callbacks: Option<Box<dyn callbacks::ParseCallbacks>>, /// Which kind of items should we generate? By default, we'll generate all /// of them. @@ -1853,7 +1853,7 @@ impl Bindings { /// Convert these bindings into source text (with raw lines prepended). pub fn to_string(&self) -> String { let mut bytes = vec![]; - self.write(Box::new(&mut bytes) as Box<Write>) + self.write(Box::new(&mut bytes) as Box<dyn Write>) .expect("writing to a vec cannot fail"); String::from_utf8(bytes) .expect("we should only write bindings that are valid utf-8") @@ -1871,7 +1871,7 @@ impl Bindings { } /// Write these bindings as source text to the given `Write`able. - pub fn write<'a>(&self, mut writer: Box<Write + 'a>) -> io::Result<()> { + pub fn write<'a>(&self, mut writer: Box<dyn Write + 'a>) -> io::Result<()> { writer.write( "/* automatically generated by rust-bindgen */\n\n".as_bytes(), )?; |