Skip to content

Commit c1a8273

Browse files
committed
---
yaml --- r: 227314 b: refs/heads/auto c: dee8b54 h: refs/heads/master v: v3
1 parent 86f006c commit c1a8273

25 files changed

+65
-35
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: f4aaedb51e47022cdd6c8857976e209e9d135e3f
11+
refs/heads/auto: dee8b54b71e6cb8145fc00b64f35c736a70c6bcf
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/test/compile-fail/closure-bounds-static-cant-capture-borrowed.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ fn bar<F>(blk: F) where F: FnOnce() + 'static {
1212
}
1313

1414
fn foo(x: &()) {
15-
bar(|| { //~ ERROR cannot infer an appropriate lifetime
15+
bar(|| {
16+
//~^ ERROR cannot infer
17+
//~| ERROR does not fulfill
1618
let _ = x;
1719
})
1820
}

branches/auto/src/test/compile-fail/issue-18389.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
use std::any::Any;
1212
use std::any::TypeId;
1313

14-
pub trait Pt {}
15-
pub trait Rt {}
16-
17-
trait Private<P: Pt, R: Rt> {
14+
trait Private<P, R> {
1815
fn call(&self, p: P, r: R);
1916
}
2017
pub trait Public: Private< //~ ERROR private trait in exported type parameter bound

branches/auto/src/test/compile-fail/issue-20005.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ trait To {
1919
self //~ error: the trait `core::marker::Sized` is not implemented
2020
) -> <Dst as From<Self>>::Result where Dst: From<Self> {
2121
From::from( //~ error: the trait `core::marker::Sized` is not implemented
22+
//~^ ERROR E0277
2223
self
2324
)
2425
}

branches/auto/src/test/compile-fail/issue-23041.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ fn main()
1313
{
1414
fn bar(x:i32) ->i32 { 3*x };
1515
let b:Box<Any> = Box::new(bar as fn(_)->_);
16-
b.downcast_ref::<fn(_)->_>();
17-
//~^ ERROR cannot determine a type for this expression: unconstrained type
16+
b.downcast_ref::<fn(_)->_>(); //~ ERROR E0101
1817
}

branches/auto/src/test/compile-fail/issue-24013.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ fn main() {
1313
let a = 1;
1414
let b = 2;
1515
unsafe {swap::<&mut _>(transmute(&a), transmute(&b))};
16-
//~^ ERROR cannot determine a type for this expression: unconstrained type
16+
//~^ ERROR unable to infer enough type information about `_`
1717
}

branches/auto/src/test/compile-fail/issue-3907-2.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ struct S {
1717
name: isize
1818
}
1919

20-
fn bar(_x: Foo) {} //~ ERROR the trait `core::marker::Sized` is not implemented
20+
fn bar(_x: Foo) {}
21+
//~^ ERROR E0277
2122

2223
fn main() {}

branches/auto/src/test/compile-fail/kindck-inherited-copy-bound.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ fn a() {
3131
fn b() {
3232
let x: Box<_> = box 3;
3333
let y = &x;
34-
let z = &x as &Foo; //~ ERROR E0038
34+
let z = &x as &Foo;
35+
//~^ ERROR E0038
36+
//~| ERROR E0038
3537
}
3638

3739
fn main() { }

branches/auto/src/test/compile-fail/regions-assoc-type-in-supertrait-outlives-container.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn with_assoc<'a,'b>() {
4747
// outlive 'a. In this case, that means TheType<'b>::TheAssocType,
4848
// which is &'b (), must outlive 'a.
4949

50-
let _: &'a WithAssoc<TheType<'b>> = loop { }; //~ ERROR cannot infer
50+
let _: &'a WithAssoc<TheType<'b>> = loop { }; //~ ERROR reference has a longer lifetime
5151
}
5252

5353
fn main() {

branches/auto/src/test/compile-fail/regions-close-object-into-object-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#![allow(warnings)]
1313

1414
trait A<T> { }
15-
struct B<'a, T>(&'a (A<T>+'a));
15+
struct B<'a, T:'a>(&'a (A<T>+'a));
1616

1717
trait X { }
1818

branches/auto/src/test/compile-fail/regions-close-object-into-object-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![feature(box_syntax)]
1212

1313
trait A<T> { }
14-
struct B<'a, T>(&'a (A<T>+'a));
14+
struct B<'a, T:'a>(&'a (A<T>+'a));
1515

1616
trait X { }
1717
impl<'a, T> X for B<'a, T> {}

branches/auto/src/test/compile-fail/regions-close-object-into-object-3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#![allow(warnings)]
1313

1414
trait A<T> { }
15-
struct B<'a, T>(&'a (A<T>+'a));
15+
struct B<'a, T:'a>(&'a (A<T>+'a));
1616

1717
trait X { }
1818
impl<'a, T> X for B<'a, T> {}

branches/auto/src/test/compile-fail/regions-close-object-into-object-4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![feature(box_syntax)]
1212

1313
trait A<T> { }
14-
struct B<'a, T>(&'a (A<T>+'a));
14+
struct B<'a, T:'a>(&'a (A<T>+'a));
1515

1616
trait X { }
1717
impl<'a, T> X for B<'a, T> {}

branches/auto/src/test/compile-fail/regions-close-object-into-object-5.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,22 @@ trait A<T>
1616
fn get(&self) -> T { panic!() }
1717
}
1818

19-
struct B<'a, T>(&'a (A<T>+'a));
19+
struct B<'a, T:'a>(&'a (A<T>+'a));
2020

2121
trait X { fn foo(&self) {} }
2222

2323
impl<'a, T> X for B<'a, T> {}
2424

2525
fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
26-
box B(&*v) as Box<X> //~ ERROR the parameter type `T` may not live long enough
26+
// oh dear!
27+
box B(&*v) as Box<X>
2728
//~^ ERROR the parameter type `T` may not live long enough
29+
//~| WARNING the parameter type `T` may not live long enough
30+
//~| WARNING the parameter type `T` may not live long enough
31+
//~| ERROR the parameter type `T` may not live long enough
32+
//~| WARNING the parameter type `T` may not live long enough
33+
//~| ERROR the parameter type `T` may not live long enough
34+
//~| ERROR the parameter type `T` may not live long enough
2835
}
2936

3037
fn main() {}

branches/auto/src/test/compile-fail/regions-enum-not-wf.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ enum RefOk<'a, T:'a> {
2525
RefOkVariant1(&'a T)
2626
}
2727

28-
enum RefIndirect<'a, T> { //~ ERROR the parameter type `T` may not live long enough
28+
enum RefIndirect<'a, T> {
29+
//~^ ERROR the parameter type `T` may not live long enough
2930
RefIndirectVariant1(isize, RefOk<'a,T>)
3031
}
3132

32-
enum RefDouble<'a, 'b, T> { //~ ERROR reference has a longer lifetime than the data
33+
enum RefDouble<'a, 'b, T> {
34+
//~^ ERROR reference has a longer lifetime than the data
3335
RefDoubleVariant1(&'a &'b T)
3436
}
3537

branches/auto/src/test/compile-fail/regions-outlives-projection-container-wc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ fn with_assoc<'a,'b>() {
4141
// outlive 'a. In this case, that means TheType<'b>::TheAssocType,
4242
// which is &'b (), must outlive 'a.
4343

44-
let _: &'a WithAssoc<TheType<'b>> = loop { }; //~ ERROR cannot infer
44+
let _: &'a WithAssoc<TheType<'b>> = loop { };
45+
//~^ ERROR reference has a longer lifetime
4546
}
4647

4748
fn main() {

branches/auto/src/test/compile-fail/regions-outlives-projection-container.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn with_assoc<'a,'b>() {
4545
// outlive 'a. In this case, that means TheType<'b>::TheAssocType,
4646
// which is &'b (), must outlive 'a.
4747

48-
let _: &'a WithAssoc<TheType<'b>> = loop { }; //~ ERROR cannot infer
48+
let _: &'a WithAssoc<TheType<'b>> = loop { }; //~ ERROR reference has a longer lifetime
4949
}
5050

5151
fn with_assoc1<'a,'b>() where 'b : 'a {

branches/auto/src/test/compile-fail/regions-struct-not-wf.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,22 @@
1212

1313
#![allow(dead_code)]
1414

15-
struct Ref<'a, T> { //~ ERROR the parameter type `T` may not live long enough
15+
struct Ref<'a, T> {
16+
//~^ ERROR the parameter type `T` may not live long enough
1617
field: &'a T
1718
}
1819

1920
struct RefOk<'a, T:'a> {
2021
field: &'a T
2122
}
2223

23-
struct RefIndirect<'a, T> { //~ ERROR the parameter type `T` may not live long enough
24+
struct RefIndirect<'a, T> {
25+
//~^ ERROR the parameter type `T` may not live long enough
2426
field: RefOk<'a, T>
2527
}
2628

27-
struct DoubleRef<'a, 'b, T> { //~ ERROR reference has a longer lifetime than the data it references
29+
struct DoubleRef<'a, 'b, T> {
30+
//~^ ERROR reference has a longer lifetime than the data it references
2831
field: &'a &'b T
2932
}
3033

branches/auto/src/test/compile-fail/trait-object-safety.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ impl Tr for St {
2222
}
2323

2424
fn main() {
25-
let _: &Tr = &St; //~ ERROR cannot convert to a trait object because trait `Tr` is not
25+
let _: &Tr = &St; //~ ERROR E0038
26+
//~^ ERROR E0038
2627
}

branches/auto/src/test/compile-fail/trait-test-2.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ impl bar for u32 { fn dup(&self) -> u32 { *self } fn blah<X>(&self) {} }
1717
fn main() {
1818
10.dup::<i32>(); //~ ERROR does not take type parameters
1919
10.blah::<i32, i32>(); //~ ERROR incorrect number of type parameters
20-
(box 10 as Box<bar>).dup(); //~ ERROR cannot convert to a trait object
21-
//~^ ERROR the trait `bar` is not implemented for the type `bar`
20+
(box 10 as Box<bar>).dup();
21+
//~^ ERROR E0038
22+
//~| ERROR E0038
23+
//~| ERROR E0277
2224
}

branches/auto/src/test/compile-fail/traits-negative-impls.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,23 @@ fn dummy() {
3232

3333
Outer(TestType);
3434
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy::TestType`
35+
//~| ERROR the trait `core::marker::Send` is not implemented for the type `dummy::TestType`
36+
}
37+
38+
fn dummy1b() {
39+
struct TestType;
40+
impl !Send for TestType {}
3541

3642
is_send(TestType);
37-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy::TestType`
43+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy1b::TestType`
44+
}
45+
46+
fn dummy1c() {
47+
struct TestType;
48+
impl !Send for TestType {}
3849

3950
is_send((8, TestType));
40-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy::TestType`
51+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy1c::TestType`
4152
}
4253

4354
fn dummy2() {

branches/auto/src/test/compile-fail/type-parameter-defaults-referencing-Self-ppaux.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ impl MyAdd for i32 {
2222
fn main() {
2323
let x: i32 = 5;
2424
let y = x as MyAdd<i32>;
25-
//~^ ERROR as `MyAdd<i32>`
25+
//~^ ERROR E0038
26+
//~| ERROR cast to unsized type: `i32` as `MyAdd<i32>`
2627
}

branches/auto/src/test/compile-fail/variance-regions-direct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct Test4<'a, 'b:'a> { //~ ERROR regions=[[-, o];[];[]]
4242
// contravariant context:
4343

4444
#[rustc_variance]
45-
struct Test5<'a, 'b> { //~ ERROR regions=[[+, o];[];[]]
45+
struct Test5<'a, 'b:'a> { //~ ERROR regions=[[+, o];[];[]]
4646
x: extern "Rust" fn(&'a mut &'b isize),
4747
}
4848

@@ -52,7 +52,7 @@ struct Test5<'a, 'b> { //~ ERROR regions=[[+, o];[];[]]
5252
// argument list occurs in an invariant context.
5353

5454
#[rustc_variance]
55-
struct Test6<'a, 'b> { //~ ERROR regions=[[-, o];[];[]]
55+
struct Test6<'a, 'b:'a> { //~ ERROR regions=[[-, o];[];[]]
5656
x: &'a mut extern "Rust" fn(&'b isize),
5757
}
5858

branches/auto/src/test/run-pass/issue-14254.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// pretty-expanded FIXME #23616
1212

13-
trait Foo {
13+
trait Foo: Sized {
1414
fn bar(&self);
1515
fn baz(&self) { }
1616
fn bah(_: Option<Self>) { }

branches/auto/src/test/run-pass/issue-5708.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub trait MyTrait<T> {
5252
fn dummy(&self, t: T) -> T { panic!() }
5353
}
5454

55-
pub struct MyContainer<'a, T> {
55+
pub struct MyContainer<'a, T:'a> {
5656
foos: Vec<&'a (MyTrait<T>+'a)> ,
5757
}
5858

0 commit comments

Comments
 (0)