Change:
In Rust 1.15.1 and nightly ( 2017-02-09) Produces the error: Specifically, my issue is with:
It certainly looks like it would be coming from , but on first read it all looks reasonable.
Oh, no . Makes more sense. Whipping up a patch.

Discussion:
} }; <del> let count = |n| { format!("{} parameter{}", n, if n == 1 { "" } else { "s" }) </del> <ins> let count_lifetime_params = |n| { format!("{} lifetime parameter{}", n, if n == 1 { "" } else { "s" }) }; let count_type_params = |n| { format!("{} type parameter{}", n, if n == 1 { "" } else { "s" }) </ins> }; // Check provided lifetime parameters. let lifetime_defs = segment.map_or(&[][..], |(_, generics)| &generics.regions); if lifetimes.len() > lifetime_defs.len() { <ins> let expected_text = count_lifetime_params(lifetime_defs.len()); let actual_text = count_lifetime_params(lifetimes.len()); </ins> struct_span_err!(self.tcx.sess, span, E0088, "too many lifetime parameters provided:  <del> expected {}, found {}", count(lifetime_defs.len()), count(lifetimes.len())) .span_label(span, &format!("unexpected lifetime parameter{}", match lifetimes.len() { 1 => "", _ => "s" })) </del> <ins> expected at most {}, found {}", expected_text, actual_text) .span_label(span, &format!("expected {}", expected_text)) </ins> .emit(); } else if lifetimes.len() > 0 && lifetimes.len() < lifetime_defs.len() { <ins> let expected_text = count_lifetime_params(lifetime_defs.len()); let actual_text = count_lifetime_params(lifetimes.len()); </ins> struct_span_err!(self.tcx.sess, span, E0090, "too few lifetime parameters provided:  <del> expected {}, found {}", count(lifetime_defs.len()), count(lifetimes.len())) .span_label(span, &format!("too few lifetime parameters")) </del> <ins> expected {}, found {}", expected_text, actual_text) .span_label(span, &format!("expected {}", expected_text)) </ins> .emit(); }

.count(); if types.len() > type_defs.len() { let span = types[type_defs.len()].span; <ins> let expected_text = count_type_params(type_defs.len()); let actual_text = count_type_params(types.len()); </ins> struct_span_err!(self.tcx.sess, span, E0087, "too many type parameters provided:  expected at most {}, found {}", <del> count(type_defs.len()), count(types.len())) .span_label(span, &format!("too many type parameters")).emit(); </del> <ins> expected_text, actual_text) .span_label(span, &format!("expected {}", expected_text)) .emit(); </ins> // To prevent derived errors to accumulate due to extra // type parameters, we force instantiate_value_path to // use inference variables instead of the provided types. *segment = None; } else if !infer_types && types.len() < required_len { <del> let adjust = |len| if len > 1 { "parameters" } else { "parameter" }; let required_param_str = adjust(required_len); let actual_param_str = adjust(types.len()); </del> <ins> let expected_text = count_type_params(required_len); let actual_text = count_type_params(types.len()); </ins> struct_span_err!(self.tcx.sess, span, E0089, "too few type parameters provided:  <del> expected {} {}, found {} {}", count(required_len), required_param_str, count(types.len()), actual_param_str) .span_label(span, &format!("expected {} type {}", required_len, required_param_str)) </del> <ins> expected {}, found {}", expected_text, actual_text) .span_label(span, &format!("expected {}", expected_text)) </ins> .emit(); }

// option. This file may not be copied, modified, or distributed // except according to those terms. <del> fn foo<T>() {} </del> <ins> fn foo() {} fn bar<T>() {} </ins> fn main() { <del> foo::<f64, bool>(); //~ ERROR E0087 //~^ NOTE too many type parameters </del> <ins> foo::<f64>(); //~ ERROR expected at most 0 type parameters, found 1 type parameter [E0087] //~^ NOTE expected 0 type parameters bar::<f64, u64>(); //~ ERROR expected at most 1 type parameter, found 2 type parameters [E0087] //~^ NOTE expected 1 type parameter </ins> }

fn g<'a>() {} fn main() { <del> f::<'static>(); //~ ERROR E0088 //~^ unexpected lifetime parameter </del> <ins> f::<'static>(); //~^ ERROR expected at most 0 lifetime parameters, found 1 lifetime parameter [E0088] //~| NOTE expected 0 lifetime parameters </ins> <del> g::<'static, 'static>(); //~ ERROR E0088 //~^ unexpected lifetime parameters </del> <ins> g::<'static, 'static>(); //~^ ERROR expected at most 0 lifetime parameters, found 2 lifetime parameters [E0088] //~| NOTE expected 0 lifetime parameters </ins> }

fn foo<T, U>() {} fn main() { <del> foo::<f64>(); //~^ ERROR E0089 //~| NOTE expected 2 type parameters </del> <ins> foo::<f64>(); //~ ERROR expected 2 type parameters, found 1 type parameter [E0089] //~| NOTE expected 2 type parameters </ins> }

// except according to those terms. fn foo<'a: 'b, 'b: 'a>() {} fn main() { <del> foo::<'static>();//~ ERROR E0090 //~^ too few lifetime parameters </del> <ins> foo::<'static>(); //~ ERROR expected 2 lifetime parameters, found 1 lifetime parameter [E0090] //~^ NOTE expected 2 lifetime parameters </ins> }

fn main() { <String as IntoCow>::into_cow("foo".to_string()); <del> //~^ ERROR too few type parameters provided: expected 1 parameter </del> <ins> //~^ ERROR too few type parameters provided: expected 1 type parameter </ins> }