Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e1f75dd

Browse filesBrowse files
committed
Make the wasm_c_abi future compat warning a hard error
This is the next step in getting rid of the broken C abi for wasm32-unknown-unknown.
1 parent 0e98766 commit e1f75dd
Copy full SHA for e1f75dd

File tree

Expand file treeCollapse file tree

8 files changed

+11
-54
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+11
-54
lines changed

‎compiler/rustc_lint/messages.ftl

Copy file name to clipboardExpand all lines: compiler/rustc_lint/messages.ftl
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,3 @@ lint_use_let_underscore_ignore_suggestion = use `let _ = ...` to ignore the expr
971971
972972
lint_variant_size_differences =
973973
enum variant is more than three times larger ({$largest} bytes) than the next largest
974-
975-
lint_wasm_c_abi =
976-
older versions of the `wasm-bindgen` crate will be incompatible with future versions of Rust; please update to `wasm-bindgen` v0.2.88

‎compiler/rustc_lint/src/context/diagnostics.rs

Copy file name to clipboardExpand all lines: compiler/rustc_lint/src/context/diagnostics.rs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ pub(super) fn decorate_lint(sess: &Session, diagnostic: BuiltinLintDiag, diag: &
425425
BuiltinLintDiag::UnusedCrateDependency { extern_crate, local_crate } => {
426426
lints::UnusedCrateDependency { extern_crate, local_crate }.decorate_lint(diag)
427427
}
428-
BuiltinLintDiag::WasmCAbi => lints::WasmCAbi.decorate_lint(diag),
429428
BuiltinLintDiag::IllFormedAttributeInput { suggestions } => {
430429
lints::IllFormedAttributeInput {
431430
num_suggestions: suggestions.len(),

‎compiler/rustc_lint/src/lints.rs

Copy file name to clipboardExpand all lines: compiler/rustc_lint/src/lints.rs
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,10 +2515,6 @@ pub(crate) struct UnusedCrateDependency {
25152515
pub local_crate: Symbol,
25162516
}
25172517

2518-
#[derive(LintDiagnostic)]
2519-
#[diag(lint_wasm_c_abi)]
2520-
pub(crate) struct WasmCAbi;
2521-
25222518
#[derive(LintDiagnostic)]
25232519
#[diag(lint_ill_formed_attribute_input)]
25242520
pub(crate) struct IllFormedAttributeInput {

‎compiler/rustc_lint_defs/src/builtin.rs

Copy file name to clipboardExpand all lines: compiler/rustc_lint_defs/src/builtin.rs
-39Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ declare_lint_pass! {
143143
UNUSED_VARIABLES,
144144
USELESS_DEPRECATED,
145145
WARNINGS,
146-
WASM_C_ABI,
147146
// tidy-alphabetical-end
148147
]
149148
}
@@ -4642,44 +4641,6 @@ declare_lint! {
46424641
};
46434642
}
46444643

4645-
declare_lint! {
4646-
/// The `wasm_c_abi` lint detects crate dependencies that are incompatible
4647-
/// with future versions of Rust that will emit spec-compliant C ABI.
4648-
///
4649-
/// ### Example
4650-
///
4651-
/// ```rust,ignore (needs extern crate)
4652-
/// #![deny(wasm_c_abi)]
4653-
/// ```
4654-
///
4655-
/// This will produce:
4656-
///
4657-
/// ```text
4658-
/// error: the following packages contain code that will be rejected by a future version of Rust: wasm-bindgen v0.2.87
4659-
/// |
4660-
/// note: the lint level is defined here
4661-
/// --> src/lib.rs:1:9
4662-
/// |
4663-
/// 1 | #![deny(wasm_c_abi)]
4664-
/// | ^^^^^^^^^^
4665-
/// ```
4666-
///
4667-
/// ### Explanation
4668-
///
4669-
/// Rust has historically emitted non-spec-compliant C ABI. This has caused
4670-
/// incompatibilities between other compilers and Wasm targets. In a future
4671-
/// version of Rust this will be fixed and therefore dependencies relying
4672-
/// on the non-spec-compliant C ABI will stop functioning.
4673-
pub WASM_C_ABI,
4674-
Deny,
4675-
"detects dependencies that are incompatible with the Wasm C ABI",
4676-
@future_incompatible = FutureIncompatibleInfo {
4677-
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
4678-
reference: "issue #71871 <https://github.com/rust-lang/rust/issues/71871>",
4679-
};
4680-
crate_level_only
4681-
}
4682-
46834644
declare_lint! {
46844645
/// The `uncovered_param_in_projection` lint detects a violation of one of Rust's orphan rules for
46854646
/// foreign trait implementations that concerns the use of type parameters inside trait associated

‎compiler/rustc_lint_defs/src/lib.rs

Copy file name to clipboardExpand all lines: compiler/rustc_lint_defs/src/lib.rs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,6 @@ pub enum BuiltinLintDiag {
783783
extern_crate: Symbol,
784784
local_crate: Symbol,
785785
},
786-
WasmCAbi,
787786
IllFormedAttributeInput {
788787
suggestions: Vec<String>,
789788
},

‎compiler/rustc_metadata/messages.ftl

Copy file name to clipboardExpand all lines: compiler/rustc_metadata/messages.ftl
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ metadata_unsupported_abi =
290290
metadata_unsupported_abi_i686 =
291291
ABI not supported by `#[link(kind = "raw-dylib")]` on i686
292292
293+
metadata_wasm_c_abi =
294+
older versions of the `wasm-bindgen` crate are incompatible with current versions of Rust; please update to `wasm-bindgen` v0.2.88
295+
293296
metadata_wasm_import_form =
294297
wasm import module must be of the form `wasm_import_module = "string"`
295298

‎compiler/rustc_metadata/src/creader.rs

Copy file name to clipboardExpand all lines: compiler/rustc_metadata/src/creader.rs
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,12 +1032,7 @@ impl<'a, 'tcx> CrateLoader<'a, 'tcx> {
10321032
// Make a point span rather than covering the whole file
10331033
let span = krate.spans.inner_span.shrink_to_lo();
10341034

1035-
self.sess.psess.buffer_lint(
1036-
lint::builtin::WASM_C_ABI,
1037-
span,
1038-
ast::CRATE_NODE_ID,
1039-
BuiltinLintDiag::WasmCAbi,
1040-
);
1035+
self.sess.dcx().emit_err(errors::WasmCAbi { span });
10411036
}
10421037
}
10431038

‎compiler/rustc_metadata/src/errors.rs

Copy file name to clipboardExpand all lines: compiler/rustc_metadata/src/errors.rs
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,3 +732,10 @@ pub struct ImportNameTypeRaw {
732732
#[primary_span]
733733
pub span: Span,
734734
}
735+
736+
#[derive(Diagnostic)]
737+
#[diag(metadata_wasm_c_abi)]
738+
pub(crate) struct WasmCAbi {
739+
#[primary_span]
740+
pub span: Span,
741+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.