diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2023-02-17 14:32:08 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-02-17 14:44:58 +0000 |
| commit | eebd31c1875677bf1f4d7c43801f6cedd57c0ea2 (patch) | |
| tree | 33cd4b7749ab8fd5ac0680afd0b236d47b5b9a2f /tests | |
| parent | b5c8c329a7b4f6a12ae72ae41cb834989228221e (diff) | |
| download | rust-eebd31c1875677bf1f4d7c43801f6cedd57c0ea2.tar.gz rust-eebd31c1875677bf1f4d7c43801f6cedd57c0ea2.zip | |
Don't eagerly convert principal to string
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/lint/issue-108155.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/lint/issue-108155.rs b/tests/ui/lint/issue-108155.rs new file mode 100644 index 00000000000..4ae0cbd92ff --- /dev/null +++ b/tests/ui/lint/issue-108155.rs @@ -0,0 +1,15 @@ +// check-pass +// check that `deref_into_dyn_supertrait` doesn't cause ICE by eagerly converting +// a cancelled lint + +#![allow(deref_into_dyn_supertrait)] + +trait Trait {} +impl std::ops::Deref for dyn Trait + Send + Sync { + type Target = dyn Trait; + fn deref(&self) -> &Self::Target { + self + } +} + +fn main() {} |
