Skip to content

Commit 042a0bc

Browse files
committed
---
yaml --- r: 185777 b: refs/heads/auto c: a194519 h: refs/heads/master i: 185775: a63c0c4 v: v3
1 parent b4f779d commit 042a0bc

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 3ebdbac2651cd21f2efda8d3b381ed396d7bb725
13+
refs/heads/auto: a1945197c32d4e81b9fa30e61f3544a484b5491a
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc_typeck/astconv.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,12 +1849,12 @@ pub fn partition_bounds<'a>(tcx: &ty::ctxt,
18491849
&mut builtin_bounds) {
18501850
let segments = &b.trait_ref.path.segments;
18511851
let parameters = &segments[segments.len() - 1].parameters;
1852-
if parameters.is_empty() {
1853-
continue; // success
1852+
if !parameters.is_empty() {
1853+
span_err!(tcx.sess, b.trait_ref.path.span, E0316,
1854+
"builtin bounds do not require arguments, {} given",
1855+
parameters.lifetimes().len() + parameters.types().len());
18541856
}
1855-
span_err!(tcx.sess, b.trait_ref.path.span, E0316,
1856-
"builtin bounds do not require arguments, {} given",
1857-
parameters.types().len());
1857+
continue; // success
18581858
}
18591859
}
18601860
_ => {

branches/auto/src/libtest/stats.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ pub fn winsorize<T: Float + FromPrimitive>(samples: &mut [T], pct: T) {
332332

333333
/// Returns a HashMap with the number of occurrences of every element in the
334334
/// sequence that the iterator exposes.
335+
#[cfg(not(stage0))]
335336
pub fn freq_count<T, U>(iter: T) -> hash_map::HashMap<U, uint>
336337
where T: Iterator<Item=U>, U: Eq + Clone + Hash
337338
{

branches/auto/src/test/compile-fail/typeck-builtin-bound-type-parameters.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ trait Trait: Copy<Send> {}
1515
//~^ ERROR: builtin bounds do not require arguments, 1 given
1616

1717
struct MyStruct1<T: Copy<T>>;
18-
//~^ ERROR: builtin bounds do not require arguments, 1 given
18+
//~^ ERROR builtin bounds do not require arguments, 1 given
1919

2020
struct MyStruct2<'a, T: Copy<'a>>;
2121
//~^ ERROR: builtin bounds do not require arguments, 1 given
2222

2323
fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
24-
//~^ ERROR: builtin bounds do not require arguments, 1 given
24+
//~^ ERROR builtin bounds do not require arguments, 2 given
2525

2626
fn main() {
2727
}

0 commit comments

Comments
 (0)