fixed tests
This commit is contained in:
parent
cadf251b78
commit
b80472d84c
5 changed files with 12 additions and 18 deletions
|
|
@ -10,9 +10,6 @@
|
|||
|
||||
//! A simple test for testing many permutations of allowedness of
|
||||
//! impl Trait
|
||||
|
||||
#![feature(conservative_impl_trait, universal_impl_trait)]
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
||||
// Allowed
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@
|
|||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(conservative_impl_trait, universal_impl_trait)]
|
||||
|
||||
use std::fmt::Debug;
|
||||
use std::option;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
error[E0667]: `impl Trait` is not allowed in path parameters
|
||||
--> $DIR/impl_trait_projections.rs:24:51
|
||||
--> $DIR/impl_trait_projections.rs:21:51
|
||||
|
|
||||
LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0667]: `impl Trait` is not allowed in path parameters
|
||||
--> $DIR/impl_trait_projections.rs:31:9
|
||||
--> $DIR/impl_trait_projections.rs:28:9
|
||||
|
|
||||
LL | -> <impl Iterator as Iterator>::Item
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0667]: `impl Trait` is not allowed in path parameters
|
||||
--> $DIR/impl_trait_projections.rs:38:27
|
||||
--> $DIR/impl_trait_projections.rs:35:27
|
||||
|
|
||||
LL | -> <::std::ops::Range<impl Debug> as Iterator>::Item
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error[E0667]: `impl Trait` is not allowed in path parameters
|
||||
--> $DIR/impl_trait_projections.rs:45:29
|
||||
--> $DIR/impl_trait_projections.rs:42:29
|
||||
|
|
||||
LL | -> <dyn Iterator<Item = impl Debug> as Iterator>::Item
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/impl_trait_projections.rs:24:50
|
||||
--> $DIR/impl_trait_projections.rs:21:50
|
||||
|
|
||||
LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
warning: not reporting region error due to nll
|
||||
--> $DIR/dyn-trait.rs:33:16
|
||||
--> $DIR/dyn-trait.rs:32:16
|
||||
|
|
||||
LL | static_val(x); //~ ERROR cannot infer
|
||||
| ^
|
||||
|
||||
error: free region `'a` does not outlive free region `'static`
|
||||
--> $DIR/dyn-trait.rs:33:5
|
||||
--> $DIR/dyn-trait.rs:32:5
|
||||
|
|
||||
LL | static_val(x); //~ ERROR cannot infer
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
warning: not reporting region error due to nll
|
||||
--> $DIR/dyn-trait-underscore.rs:20:14
|
||||
--> $DIR/dyn-trait-underscore.rs:18:14
|
||||
|
|
||||
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
|
||||
| ^^^^^
|
||||
|
||||
warning: not reporting region error due to nll
|
||||
--> $DIR/dyn-trait-underscore.rs:20:20
|
||||
--> $DIR/dyn-trait-underscore.rs:18:20
|
||||
|
|
||||
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
|
||||
| ^^^^
|
||||
|
||||
warning: not reporting region error due to nll
|
||||
--> $DIR/dyn-trait-underscore.rs:20:5
|
||||
--> $DIR/dyn-trait-underscore.rs:18:5
|
||||
|
|
||||
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
|
||||
| ^^^^^^^^
|
||||
|
||||
warning: not reporting region error due to nll
|
||||
--> $DIR/dyn-trait-underscore.rs:20:5
|
||||
--> $DIR/dyn-trait-underscore.rs:18:5
|
||||
|
|
||||
LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: free region `` does not outlive free region `'static`
|
||||
--> $DIR/dyn-trait-underscore.rs:18:52
|
||||
--> $DIR/dyn-trait-underscore.rs:16:52
|
||||
|
|
||||
LL | fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
|
||||
| ____________________________________________________^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue