diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2016-04-20 02:21:14 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2016-04-20 02:21:14 +0300 |
| commit | 4e1cf9a8ef481eccdc55387382e33c94d8e0366b (patch) | |
| tree | 7ecea3c7296df235e99adcfb70cfdc7b8e8eed3d /src/test | |
| parent | c2aaad4e2288647c5235754a5e1439a5124978fe (diff) | |
| download | rust-4e1cf9a8ef481eccdc55387382e33c94d8e0366b.tar.gz rust-4e1cf9a8ef481eccdc55387382e33c94d8e0366b.zip | |
Normalize types before using them in debuginfo.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/issue-33096.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-33096.rs b/src/test/run-pass/issue-33096.rs new file mode 100644 index 00000000000..c3cf008c825 --- /dev/null +++ b/src/test/run-pass/issue-33096.rs @@ -0,0 +1,27 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: -g + +use std::ops::Deref; + +trait Foo { + fn foo() {} +} + +impl Foo for u8 {} + +fn bar<T: Deref>() where T::Target: Foo { + <<T as Deref>::Target as Foo>::foo() +} + +fn main() { + bar::<&u8>(); +} |
