Promote crashes tests to ui.
This commit is contained in:
parent
b6e1214ac0
commit
d693e19268
@ -1,8 +0,0 @@
|
||||
//@ known-bug: rust-lang/rust#125185
|
||||
#![feature(return_position_impl_trait_in_trait, return_type_notation)]
|
||||
|
||||
trait IntFactory {
|
||||
fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
|
||||
}
|
||||
|
||||
pub fn main() {}
|
@ -1,4 +1,5 @@
|
||||
//@ known-bug: rust-lang/rust#126850
|
||||
//@ check-pass
|
||||
|
||||
fn bug<T>() -> impl Iterator<
|
||||
Item = [(); {
|
||||
|found: &String| Some(false);
|
9
tests/ui/impl-trait/in-trait/return-type-notation.rs
Normal file
9
tests/ui/impl-trait/in-trait/return-type-notation.rs
Normal file
@ -0,0 +1,9 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(return_type_notation)]
|
||||
|
||||
trait IntFactory {
|
||||
fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
|
||||
//~^ ERROR cycle detected when resolving lifetimes for `IntFactory::stream`
|
||||
}
|
||||
|
||||
pub fn main() {}
|
27
tests/ui/impl-trait/in-trait/return-type-notation.stderr
Normal file
27
tests/ui/impl-trait/in-trait/return-type-notation.stderr
Normal file
@ -0,0 +1,27 @@
|
||||
error[E0391]: cycle detected when resolving lifetimes for `IntFactory::stream`
|
||||
--> $DIR/return-type-notation.rs:5:5
|
||||
|
|
||||
LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: ...which requires computing function signature of `IntFactory::stream`...
|
||||
--> $DIR/return-type-notation.rs:5:5
|
||||
|
|
||||
LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: ...which requires looking up late bound vars inside `IntFactory::stream`...
|
||||
--> $DIR/return-type-notation.rs:5:5
|
||||
|
|
||||
LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which again requires resolving lifetimes for `IntFactory::stream`, completing the cycle
|
||||
note: cycle used when listing captured lifetimes for opaque `IntFactory::stream::{opaque#0}`
|
||||
--> $DIR/return-type-notation.rs:5:25
|
||||
|
|
||||
LL | fn stream(&self) -> impl IntFactory<stream(..): IntFactory<stream(..): Send> + Send>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0391`.
|
Loading…
Reference in New Issue
Block a user