File: equality-in-canonical-query.rs

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (25 lines) | stat: -rw-r--r-- 876 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// issue: #116877
//@ 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" -> ""

#[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 () {}