Skip to content

Commit 8c66c30

Browse files
Rollup merge of #106248 - dtolnay:revertupcastlint, r=jackh726
Revert "Implement allow-by-default `multiple_supertrait_upcastable` lint" This is a clean revert of #105484. I confirmed that reverting that PR fixes the regression reported in #106247. ~~I can't say I understand what this code is doing, but maybe it can be re-landed with a different implementation.~~ **Edit:** rust-lang/rust#106247 (comment) has an explanation of why #105484 ends up surfacing spurious `where_clause_object_safety` errors. The implementation of `where_clause_object_safety` assumes we only check whether a trait is object safe when somebody actually uses that trait with `dyn`. However the implementation of `multiple_supertrait_upcastable` added in the problematic PR involves checking *every* trait for whether it is object-safe. FYI `@nbdd0121` `@compiler-errors`
2 parents a909463 + b3af151 commit 8c66c30

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

alloc/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
#![warn(missing_debug_implementations)]
8888
#![warn(missing_docs)]
8989
#![allow(explicit_outlives_requirements)]
90-
#![cfg_attr(not(bootstrap), warn(multiple_supertrait_upcastable))]
9190
//
9291
// Library features:
9392
#![feature(alloc_layout_extra)]
@@ -192,7 +191,6 @@
192191
#![feature(unsized_fn_params)]
193192
#![feature(c_unwind)]
194193
#![feature(with_negative_coherence)]
195-
#![cfg_attr(not(bootstrap), feature(multiple_supertrait_upcastable))]
196194
//
197195
// Rustdoc features:
198196
#![feature(doc_cfg)]

core/src/error.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use crate::fmt::{Debug, Display};
2828
#[stable(feature = "rust1", since = "1.0.0")]
2929
#[cfg_attr(not(test), rustc_diagnostic_item = "Error")]
3030
#[rustc_has_incoherent_inherent_impls]
31-
#[cfg_attr(not(bootstrap), allow(multiple_supertrait_upcastable))]
3231
pub trait Error: Debug + Display {
3332
/// The lower-level source of this error, if any.
3433
///

core/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
#![warn(missing_docs)]
9696
#![allow(explicit_outlives_requirements)]
9797
#![allow(incomplete_features)]
98-
#![cfg_attr(not(bootstrap), warn(multiple_supertrait_upcastable))]
9998
//
10099
// Library features:
101100
#![feature(const_align_offset)]
@@ -232,7 +231,6 @@
232231
#![feature(unsized_fn_params)]
233232
#![feature(asm_const)]
234233
#![feature(const_transmute_copy)]
235-
#![cfg_attr(not(bootstrap), feature(multiple_supertrait_upcastable))]
236234
//
237235
// Target features:
238236
#![feature(arm_target_feature)]

0 commit comments

Comments
 (0)