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##"