diff options
| author | Igor Matuszewski <Xanewok@gmail.com> | 2019-09-15 00:42:18 +0200 |
|---|---|---|
| committer | Igor Matuszewski <Xanewok@gmail.com> | 2019-09-15 00:42:33 +0200 |
| commit | a946b8d6e1ff39f22e3f9f1c46ba81898901d907 (patch) | |
| tree | 5bb936a22273557ae59a19cc39a6e9953dcd9d69 /src/test/ui/save-analysis | |
| parent | 30e39e871fa9064f310d05a295a6c197d9b0da78 (diff) | |
| download | rust-a946b8d6e1ff39f22e3f9f1c46ba81898901d907.tar.gz rust-a946b8d6e1ff39f22e3f9f1c46ba81898901d907.zip | |
save-analysis: Process bounds in impl trait only in argument position
Diffstat (limited to 'src/test/ui/save-analysis')
| -rw-r--r-- | src/test/ui/save-analysis/issue-63663.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/ui/save-analysis/issue-63663.rs b/src/test/ui/save-analysis/issue-63663.rs index ccbe13f1a1b..92e85884f66 100644 --- a/src/test/ui/save-analysis/issue-63663.rs +++ b/src/test/ui/save-analysis/issue-63663.rs @@ -1,15 +1,20 @@ // check-pass // compile-flags: -Zsave-analysis -// Check that this doesn't ICE when processing associated const in formal -// argument and return type of functions defined inside function/method scope. - pub trait Trait { type Assoc; } pub struct A; +trait Generic<T> {} +impl<T> Generic<T> for () {} + +// Don't ICE when resolving type paths in return type `impl Trait` +fn assoc_in_opaque_type_bounds<U: Trait>() -> impl Generic<U::Assoc> {} + +// Check that this doesn't ICE when processing associated const in formal +// argument and return type of functions defined inside function/method scope. pub fn func() { fn _inner1<U: Trait>(_: U::Assoc) {} fn _inner2<U: Trait>() -> U::Assoc { unimplemented!() } |
