Skip to content

Commit bdacdbb

Browse files
authored
Rollup merge of #120233 - oli-obk:revert_trait_obj_upcast_stabilization, r=lcnr
Revert stabilization of trait_upcasting feature Reverts #118133 This reverts commit 6d2b84b3ed7848fd91b8d6151d4451b3103ed816, reversing changes made to 73bc12199ea8c7651ed98b069c0dd6b0bb5fabcf. The feature has a soundness bug: * #120222 It is unclear to me whether we'll actually want to destabilize, but I thought it was still prudent to open the PR for easy destabilization once we get there.
2 parents 3140352 + 7bd2b22 commit bdacdbb

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#![feature(nonzero_ops)]
1111
#![feature(let_chains)]
1212
#![feature(lint_reasons)]
13-
#![feature(int_roundings)]
13+
#![cfg_attr(not(bootstrap), feature(trait_upcasting))]
1414
// Configure clippy and other lints
1515
#![allow(
1616
clippy::collapsible_else_if,

tests/fail/dyn-upcast-trait-mismatch.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![feature(trait_upcasting)]
2+
#![allow(incomplete_features)]
3+
14
trait Foo: PartialEq<i32> + std::fmt::Debug + Send + Sync {
25
fn a(&self) -> i32 {
36
10

tests/pass/box-custom-alloc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
3-
#![feature(allocator_api)]
3+
#![allow(incomplete_features)] // for trait upcasting
4+
#![feature(allocator_api, trait_upcasting)]
45

56
use std::alloc::Layout;
67
use std::alloc::{AllocError, Allocator};

tests/pass/dyn-upcast.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![feature(trait_upcasting)]
2+
#![allow(incomplete_features)]
3+
14
fn main() {
25
basic();
36
diamond();

0 commit comments

Comments
 (0)