2023-10-18 01:19:04 -05:00
|
|
|
// issue: #116877
|
2024-02-16 14:02:50 -06:00
|
|
|
//@ revisions: sized clone
|
|
|
|
//@[sized] check-pass
|
|
|
|
//@[clone] known-bug: #108498
|
|
|
|
//@[clone] failure-status: 101
|
|
|
|
//@[clone] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId("
|
|
|
|
//@[clone] normalize-stderr-test: "(?m)note: we would appreciate a bug report.*\n\n" -> ""
|
|
|
|
//@[clone] normalize-stderr-test: "(?m)note: rustc.*running on.*\n\n" -> ""
|
|
|
|
//@[clone] normalize-stderr-test: "(?m)note: compiler flags.*\n\n" -> ""
|
|
|
|
//@[clone] normalize-stderr-test: "(?m)note: delayed at.*$" -> ""
|
|
|
|
//@[clone] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> ""
|
|
|
|
//@[clone] normalize-stderr-test: "(?m)^ *at .*\n" -> ""
|
2023-10-18 01:19:04 -05:00
|
|
|
|
|
|
|
#[cfg(sized)] fn rpit() -> impl Sized {}
|
|
|
|
#[cfg(clone)] fn rpit() -> impl Clone {}
|
|
|
|
|
|
|
|
fn same_output<Out>(_: impl Fn() -> Out, _: impl Fn() -> Out) {}
|
|
|
|
|
|
|
|
pub fn foo() -> impl Sized {
|
|
|
|
same_output(rpit, foo);
|
|
|
|
same_output(foo, rpit);
|
|
|
|
rpit()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main () {}
|