Skip to content

Commit b80472d

Browse files
committed
fixed tests
1 parent cadf251 commit b80472d

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

src/test/compile-fail/impl-trait/where-allowed.rs

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
//! A simple test for testing many permutations of allowedness of
1212
//! impl Trait
13-
14-
#![feature(conservative_impl_trait, universal_impl_trait)]
15-
1613
use std::fmt::Debug;
1714

1815
// Allowed

src/test/ui/impl_trait_projections.rs

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
11-
#![feature(conservative_impl_trait, universal_impl_trait)]
12-
1310
use std::fmt::Debug;
1411
use std::option;
1512

src/test/ui/impl_trait_projections.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0667]: `impl Trait` is not allowed in path parameters
2-
--> $DIR/impl_trait_projections.rs:24:51
2+
--> $DIR/impl_trait_projections.rs:21:51
33
|
44
LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
55
| ^^^^^^^^^^^^^
66

77
error[E0667]: `impl Trait` is not allowed in path parameters
8-
--> $DIR/impl_trait_projections.rs:31:9
8+
--> $DIR/impl_trait_projections.rs:28:9
99
|
1010
LL | -> <impl Iterator as Iterator>::Item
1111
| ^^^^^^^^^^^^^
1212

1313
error[E0667]: `impl Trait` is not allowed in path parameters
14-
--> $DIR/impl_trait_projections.rs:38:27
14+
--> $DIR/impl_trait_projections.rs:35:27
1515
|
1616
LL | -> <::std::ops::Range<impl Debug> as Iterator>::Item
1717
| ^^^^^^^^^^
1818

1919
error[E0667]: `impl Trait` is not allowed in path parameters
20-
--> $DIR/impl_trait_projections.rs:45:29
20+
--> $DIR/impl_trait_projections.rs:42:29
2121
|
2222
LL | -> <dyn Iterator<Item = impl Debug> as Iterator>::Item
2323
| ^^^^^^^^^^
2424

2525
error[E0223]: ambiguous associated type
26-
--> $DIR/impl_trait_projections.rs:24:50
26+
--> $DIR/impl_trait_projections.rs:21:50
2727
|
2828
LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
2929
| ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type

src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
warning: not reporting region error due to nll
2-
--> $DIR/dyn-trait.rs:33:16
2+
--> $DIR/dyn-trait.rs:32:16
33
|
44
LL | static_val(x); //~ ERROR cannot infer
55
| ^
66

77
error: free region `'a` does not outlive free region `'static`
8-
--> $DIR/dyn-trait.rs:33:5
8+
--> $DIR/dyn-trait.rs:32:5
99
|
1010
LL | static_val(x); //~ ERROR cannot infer
1111
| ^^^^^^^^^^^^^

src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
warning: not reporting region error due to nll
2-
--> $DIR/dyn-trait-underscore.rs:20:14
2+
--> $DIR/dyn-trait-underscore.rs:18:14
33
|
44
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
55
| ^^^^^
66

77
warning: not reporting region error due to nll
8-
--> $DIR/dyn-trait-underscore.rs:20:20
8+
--> $DIR/dyn-trait-underscore.rs:18:20
99
|
1010
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
1111
| ^^^^
1212

1313
warning: not reporting region error due to nll
14-
--> $DIR/dyn-trait-underscore.rs:20:5
14+
--> $DIR/dyn-trait-underscore.rs:18:5
1515
|
1616
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
1717
| ^^^^^^^^
1818

1919
warning: not reporting region error due to nll
20-
--> $DIR/dyn-trait-underscore.rs:20:5
20+
--> $DIR/dyn-trait-underscore.rs:18:5
2121
|
2222
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
2323
| ^^^^^^^^^^^^^^^^^^^^^^
2424

2525
error: free region `` does not outlive free region `'static`
26-
--> $DIR/dyn-trait-underscore.rs:18:52
26+
--> $DIR/dyn-trait-underscore.rs:16:52
2727
|
2828
LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
2929
| ____________________________________________________^

0 commit comments

Comments
 (0)