Skip to content

Commit 1b85a80

Browse files
authored
Rollup merge of rust-lang#89785 - nbdd0121:master, r=Mark-Simulacrum
Fix ICE when compiling nightly std/rustc on beta compiler Fix rust-lang#89775 rust-lang#89479 renames a lot of diagnostic items, but it happens that the beta compiler assumes that there must be DefId with `rustc_diagnostic_item = "send_trait"`, causing an ICE when compiling stage 0 std or stage 1 compiler. So gate it with `cfg(bootstrap)`. The unwrap is also removed, so that existence of the diagnostic item is not required. I ripgreped the code base and this seems the only place where `unwrap` is called on the return value of `get_diagnostic_item`.
2 parents e063c50 + 8541179 commit 1b85a80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/marker.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ use crate::hash::Hasher;
3030
/// [arc]: ../../std/sync/struct.Arc.html
3131
/// [ub]: ../../reference/behavior-considered-undefined.html
3232
#[stable(feature = "rust1", since = "1.0.0")]
33-
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
33+
#[cfg_attr(all(not(test), bootstrap), rustc_diagnostic_item = "send_trait")]
34+
#[cfg_attr(all(not(test), not(bootstrap)), rustc_diagnostic_item = "Send")]
3435
#[rustc_on_unimplemented(
3536
message = "`{Self}` cannot be sent between threads safely",
3637
label = "`{Self}` cannot be sent between threads safely"

0 commit comments

Comments
 (0)