]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.rs
Consider privacy more carefully when suggesting accessing fields
[rust.git] / src / test / ui / issues / issue-46756-consider-borrowing-cast-or-binexpr.rs
1 // run-rustfix
2
3 #![allow(unused)]
4
5 fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
6     and_yet + 1
7 }
8
9 fn main() {
10     let behold: isize = 2;
11     let with_tears: usize = 3;
12     light_flows_our_war_of_mocking_words(behold as usize);
13     //~^ ERROR mismatched types [E0308]
14     light_flows_our_war_of_mocking_words(with_tears + 4);
15     //~^ ERROR mismatched types [E0308]
16 }