diff options
Diffstat (limited to 'tests/ui/associated-inherent-types/issue-109071.rs')
-rw-r--r-- | tests/ui/associated-inherent-types/issue-109071.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/associated-inherent-types/issue-109071.rs b/tests/ui/associated-inherent-types/issue-109071.rs new file mode 100644 index 000000000..951c708e3 --- /dev/null +++ b/tests/ui/associated-inherent-types/issue-109071.rs @@ -0,0 +1,19 @@ +// revisions: with_gate no_gate +#![cfg_attr(with_gate, feature(inherent_associated_types))] +#![cfg_attr(with_gate, allow(incomplete_features))] + +struct Windows<T> {} + +impl<T> Windows { //~ ERROR: missing generics for struct `Windows` + type Item = &[T]; //~ ERROR: `&` without an explicit lifetime name cannot be used here + //[no_gate]~^ ERROR: inherent associated types are unstable + + fn next() -> Option<Self::Item> {} +} + +impl<T> Windows<T> { + fn T() -> Option<Self::Item> {} + //[no_gate]~^ ERROR: ambiguous associated type +} + +fn main() {} |