Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't rely on a rustc bug #7508

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/display_object/movie_clip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ impl<'gc> MovieClip<'gc> {
frame_pos = reader.get_ref().as_ptr() as u64 - tag_stream_start;

use swf::TagCode;
let tag_callback = |reader: &mut SwfStream<'gc>, tag_code, tag_len| match tag_code {
let tag_callback = |reader: &mut _, tag_code, tag_len| match tag_code {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, the required change would be to only remove the lifetime annotation:

-            let tag_callback = |reader: &mut SwfStream<'gc>, tag_code, tag_len| match tag_code {
+           let tag_callback = |reader: &mut SwfStream<'_>, tag_code, tag_len| match tag_code {

but this unfortunately exposes another rust bug that requires such a hacky solution. See rust-lang/rust#58052 rust-lang/rust#70263.

TagCode::PlaceObject => {
index += 1;
let mut mc = self.0.write(context.gc_context);
Expand Down