Skip to content

Remove invalid no_mangle attribute - #117

Merged
ogoffart merged 1 commit into
mystor:masterfrom
mejrs:no_mangle
Nov 4, 2026
Merged

ogoffart merged 1 commit into
mystor:masterfrom
mejrs:no_mangle

Conversation

@mejrs

@mejrs mejrs commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

This is invalid as the no_mangle attribute has no meaning on foreign statics.

This crate surfaced in a recent crater run, where 56 crates started failing with errors like:

error: the `no_mangle` attribute cannot be used on foreign statics
   --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-backend-qt-0.3.5/qt_accessible.rs:116:9
    |
116 | /         cpp!(unsafe [obj as "QObject*"] {
117 | |             QTimer::singleShot(0, [obj = QPointer(obj)]() {
118 | |                 if (!obj)
119 | |                     return;
...   |
129 | |             });
130 | |         });
    | |__________^
    |
    = help: the `no_mangle` attribute can be applied to functions and statics
    = note: this error originates in the macro `__cpp_closure_impl` which comes from the expansion of the macro `cpp` (in Nightly builds, run with -Z macro-backtrace for more info)

@ogoffart
ogoffart merged commit d373785 into mystor:master Nov 4, 2026
9 checks passed
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