summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs')
-rw-r--r--tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs
index 4f99236f4..06c119287 100644
--- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs
+++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs
@@ -1,16 +1,20 @@
// check-pass
-#![feature(impl_trait_in_assoc_type)]
+#![feature(impl_trait_in_assoc_type, type_alias_impl_trait)]
-trait Callable {
- type Output;
- fn call() -> Self::Output;
-}
+mod foo {
+ pub trait Callable {
+ type Output;
+ fn call() -> Self::Output;
+ }
-impl<'a> Callable for &'a () {
- type Output = impl Sized;
- fn call() -> Self::Output {}
+ pub type OutputHelper = impl Sized;
+ impl<'a> Callable for &'a () {
+ type Output = OutputHelper;
+ fn call() -> Self::Output {}
+ }
}
+use foo::*;
fn test<'a>() -> impl Sized {
<&'a () as Callable>::call()