]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/trivial-bounds/issue-73021-impossible-inline.rs
2 // revisions: no-opt inline
3 // [inline]compile-flags: -Zmir-opt-level=3 --emit=mir
4 #![feature(trivial_bounds)]
11 fn foo
<'a
>(s
: &'a
mut ())
18 fn clone(it
: &mut ()) -> &mut ()
20 for<'any
> &'any
mut (): Clone
,
21 //~^ WARN trait bound for<'any> &'any mut (): Clone does not depend on any type or lifetime parameters
26 fn generic_function
<X
: Foo
>(x
: X
) {}
28 struct S
where i32: Foo
;
29 //~^ WARN trait bound i32: Foo does not depend on any type or lifetime parameters
31 impl Foo
for () where i32: Foo
{
32 //~^ WARN trait bound i32: Foo does not depend on any type or lifetime parameters
36 generic_function(5i32);
40 fn f() where i32: Foo
{
41 //~^ WARN trait bound i32: Foo does not depend on any type or lifetime parameters
45 generic_function(5i32);
48 fn g() where &'
static str: Foo
{
49 //~^ WARN trait bound &'static str: Foo does not depend on any type or lifetime parameters
52 generic_function("Foo");
55 fn use_op(s
: String
) -> String
57 String
: ::std
::ops
::Neg
<Output
= String
>,
58 //~^ WARN trait bound String: Neg does not depend on any type or lifetime parameters
66 //~^ WARN trait bound i32: Iterator does not depend on any type or lifetime parameters