You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libcore/ops.rs provides all kinds of operator implementations for “value” and “reference type” combinations. But one thing does not seem to work like it should:
use std::ops::Add;fnshow(z:i32){println!("{}", z)}fnmain(){let x = 23;let y = 42;show(Add::add( x, y));show(Add::add( x,&y));show(Add::add(&x, y));show(Add::add(&x,&y));show( x + y);show( x + &y);// <-- everything but this worksshow(&x + y);show(&x + &y);}
I think there is a problem with how these methods are looked up because the UFCS apparently works. This issue currently kind of blocks the libcoretest/ops.rs tests I was planning to add.
libcore/ops.rs provides all kinds of operator implementations for “value” and “reference type” combinations. But one thing does not seem to work like it should:
I think there is a problem with how these methods are looked up because the UFCS apparently works. This issue currently kind of blocks the libcoretest/ops.rs tests I was planning to add.
cc @aturon
The text was updated successfully, but these errors were encountered: