Use absolute paths to Ok and Err

This commit is contained in:
David Tolnay
2017-02-01 09:42:12 -08:00
parent d960571439
commit b7ca574bb3
4 changed files with 27 additions and 23 deletions
+5 -1
View File
@@ -8,11 +8,15 @@ use self::serde::de::{Deserialize, Deserializer};
use std::borrow::Cow;
use std::marker::PhantomData;
use std::result::Result as StdResult;
// Try to trip up the generated code if it fails to use fully qualified paths.
#[allow(dead_code)]
struct Result;
use std::result::Result as StdResult;
#[allow(dead_code)]
struct Ok;
#[allow(dead_code)]
struct Err;
//////////////////////////////////////////////////////////////////////////