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 new file mode 100644 index 000000000000..97760cbf8fb5 --- /dev/null +++ b/src/test/rustdoc-ui/error-in-impl-trait/const-generics.rs @@ -0,0 +1,24 @@ +// check-pass +// edition:2018 +#![feature(min_const_generics)] +trait ValidTrait {} + +/// This has docs +pub fn extern_fn() -> impl Iterator { + loop {} +} + +pub trait Trait {} +impl Trait<1> for u8 {} +impl Trait<2> for u8 {} +impl Trait for [u8; N] {} + +/// This also has docs +pub fn test() -> impl Trait where u8: Trait { + loop {} +} + +/// Document all the functions +pub async fn a_sink(v: [u8; N]) -> impl Trait { + loop {} +}