Skip to content

Instantly share code, notes, and snippets.

@tanriol
Created June 22, 2018 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanriol/0d19db457b7c0c397da6229db828efdd to your computer and use it in GitHub Desktop.
Save tanriol/0d19db457b7c0c397da6229db828efdd to your computer and use it in GitHub Desktop.
cargo clean && cargo check --lib && git apply add-dyn.patch && cargo check --lib ; git apply -R add-dyn.patch # ICE on the second cargo check
diff --git a/config.rs b/config.rs
index 8b1a9599656d..8ca857920353 100644
--- a/config.rs
+++ b/config.rs
@@ -5,7 +5,7 @@ use std::io::Write;
#[derive(Deserialize)]
pub struct Configuration {
#[serde(deserialize_with = "find_instrument")]
- pub instrument: Box<Write>,
+ pub instrument: Box<dyn Write>,
}
fn find_instrument<'de, D>(_de: D) -> Result<Box<dyn Write>, D::Error>
[package]
authors = []
name = "incremental-ice"
version = "0.0.0"
[dependencies]
serde = "1.0.0"
serde_derive = "1.0.0"
[lib]
path = "lib.rs"
use serde::de::{Deserializer};
use std::io::Write;
#[derive(Deserialize)]
pub struct Configuration {
#[serde(deserialize_with = "find_instrument")]
pub instrument: Box<Write>,
}
fn find_instrument<'de, D>(_de: D) -> Result<Box<dyn Write>, D::Error>
where
D: Deserializer<'de>,
{
Ok(Box::new(vec![]))
}
extern crate serde;
#[macro_use]
extern crate serde_derive;
pub mod config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment