diff options
Diffstat (limited to 'src/test/rustdoc-ui/error-in-impl-trait')
10 files changed, 0 insertions, 109 deletions
diff --git a/src/test/rustdoc-ui/error-in-impl-trait/README.md b/src/test/rustdoc-ui/error-in-impl-trait/README.md deleted file mode 100644 index 1176a4a8c..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Each of these needs to be in a separate file, -because the `delay_span_bug` ICE in rustdoc won't be triggerred -if even a single other error was emitted. - -However, conceptually they are all testing basically the same thing. -See https://github.com/rust-lang/rust/pull/73566#issuecomment-653689128 -for more details. diff --git a/src/test/rustdoc-ui/error-in-impl-trait/async.rs b/src/test/rustdoc-ui/error-in-impl-trait/async.rs deleted file mode 100644 index cda53bff0..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/async.rs +++ /dev/null @@ -1,7 +0,0 @@ -// edition:2018 -// check-pass - -/// Should compile fine -pub async fn a() -> u32 { - error::_in::async_fn() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/closure.rs b/src/test/rustdoc-ui/error-in-impl-trait/closure.rs deleted file mode 100644 index f1fd85bb2..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/closure.rs +++ /dev/null @@ -1,5 +0,0 @@ -// check-pass -// manually desugared version of an `async fn` (but with a closure instead of a generator) -pub fn a() -> impl Fn() -> u32 { - || content::doesnt::matter() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs b/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs deleted file mode 100644 index ed62f0208..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs +++ /dev/null @@ -1,23 +0,0 @@ -// check-pass -// edition:2018 -trait ValidTrait {} - -/// This has docs -pub fn extern_fn<const N: usize>() -> impl Iterator<Item = [u8; N]> { - loop {} -} - -pub trait Trait<const N: usize> {} -impl Trait<1> for u8 {} -impl Trait<2> for u8 {} -impl<const N: usize> Trait<N> for [u8; N] {} - -/// This also has docs -pub fn test<const N: usize>() -> impl Trait<N> where u8: Trait<N> { - loop {} -} - -/// Document all the functions -pub async fn a_sink<const N: usize>(v: [u8; N]) -> impl Trait<N> { - loop {} -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/generic-argument.rs b/src/test/rustdoc-ui/error-in-impl-trait/generic-argument.rs deleted file mode 100644 index dcec379d4..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/generic-argument.rs +++ /dev/null @@ -1,7 +0,0 @@ -// check-pass -trait ValidTrait {} - -/// This has docs -pub fn f() -> impl ValidTrait { - Vec::<DoesNotExist>::new() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs b/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs deleted file mode 100644 index b935b0832..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword-closure.rs +++ /dev/null @@ -1,6 +0,0 @@ -// check-pass -pub trait ValidTrait {} -/// This returns impl trait -pub fn g() -> impl ValidTrait { - (|| error::_in::impl_trait::alias::nested::closure())() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword.rs b/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword.rs deleted file mode 100644 index 701126f87..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/impl-keyword.rs +++ /dev/null @@ -1,6 +0,0 @@ -// check-pass -pub trait ValidTrait {} -/// This returns impl trait -pub fn g() -> impl ValidTrait { - error::_in::impl_trait() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs b/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs deleted file mode 100644 index 248575d35..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs +++ /dev/null @@ -1,28 +0,0 @@ -// edition:2018 -// check-pass - -mod windows { - pub trait WinFoo { - fn foo(&self) {} - } - - impl WinFoo for () {} -} - -#[cfg(any(windows, doc))] -use windows::*; - -mod unix { - pub trait UnixFoo { - fn foo(&self) {} - } - - impl UnixFoo for () {} -} - -#[cfg(any(unix, doc))] -use unix::*; - -async fn bar() { - ().foo() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs deleted file mode 100644 index 31dd786cb..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass -#![feature(type_alias_impl_trait)] - -pub trait ValidTrait {} -type ImplTrait = impl ValidTrait; - -/// This returns impl trait, but using a type alias -pub fn h() -> ImplTrait { - (|| error::_in::impl_trait::alias::nested::closure())() -} diff --git a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs b/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs deleted file mode 100644 index c18a024af..000000000 --- a/src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass -#![feature(type_alias_impl_trait)] - -pub trait ValidTrait {} -type ImplTrait = impl ValidTrait; - -/// This returns impl trait, but using a type alias -pub fn h() -> ImplTrait { - error::_in::impl_trait::alias() -} |