diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-10-06 16:29:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-06 16:29:44 +0200 |
| commit | 045fc18cde46103f44fae75f0ea65cf0ee0f83dd (patch) | |
| tree | 7720beac9ea6411c217340f91bfa4c51469aeb38 /src | |
| parent | e77e0200ae5589323b799f77d5b597d4bf5928d6 (diff) | |
| parent | fe0533638c058c0c159804ce91887304ca16a640 (diff) | |
| download | rust-045fc18cde46103f44fae75f0ea65cf0ee0f83dd.tar.gz rust-045fc18cde46103f44fae75f0ea65cf0ee0f83dd.zip | |
Rollup merge of #102718 - compiler-errors:opaque-bound-lint-ice, r=fee1-dead
Fix `opaque_hidden_inferred_bound` lint ICE Fixes #102705
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/lint/issue-102705.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/lint/issue-102705.rs b/src/test/ui/lint/issue-102705.rs new file mode 100644 index 00000000000..5bcc8950ada --- /dev/null +++ b/src/test/ui/lint/issue-102705.rs @@ -0,0 +1,22 @@ +// check-pass + +#![allow(opaque_hidden_inferred_bound)] +#![allow(dead_code)] + +trait Duh {} + +impl Duh for i32 {} + +trait Trait { + type Assoc: Duh; +} + +impl<R: Duh, F: FnMut() -> R> Trait for F { + type Assoc = R; +} + +fn foo() -> impl Trait<Assoc = impl Send> { + || 42 +} + +fn main() {} |
