continue when builtin bounds are registered
This commit is contained in:
parent
3ebdbac265
commit
a1945197c3
@ -1849,12 +1849,12 @@ pub fn partition_bounds<'a>(tcx: &ty::ctxt,
|
||||
&mut builtin_bounds) {
|
||||
let segments = &b.trait_ref.path.segments;
|
||||
let parameters = &segments[segments.len() - 1].parameters;
|
||||
if parameters.is_empty() {
|
||||
continue; // success
|
||||
if !parameters.is_empty() {
|
||||
span_err!(tcx.sess, b.trait_ref.path.span, E0316,
|
||||
"builtin bounds do not require arguments, {} given",
|
||||
parameters.lifetimes().len() + parameters.types().len());
|
||||
}
|
||||
span_err!(tcx.sess, b.trait_ref.path.span, E0316,
|
||||
"builtin bounds do not require arguments, {} given",
|
||||
parameters.types().len());
|
||||
continue; // success
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
|
@ -332,6 +332,7 @@ pub fn winsorize<T: Float + FromPrimitive>(samples: &mut [T], pct: T) {
|
||||
|
||||
/// Returns a HashMap with the number of occurrences of every element in the
|
||||
/// sequence that the iterator exposes.
|
||||
#[cfg(not(stage0))]
|
||||
pub fn freq_count<T, U>(iter: T) -> hash_map::HashMap<U, uint>
|
||||
where T: Iterator<Item=U>, U: Eq + Clone + Hash
|
||||
{
|
||||
|
@ -15,13 +15,13 @@ trait Trait: Copy<Send> {}
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
|
||||
struct MyStruct1<T: Copy<T>>;
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
//~^ ERROR builtin bounds do not require arguments, 1 given
|
||||
|
||||
struct MyStruct2<'a, T: Copy<'a>>;
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
|
||||
fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
|
||||
//~^ ERROR: builtin bounds do not require arguments, 1 given
|
||||
//~^ ERROR builtin bounds do not require arguments, 2 given
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user