Repository navigation
make copy_within #[inline] - #56886
oconnor663 wants to merge 1 commit into
Conversation
@briansmith suggested this in rust-lang#54236 (comment).
|
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
|
We generally do not add |
|
@briansmith what do you think here? I don't know enough about the compiler to have a real opinion. |
|
I don't know under what circumstances the compiler automatically inlines functions. It seems reasonable to me to think that, although the compiler might inline something without a hint today, it might choose to not do so tomorrow. OTOH if the compiler is guaranteed to always inline the function (why?) then I agree it is redundant. |
This is the compiler. We know exactly how it behaves, and if it stops behaving that way, we'll deal with this at that time. There are literally thousands of functions that we expect to be inlined without an explicit |
|
I'll close this PR on that basis. I'm curious to know more, though: Is inlining something that's determined only by looking at the inlined function itself? Like if the compiler inlines |
|
FWIW, I have run into several places where |
@briansmith suggested this in
#54236 (comment).