Skip to content

Commit 61d7a4b

Browse files
authored
Rollup merge of #114629 - Enselic:uncomment-gat-code, r=compiler-errors
tests: Uncomment now valid GAT code behind FIXME The code fails to parse with `nightly-2021-02-05`: $ cargo +nightly-2021-02-05 build error: generic associated types in trait paths are currently not implemented --> src/main.rs:9:42 | 9 | fn _bar<T: for<'a> StreamingIterator<Item<'a> = &'a [i32]>>(_iter: T) { /* ... */ | ^^^^ but parses with `nightly-2021-02-06`: $ cargo +nightly-2021-02-06 build warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes warning: 1 warning emitted because it was (with high probability) fixed by #79554 which was merged within that nightly range. This PR is part of #44366 which is E-help-wanted.
2 parents acf3791 + ff574b7 commit 61d7a4b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/ui/generic-associated-types/streaming_iterator.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ struct Foo<T: StreamingIterator + 'static> {
1515

1616
// Users can bound parameters by the type constructed by that trait's associated type constructor
1717
// of a trait using HRTB. Both type equality bounds and trait bounds of this kind are valid:
18-
//FIXME(#44265): This next line should parse and be valid
19-
//fn foo<T: for<'a> StreamingIterator<Item<'a>=&'a [i32]>>(_iter: T) { /* ... */ }
18+
fn _bar<T: for<'a> StreamingIterator<Item<'a>=&'a [i32]>>(_iter: T) { /* ... */ }
2019
fn _foo<T>(_iter: T) where T: StreamingIterator, for<'a> T::Item<'a>: Display { /* ... */ }
2120

2221
// Full example of enumerate iterator

0 commit comments

Comments
 (0)