From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/mir-opt/inline/caller_with_trivial_bound.rs | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/mir-opt/inline/caller_with_trivial_bound.rs (limited to 'tests/mir-opt/inline/caller_with_trivial_bound.rs') diff --git a/tests/mir-opt/inline/caller_with_trivial_bound.rs b/tests/mir-opt/inline/caller_with_trivial_bound.rs new file mode 100644 index 000000000..8545db894 --- /dev/null +++ b/tests/mir-opt/inline/caller_with_trivial_bound.rs @@ -0,0 +1,26 @@ +// ignore-wasm32 compiled with panic=abort by default +// needs-unwind + +#![crate_type = "lib"] +pub trait Factory { + type Item; +} + +pub struct IntFactory; + +impl Factory for IntFactory { + type Item = usize; +} + +// EMIT_MIR caller_with_trivial_bound.foo.Inline.diff +pub fn foo() +where + IntFactory: Factory, +{ + let mut x: >::Item = bar::(); +} + +#[inline(always)] +pub fn bar() -> >::Item { + 0usize +} -- cgit v1.2.3