mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
3530d82c31
Fix an ICE observed with an explicit tail-call in a default trait method Right now, explicit tail-calls cannot be used in functions that hold the `#[track_caller]` attribute. This check is performed on a resolved concrete instance of a function, which would be absent for a tail-call performed from the body of a default trait method. This PR fixes the issue by checking for the relevant attribute in default trait methods separately, without expecting a specific resolved instance. Closes https://github.com/rust-lang/rust/issues/144985.