diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2017-03-30 12:14:04 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2017-03-30 12:14:04 +1300 |
| commit | e3acebff66c89e2a50c8bfcd08fbe221265b30b0 (patch) | |
| tree | f0230257048195446f20ce486ef25180b5d2aab2 /src/test/run-make/save-analysis | |
| parent | e1cec5d4bf626f151a779323e16d62fe60117086 (diff) | |
| download | rust-e3acebff66c89e2a50c8bfcd08fbe221265b30b0.tar.gz rust-e3acebff66c89e2a50c8bfcd08fbe221265b30b0.zip | |
save-analysis: track associated types
Diffstat (limited to 'src/test/run-make/save-analysis')
| -rw-r--r-- | src/test/run-make/save-analysis/foo.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make/save-analysis/foo.rs index e8b69729af6..3fe1479f5f2 100644 --- a/src/test/run-make/save-analysis/foo.rs +++ b/src/test/run-make/save-analysis/foo.rs @@ -11,6 +11,7 @@ #![ crate_name = "test" ] #![feature(box_syntax)] #![feature(rustc_private)] +#![feature(associated_type_defaults)] extern crate graphviz; // A simple rust project @@ -441,3 +442,19 @@ fn test_format_args() { print!("{0} + {} = {}", x, y); print!("x is {}, y is {1}, name is {n}", x, y, n = name); } + +struct FrameBuffer; + +struct SilenceGenerator; + +impl Iterator for SilenceGenerator { + type Item = FrameBuffer; + + fn next(&mut self) -> Option<Self::Item> { + panic!(); + } +} + +trait Foo { + type Bar = FrameBuffer; +} |
