]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/issue-84973-2.rs
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[rust.git] / src / test / ui / suggestions / issue-84973-2.rs
1 // A slight variation of issue-84973.rs. Here, a mutable borrow is
2 // required (and the obligation kind is different).
3
4 trait Tr {}
5 impl Tr for &mut i32 {}
6
7 fn foo<T: Tr>(i: T) {}
8
9 fn main() {
10     let a: i32 = 32;
11     foo(a);
12     //~^ ERROR: the trait bound `i32: Tr` is not satisfied [E0277]
13 }