diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed b/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed new file mode 100644 index 000000000..8668d8acd --- /dev/null +++ b/src/test/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.fixed @@ -0,0 +1,16 @@ +// run-rustfix + +#![allow(unused)] + +fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize { + and_yet + 1 +} + +fn main() { + let behold: isize = 2; + let with_tears: usize = 3; + light_flows_our_war_of_mocking_words(&(behold as usize)); + //~^ ERROR mismatched types [E0308] + light_flows_our_war_of_mocking_words(&(with_tears + 4)); + //~^ ERROR mismatched types [E0308] +} |