Skip to content

Commit eb35f05

Browse files
authored
Unrolled build for rust-lang#125210
Rollup merge of rust-lang#125210 - fmease:fix-up-some-diags, r=davidtwco Cleanup: Fix up some diagnostics Several diagnostics contained their error code inside their primary message which is no bueno. This PR moves them out of the message and turns them into structured error codes. Also fixes another occurrence of `->` after a selector in a Fluent message which is not correct. I've fixed two other instances of this issue in rust-lang#104345 (2022) but didn't update all instances as I've noted here: rust-lang#104345 (comment) (“the future is now!”).
2 parents 39d2f2a + ae49dbe commit eb35f05

12 files changed

+57
-47
lines changed

compiler/rustc_infer/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ infer_compare_impl_item_obligation = ...so that the definition in impl matches t
104104
infer_consider_specifying_length = consider specifying the actual array length
105105
infer_data_flows = ...but data{$label_var1_exists ->
106106
[true] {" "}from `{$label_var1}`
107-
*[false] -> {""}
107+
*[false] {""}
108108
} flows{$label_var2_exists ->
109109
[true] {" "}into `{$label_var2}`
110-
*[false] -> {""}
110+
*[false] {""}
111111
} here
112112
113113
infer_data_lifetime_flow = ...but data with one lifetime flows into the other here

compiler/rustc_lint/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ lint_pattern_in_foreign = patterns aren't allowed in foreign function declaratio
627627
.label = pattern not allowed in foreign function
628628
629629
lint_private_extern_crate_reexport =
630-
extern crate `{$ident}` is private, and cannot be re-exported (error E0365), consider declaring with `pub`
630+
extern crate `{$ident}` is private, and cannot be re-exported, consider declaring with `pub`
631631
632632
lint_proc_macro_back_compat = using an old version of `{$crate_name}`
633633
.note = older versions of the `{$crate_name}` crate will stop compiling in future versions of Rust; please update to `{$crate_name}` v{$fixed_version}, or switch to one of the `{$crate_name}` alternatives

compiler/rustc_lint/src/lints.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2228,7 +2228,7 @@ pub struct MacroUseDeprecated;
22282228
pub struct UnusedMacroUse;
22292229

22302230
#[derive(LintDiagnostic)]
2231-
#[diag(lint_private_extern_crate_reexport)]
2231+
#[diag(lint_private_extern_crate_reexport, code = E0365)]
22322232
pub struct PrivateExternCrateReexport {
22332233
pub ident: Ident,
22342234
}

compiler/rustc_mir_build/messages.ftl

+11-12
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,12 @@ mir_build_unsafe_fn_safe_body = an unsafe function restricts its caller, but its
335335
mir_build_unsafe_not_inherited = items do not inherit unsafety from separate enclosing items
336336
337337
mir_build_unsafe_op_in_unsafe_fn_borrow_of_layout_constrained_field_requires_unsafe =
338-
borrow of layout constrained field with interior mutability is unsafe and requires unsafe block (error E0133)
338+
borrow of layout constrained field with interior mutability is unsafe and requires unsafe block
339339
.note = references to fields of layout constrained fields lose the constraints. Coupled with interior mutability, the field can be changed to invalid values
340340
.label = borrow of layout constrained field with interior mutability
341341
342342
mir_build_unsafe_op_in_unsafe_fn_call_to_fn_with_requires_unsafe =
343-
call to function `{$function}` with `#[target_feature]` is unsafe and requires unsafe block (error E0133)
343+
call to function `{$function}` with `#[target_feature]` is unsafe and requires unsafe block
344344
.help = in order for the call to be safe, the context requires the following additional target {$missing_target_features_count ->
345345
[1] feature
346346
*[count] features
@@ -355,48 +355,47 @@ mir_build_unsafe_op_in_unsafe_fn_call_to_fn_with_requires_unsafe =
355355
.label = call to function with `#[target_feature]`
356356
357357
mir_build_unsafe_op_in_unsafe_fn_call_to_unsafe_fn_requires_unsafe =
358-
call to unsafe function `{$function}` is unsafe and requires unsafe block (error E0133)
358+
call to unsafe function `{$function}` is unsafe and requires unsafe block
359359
.note = consult the function's documentation for information on how to avoid undefined behavior
360360
.label = call to unsafe function
361361
362362
mir_build_unsafe_op_in_unsafe_fn_call_to_unsafe_fn_requires_unsafe_nameless =
363-
call to unsafe function is unsafe and requires unsafe block (error E0133)
363+
call to unsafe function is unsafe and requires unsafe block
364364
.note = consult the function's documentation for information on how to avoid undefined behavior
365365
.label = call to unsafe function
366366
367367
mir_build_unsafe_op_in_unsafe_fn_deref_raw_pointer_requires_unsafe =
368-
dereference of raw pointer is unsafe and requires unsafe block (error E0133)
368+
dereference of raw pointer is unsafe and requires unsafe block
369369
.note = raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
370370
.label = dereference of raw pointer
371371
372372
mir_build_unsafe_op_in_unsafe_fn_extern_static_requires_unsafe =
373-
use of extern static is unsafe and requires unsafe block (error E0133)
373+
use of extern static is unsafe and requires unsafe block
374374
.note = extern statics are not controlled by the Rust type system: invalid data, aliasing violations or data races will cause undefined behavior
375375
.label = use of extern static
376376
377377
mir_build_unsafe_op_in_unsafe_fn_initializing_type_with_requires_unsafe =
378-
initializing type with `rustc_layout_scalar_valid_range` attr is unsafe and requires unsafe
379-
block (error E0133)
378+
initializing type with `rustc_layout_scalar_valid_range` attr is unsafe and requires unsafe block
380379
.note = initializing a layout restricted type's field with a value outside the valid range is undefined behavior
381380
.label = initializing type with `rustc_layout_scalar_valid_range` attr
382381
383382
mir_build_unsafe_op_in_unsafe_fn_inline_assembly_requires_unsafe =
384-
use of inline assembly is unsafe and requires unsafe block (error E0133)
383+
use of inline assembly is unsafe and requires unsafe block
385384
.note = inline assembly is entirely unchecked and can cause undefined behavior
386385
.label = use of inline assembly
387386
388387
mir_build_unsafe_op_in_unsafe_fn_mutable_static_requires_unsafe =
389-
use of mutable static is unsafe and requires unsafe block (error E0133)
388+
use of mutable static is unsafe and requires unsafe block
390389
.note = mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
391390
.label = use of mutable static
392391
393392
mir_build_unsafe_op_in_unsafe_fn_mutation_of_layout_constrained_field_requires_unsafe =
394-
mutation of layout constrained field is unsafe and requires unsafe block (error E0133)
393+
mutation of layout constrained field is unsafe and requires unsafe block
395394
.note = mutating layout constrained fields cannot statically be checked for valid values
396395
.label = mutation of layout constrained field
397396
398397
mir_build_unsafe_op_in_unsafe_fn_union_field_requires_unsafe =
399-
access to union field is unsafe and requires unsafe block (error E0133)
398+
access to union field is unsafe and requires unsafe block
400399
.note = the field may not be properly initialized: using uninitialized data will cause undefined behavior
401400
.label = access to union field
402401

compiler/rustc_mir_build/src/errors.rs

+17-11
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct UnconditionalRecursion {
2121
}
2222

2323
#[derive(LintDiagnostic)]
24-
#[diag(mir_build_unsafe_op_in_unsafe_fn_call_to_unsafe_fn_requires_unsafe)]
24+
#[diag(mir_build_unsafe_op_in_unsafe_fn_call_to_unsafe_fn_requires_unsafe, code = E0133)]
2525
#[note]
2626
pub struct UnsafeOpInUnsafeFnCallToUnsafeFunctionRequiresUnsafe {
2727
#[label]
@@ -32,7 +32,7 @@ pub struct UnsafeOpInUnsafeFnCallToUnsafeFunctionRequiresUnsafe {
3232
}
3333

3434
#[derive(LintDiagnostic)]
35-
#[diag(mir_build_unsafe_op_in_unsafe_fn_call_to_unsafe_fn_requires_unsafe_nameless)]
35+
#[diag(mir_build_unsafe_op_in_unsafe_fn_call_to_unsafe_fn_requires_unsafe_nameless, code = E0133)]
3636
#[note]
3737
pub struct UnsafeOpInUnsafeFnCallToUnsafeFunctionRequiresUnsafeNameless {
3838
#[label]
@@ -42,7 +42,7 @@ pub struct UnsafeOpInUnsafeFnCallToUnsafeFunctionRequiresUnsafeNameless {
4242
}
4343

4444
#[derive(LintDiagnostic)]
45-
#[diag(mir_build_unsafe_op_in_unsafe_fn_inline_assembly_requires_unsafe)]
45+
#[diag(mir_build_unsafe_op_in_unsafe_fn_inline_assembly_requires_unsafe, code = E0133)]
4646
#[note]
4747
pub struct UnsafeOpInUnsafeFnUseOfInlineAssemblyRequiresUnsafe {
4848
#[label]
@@ -52,7 +52,7 @@ pub struct UnsafeOpInUnsafeFnUseOfInlineAssemblyRequiresUnsafe {
5252
}
5353

5454
#[derive(LintDiagnostic)]
55-
#[diag(mir_build_unsafe_op_in_unsafe_fn_initializing_type_with_requires_unsafe)]
55+
#[diag(mir_build_unsafe_op_in_unsafe_fn_initializing_type_with_requires_unsafe, code = E0133)]
5656
#[note]
5757
pub struct UnsafeOpInUnsafeFnInitializingTypeWithRequiresUnsafe {
5858
#[label]
@@ -62,7 +62,7 @@ pub struct UnsafeOpInUnsafeFnInitializingTypeWithRequiresUnsafe {
6262
}
6363

6464
#[derive(LintDiagnostic)]
65-
#[diag(mir_build_unsafe_op_in_unsafe_fn_mutable_static_requires_unsafe)]
65+
#[diag(mir_build_unsafe_op_in_unsafe_fn_mutable_static_requires_unsafe, code = E0133)]
6666
#[note]
6767
pub struct UnsafeOpInUnsafeFnUseOfMutableStaticRequiresUnsafe {
6868
#[label]
@@ -72,7 +72,7 @@ pub struct UnsafeOpInUnsafeFnUseOfMutableStaticRequiresUnsafe {
7272
}
7373

7474
#[derive(LintDiagnostic)]
75-
#[diag(mir_build_unsafe_op_in_unsafe_fn_extern_static_requires_unsafe)]
75+
#[diag(mir_build_unsafe_op_in_unsafe_fn_extern_static_requires_unsafe, code = E0133)]
7676
#[note]
7777
pub struct UnsafeOpInUnsafeFnUseOfExternStaticRequiresUnsafe {
7878
#[label]
@@ -82,7 +82,7 @@ pub struct UnsafeOpInUnsafeFnUseOfExternStaticRequiresUnsafe {
8282
}
8383

8484
#[derive(LintDiagnostic)]
85-
#[diag(mir_build_unsafe_op_in_unsafe_fn_deref_raw_pointer_requires_unsafe)]
85+
#[diag(mir_build_unsafe_op_in_unsafe_fn_deref_raw_pointer_requires_unsafe, code = E0133)]
8686
#[note]
8787
pub struct UnsafeOpInUnsafeFnDerefOfRawPointerRequiresUnsafe {
8888
#[label]
@@ -92,7 +92,7 @@ pub struct UnsafeOpInUnsafeFnDerefOfRawPointerRequiresUnsafe {
9292
}
9393

9494
#[derive(LintDiagnostic)]
95-
#[diag(mir_build_unsafe_op_in_unsafe_fn_union_field_requires_unsafe)]
95+
#[diag(mir_build_unsafe_op_in_unsafe_fn_union_field_requires_unsafe, code = E0133)]
9696
#[note]
9797
pub struct UnsafeOpInUnsafeFnAccessToUnionFieldRequiresUnsafe {
9898
#[label]
@@ -102,7 +102,10 @@ pub struct UnsafeOpInUnsafeFnAccessToUnionFieldRequiresUnsafe {
102102
}
103103

104104
#[derive(LintDiagnostic)]
105-
#[diag(mir_build_unsafe_op_in_unsafe_fn_mutation_of_layout_constrained_field_requires_unsafe)]
105+
#[diag(
106+
mir_build_unsafe_op_in_unsafe_fn_mutation_of_layout_constrained_field_requires_unsafe,
107+
code = E0133
108+
)]
106109
#[note]
107110
pub struct UnsafeOpInUnsafeFnMutationOfLayoutConstrainedFieldRequiresUnsafe {
108111
#[label]
@@ -112,7 +115,10 @@ pub struct UnsafeOpInUnsafeFnMutationOfLayoutConstrainedFieldRequiresUnsafe {
112115
}
113116

114117
#[derive(LintDiagnostic)]
115-
#[diag(mir_build_unsafe_op_in_unsafe_fn_borrow_of_layout_constrained_field_requires_unsafe)]
118+
#[diag(
119+
mir_build_unsafe_op_in_unsafe_fn_borrow_of_layout_constrained_field_requires_unsafe,
120+
code = E0133,
121+
)]
116122
pub struct UnsafeOpInUnsafeFnBorrowOfLayoutConstrainedFieldRequiresUnsafe {
117123
#[label]
118124
pub span: Span,
@@ -121,7 +127,7 @@ pub struct UnsafeOpInUnsafeFnBorrowOfLayoutConstrainedFieldRequiresUnsafe {
121127
}
122128

123129
#[derive(LintDiagnostic)]
124-
#[diag(mir_build_unsafe_op_in_unsafe_fn_call_to_fn_with_requires_unsafe)]
130+
#[diag(mir_build_unsafe_op_in_unsafe_fn_call_to_fn_with_requires_unsafe, code = E0133)]
125131
#[help]
126132
pub struct UnsafeOpInUnsafeFnCallToFunctionWithRequiresUnsafe {
127133
#[label]

tests/ui/pub/pub-reexport-priv-extern-crate.stderr

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ note: the crate import `core` is defined here
2222
LL | extern crate core;
2323
| ^^^^^^^^^^^^^^^^^^
2424

25-
error: extern crate `core` is private, and cannot be re-exported (error E0365), consider declaring with `pub`
25+
error[E0365]: extern crate `core` is private, and cannot be re-exported, consider declaring with `pub`
2626
--> $DIR/pub-reexport-priv-extern-crate.rs:2:9
2727
|
2828
LL | pub use core as reexported_core;
@@ -34,4 +34,5 @@ LL | pub use core as reexported_core;
3434

3535
error: aborting due to 3 previous errors
3636

37-
For more information about this error, try `rustc --explain E0603`.
37+
Some errors have detailed explanations: E0365, E0603.
38+
For more information about an error, try `rustc --explain E0365`.

tests/ui/rfcs/rfc-2396-target_feature-11/safe-calls.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ LL | const _: () = sse2_and_fxsr();
9191
= help: in order for the call to be safe, the context requires the following additional target features: sse2 and fxsr
9292
= note: the fxsr and sse2 target features being enabled in the build configuration does not remove the requirement to list them in `#[target_feature]`
9393

94-
error: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe block (error E0133)
94+
error[E0133]: call to function `sse2` with `#[target_feature]` is unsafe and requires unsafe block
9595
--> $DIR/safe-calls.rs:70:5
9696
|
9797
LL | sse2();

tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
1+
warning[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
22
--> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:10:5
33
|
44
LL | unsf();
@@ -15,3 +15,4 @@ LL | unsafe fn foo() {
1515

1616
warning: 1 warning emitted
1717

18+
For more information about this error, try `rustc --explain E0133`.

tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
1+
warning[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
22
--> $DIR/edition_2024_default.rs:13:5
33
|
44
LL | unsf();
@@ -15,3 +15,4 @@ LL | unsafe fn foo() {
1515

1616
warning: 1 warning emitted
1717

18+
For more information about this error, try `rustc --explain E0133`.

tests/ui/unsafe/unsafe_op_in_unsafe_fn/in_2024_compatibility.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
1+
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
22
--> $DIR/in_2024_compatibility.rs:7:5
33
|
44
LL | unsf();
@@ -20,3 +20,4 @@ LL | #![deny(rust_2024_compatibility)]
2020

2121
error: aborting due to 1 previous error
2222

23+
For more information about this error, try `rustc --explain E0133`.

tests/ui/unsafe/unsafe_op_in_unsafe_fn/rfc-2585-unsafe_op_in_unsafe_fn.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
1+
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
22
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:9:5
33
|
44
LL | unsf();
@@ -17,7 +17,7 @@ note: the lint level is defined here
1717
LL | #![deny(unsafe_op_in_unsafe_fn)]
1818
| ^^^^^^^^^^^^^^^^^^^^^^
1919

20-
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
20+
error[E0133]: dereference of raw pointer is unsafe and requires unsafe block
2121
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11:5
2222
|
2323
LL | *PTR;
@@ -26,7 +26,7 @@ LL | *PTR;
2626
= note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
2727
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
2828

29-
error: use of mutable static is unsafe and requires unsafe block (error E0133)
29+
error[E0133]: use of mutable static is unsafe and requires unsafe block
3030
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:13:5
3131
|
3232
LL | VOID = ();
@@ -47,7 +47,7 @@ note: the lint level is defined here
4747
LL | #![deny(unused_unsafe)]
4848
| ^^^^^^^^^^^^^
4949

50-
error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
50+
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
5151
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:24:5
5252
|
5353
LL | unsf();
@@ -67,7 +67,7 @@ LL | #[deny(warnings)]
6767
| ^^^^^^^^
6868
= note: `#[deny(unsafe_op_in_unsafe_fn)]` implied by `#[deny(warnings)]`
6969

70-
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
70+
error[E0133]: dereference of raw pointer is unsafe and requires unsafe block
7171
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:5
7272
|
7373
LL | *PTR;
@@ -76,7 +76,7 @@ LL | *PTR;
7676
= note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
7777
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
7878

79-
error: use of mutable static is unsafe and requires unsafe block (error E0133)
79+
error[E0133]: use of mutable static is unsafe and requires unsafe block
8080
--> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:28:5
8181
|
8282
LL | VOID = ();

tests/ui/unsafe/unsafe_op_in_unsafe_fn/wrapping-unsafe-block-sugg.stderr

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
1+
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
22
--> $DIR/wrapping-unsafe-block-sugg.rs:13:5
33
|
44
LL | unsf();
@@ -17,7 +17,7 @@ note: the lint level is defined here
1717
LL | #![deny(unsafe_op_in_unsafe_fn)]
1818
| ^^^^^^^^^^^^^^^^^^^^^^
1919

20-
error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
20+
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
2121
--> $DIR/wrapping-unsafe-block-sugg.rs:17:5
2222
|
2323
LL | unsf();
@@ -26,7 +26,7 @@ LL | unsf();
2626
= note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
2727
= note: consult the function's documentation for information on how to avoid undefined behavior
2828

29-
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
29+
error[E0133]: dereference of raw pointer is unsafe and requires unsafe block
3030
--> $DIR/wrapping-unsafe-block-sugg.rs:25:13
3131
|
3232
LL | let y = *x;
@@ -40,7 +40,7 @@ note: an unsafe function restricts its caller, but its body is safe by default
4040
LL | pub unsafe fn bar(x: *const i32) -> i32 {
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4242

43-
error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
43+
error[E0133]: dereference of raw pointer is unsafe and requires unsafe block
4444
--> $DIR/wrapping-unsafe-block-sugg.rs:29:9
4545
|
4646
LL | y + *x
@@ -49,7 +49,7 @@ LL | y + *x
4949
= note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
5050
= note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
5151

52-
error: use of mutable static is unsafe and requires unsafe block (error E0133)
52+
error[E0133]: use of mutable static is unsafe and requires unsafe block
5353
--> $DIR/wrapping-unsafe-block-sugg.rs:38:13
5454
|
5555
LL | let y = BAZ;
@@ -63,7 +63,7 @@ note: an unsafe function restricts its caller, but its body is safe by default
6363
LL | pub unsafe fn baz() -> i32 {
6464
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6565

66-
error: use of mutable static is unsafe and requires unsafe block (error E0133)
66+
error[E0133]: use of mutable static is unsafe and requires unsafe block
6767
--> $DIR/wrapping-unsafe-block-sugg.rs:42:9
6868
|
6969
LL | y + BAZ
@@ -72,7 +72,7 @@ LL | y + BAZ
7272
= note: for more information, see issue #71668 <https://github.com/rust-lang/rust/issues/71668>
7373
= note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
7474

75-
error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
75+
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
7676
--> $DIR/wrapping-unsafe-block-sugg.rs:48:36
7777
|
7878
LL | macro_rules! unsafe_macro { () => (unsf()) }
@@ -90,7 +90,7 @@ LL | pub unsafe fn unsafe_in_macro() {
9090
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9191
= note: this error originates in the macro `unsafe_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
9292

93-
error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
93+
error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
9494
--> $DIR/wrapping-unsafe-block-sugg.rs:48:36
9595
|
9696
LL | macro_rules! unsafe_macro { () => (unsf()) }
@@ -105,3 +105,4 @@ LL | unsafe_macro!();
105105

106106
error: aborting due to 8 previous errors
107107

108+
For more information about this error, try `rustc --explain E0133`.

0 commit comments

Comments
 (0)