Created
June 22, 2018 15:27
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
authors = [] | |
name = "incremental-ice" | |
version = "0.0.0" | |
[dependencies] | |
serde = "1.0.0" | |
serde_derive = "1.0.0" | |
[lib] | |
path = "lib.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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![])) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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