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
When I change riter to take a [const T]/&, I get the following error message:
/Users/eholk/Documents/projects/mozilla/rust/src/rustc/middle/trans/base.rs:4011:24: 4011:32 error: mismatched types: expected `[const <V10>]/&<R0>` but found `[middle::trans::common::cleanup]` (vector vs vector)
/Users/eholk/Documents/projects/mozilla/rust/src/rustc/middle/trans/base.rs:4011 vec::riter(copy cleanups) {|cu|
^~~~~~~~
error: aborting due to previous errors
These types should be coercible...
The text was updated successfully, but these errors were encountered:
This may be nothing more than an artifact of the type inferencer, but I think it oughta' work... in particular I can't see why it would fix things to store copy cleanups into a temporary variable, but apparently it does.
I understand the problem now. It has to do w/ the limitation that we only perform borrowing for call args---the expected types then get passed down via copy and it requires a subtyping, not assignability, relationship.
Use the overflow result operations instead of doing the math twice.
This is related to the performance degradation we are seeing in the toolchain upgrade: rust-lang#2293
Co-authored-by: Michael Tautschnig <[email protected]>
tshepang
pushed a commit
to tshepang/rust
that referenced
this issue
Jun 2, 2025
Consider this code from base.rs:
When I change
riter
to take a[const T]/&
, I get the following error message:These types should be coercible...
The text was updated successfully, but these errors were encountered: