Skip to content

Fix a compiler warning.#168

Merged
sunfishcode merged 1 commit intomasterfrom
fix-warning
May 31, 2019
Merged

Fix a compiler warning.#168
sunfishcode merged 1 commit intomasterfrom
fix-warning

Conversation

@sunfishcode
Copy link
Member

@sunfishcode sunfishcode commented May 30, 2019

Fix the following warning from Rust 1.35:

warning: cannot borrow `*self` as mutable because it is also borrowed as immutable
   --> wasmtime-runtime/src/instance.rs:473:25
    |
465 |         } else if let Some(start_export) = self.module.exports.get("_start") {
    |                                            ----------- immutable borrow occurs here
...
473 |                         self.invoke_function(*func_index)
    |                         ^^^^                 ----------- immutable borrow later used here
    |                         |
    |                         mutable borrow occurs here
    |
    = note: #[warn(mutable_borrow_reservation_conflict)] on by default
    = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
    = note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>

Fix the following warning from Rust 1.35:

warning: cannot borrow `*self` as mutable because it is also borrowed as immutable
   --> wasmtime-runtime/src/instance.rs:473:25
    |
465 |         } else if let Some(start_export) = self.module.exports.get("_start") {
    |                                            ----------- immutable borrow occurs here
...
473 |                         self.invoke_function(*func_index)
    |                         ^^^^                 ----------- immutable borrow later used here
    |                         |
    |                         mutable borrow occurs here
    |
    = note: #[warn(mutable_borrow_reservation_conflict)] on by default
    = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
    = note: for more information, see issue #59159 <rust-lang/rust#59159>
Copy link
Member

@kubkon kubkon left a comment

Choose a reason for hiding this comment

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

Nice one! I was meant to do that one myself, but didn't get the chance yet.

@sunfishcode sunfishcode merged commit 825f1d7 into master May 31, 2019
@sunfishcode sunfishcode deleted the fix-warning branch May 31, 2019 01:44
mooori added a commit to mooori/wasmtime that referenced this pull request Jan 5, 2024
perf: optimize zkASM for `CondBr` if target is a label
dhil added a commit to dhil/wasmtime that referenced this pull request May 15, 2024
This patch modularises the optimized runtime in the same manner as the
baseline runtime already was. It factors out the `StackChain` logic into
a separate module `stack_chain`, which is needed to add support for
backtraces to the baseline implementation (yet to be done!).
avanhatt pushed a commit to wellesley-prog-sys/wasmtime that referenced this pull request Oct 23, 2024
…codealliance#168)

Generate load/store specs using `AMode.UnsignedOffset`.

Updates #36 avanhatt#49 #35
avanhatt pushed a commit to wellesley-prog-sys/wasmtime that referenced this pull request Oct 23, 2024
…codealliance#168)

Generate load/store specs using `AMode.UnsignedOffset`.

Updates #36 avanhatt#49 #35
dicej added a commit to dicej/wasmtime that referenced this pull request May 27, 2025
…pec-fixes

fix various behavior mismatches relative to the spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants