Skip to content

Commit

Permalink
Unrolled build for rust-lang#128727
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#128727 - RalfJung:conflicting-repr-future-incompat, r=lcnr

bump conflicting_repr_hints lint to be shown in dependencies

This has been a future compatibility lint for years, let's bump it up to be shown in dependencies (so that hopefully we can then make it a hard error fairly soon).

Cc rust-lang#68585
  • Loading branch information
rust-timer authored Aug 21, 2024
2 parents 6b678c5 + ac23a2e commit 0db61a8
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_lint_defs/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ declare_lint! {
Deny,
"conflicts between `#[repr(..)]` hints that were previously accepted and used in practice",
@future_incompatible = FutureIncompatibleInfo {
reason: FutureIncompatibilityReason::FutureReleaseErrorDontReportInDeps,
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
reference: "issue #68585 <https://github.com/rust-lang/rust/issues/68585>",
};
}
Expand Down
14 changes: 14 additions & 0 deletions tests/ui/feature-gates/feature-gate-repr-simd.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ error: aborting due to 3 previous errors

Some errors have detailed explanations: E0566, E0658.
For more information about an error, try `rustc --explain E0566`.
Future incompatibility report: Future breakage diagnostic:
error[E0566]: conflicting representation hints
--> $DIR/feature-gate-repr-simd.rs:4:8
|
LL | #[repr(C)]
| ^
LL |
LL | #[repr(simd)]
| ^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
= note: `#[deny(conflicting_repr_hints)]` on by default

25 changes: 25 additions & 0 deletions tests/ui/issues/issue-47094.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,28 @@ LL | #[repr(u8)]
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0566`.
Future incompatibility report: Future breakage diagnostic:
error[E0566]: conflicting representation hints
--> $DIR/issue-47094.rs:1:8
|
LL | #[repr(C, u8)]
| ^ ^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
= note: `#[deny(conflicting_repr_hints)]` on by default

Future breakage diagnostic:
error[E0566]: conflicting representation hints
--> $DIR/issue-47094.rs:8:8
|
LL | #[repr(C)]
| ^
LL |
LL | #[repr(u8)]
| ^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
= note: `#[deny(conflicting_repr_hints)]` on by default

22 changes: 22 additions & 0 deletions tests/ui/repr/conflicting-repr-hints.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,25 @@ error: aborting due to 12 previous errors

Some errors have detailed explanations: E0566, E0587, E0634.
For more information about an error, try `rustc --explain E0566`.
Future incompatibility report: Future breakage diagnostic:
error[E0566]: conflicting representation hints
--> $DIR/conflicting-repr-hints.rs:13:8
|
LL | #[repr(C, u64)]
| ^ ^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
= note: `#[deny(conflicting_repr_hints)]` on by default

Future breakage diagnostic:
error[E0566]: conflicting representation hints
--> $DIR/conflicting-repr-hints.rs:19:8
|
LL | #[repr(u32, u64)]
| ^^^ ^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
= note: `#[deny(conflicting_repr_hints)]` on by default

0 comments on commit 0db61a8

Please sign in to comment.