diff options
author | John Hodge <tpg@ucc.asn.au> | 2018-02-25 10:52:11 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-02-25 11:12:42 +0800 |
commit | 8e002015416954fa5e9444c9d81ec7f4b291562f (patch) | |
tree | e332b1efa4618ac06aa306ed3e4d4f33235a1507 /samples/test | |
parent | cec5b32e9918c97b0b044ff30b86892d974c82f4 (diff) | |
download | mrust-8e002015416954fa5e9444c9d81ec7f4b291562f.tar.gz |
HIR Typecheck - Fix case where inferrence stalls when there's a `T = <T>::Assoc bound` and unsizing, should fix #62
Diffstat (limited to 'samples/test')
-rw-r--r-- | samples/test/issue-mrustc-62.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/samples/test/issue-mrustc-62.rs b/samples/test/issue-mrustc-62.rs new file mode 100644 index 00000000..c319ad83 --- /dev/null +++ b/samples/test/issue-mrustc-62.rs @@ -0,0 +1,17 @@ + +struct Struct; + +trait Trait { + type Assoc; +} + +impl Trait for Struct { + type Assoc = Struct; +} + +fn f<S>(_: &S) where S: Trait<Assoc = S> {} + +fn main() { + f(&Struct); +} + |