From ec781e5f46916e5b2fb90e94054d0cc0d6250969 Mon Sep 17 00:00:00 2001 From: Liigo Zhuang Date: Wed, 8 Jul 2015 18:04:24 +0800 Subject: [PATCH] update diagnostics E0282 --- src/librustc/diagnostics.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index c329f2fb012db..361bfa2cd7d12 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -895,6 +895,17 @@ impl Foo { This will fail because the compiler does not know which instance of `Foo` to call `bar` on. Change `Foo::bar()` to `Foo::::bar()` to resolve the error. + +Also check that you created a `None` value with enough type information: + +``` +let none = None; // error: unable to infer enough type information about `_`; + // type annotations or generic parameter binding required +``` + +``` +let none = None::; // ok! +``` "##, E0296: r##"