Skip to content

Fix compile on latest Rust nightly - #14193

Merged
cfallin merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:fix-nightly-compile
Aug 24, 2026
Merged

Fix compile on latest Rust nightly#14193
cfallin merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:fix-nightly-compile

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

Nightly Rust has a new trait solver enabled which trips up on type inference for some of Wasmtime's bindgen!-generated code. The minimized failure doesn't look obviously the fault of the new solver, nor the fault of Wasmtime here, so I've opted to just apply the fix here for now. This additionally handles a new recursion limit warning on nightly as well.

Nightly Rust has a new trait solver enabled which trips up on type
inference for some of Wasmtime's `bindgen!`-generated code. The
minimized failure doesn't look obviously the fault of the new solver,
nor the fault of Wasmtime here, so I've opted to just apply the fix here
for now. This additionally handles a new recursion limit warning on
nightly as well.

Closes bytecodealliance#14192
@alexcrichton
alexcrichton requested review from a team as code owners August 24, 2026 14:53
@alexcrichton
alexcrichton requested review from cfallin and fitzgen and removed request for a team August 24, 2026 14:54
@cfallin
cfallin enabled auto-merge August 24, 2026 15:12
@cfallin
cfallin added this pull request to the merge queue Aug 24, 2026
@bjorn3

bjorn3 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Has a rustc issue been opened for this?

Merged via the queue into bytecodealliance:main with commit 30dddb6 Aug 24, 2026
54 checks passed
@alexcrichton

Copy link
Copy Markdown
Member Author

I've not yet opened an issue, no. If you'd like to though the minimal example is:

pub trait HasData {
    type Data<'a>;
}

pub fn with_getter<D2: HasData>(_get: fn(&()) -> D2::Data<'_>) {}

pub fn caller<D: HasData>(getter: fn(&()) -> D::Data<'_>) {
    with_getter(getter); // ERROR 
}

to me this seems like an intentional fix for something that should have been ambiguous in the first place

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.

3 participants