Skip to content

Commit 584b78e

Browse files
authored
Rollup merge of #134367 - WaffleLapkin:trait_upcasting_as_a_treat, r=compiler-errors
Stabilize `feature(trait_upcasting)` This feature was "done" for a while now, I think it's finally time to stabilize it! Stabilization report: rust-lang/rust#134367 (comment). cc reference PR: rust-lang/reference#1622. Closes #65991 (tracking issue), closes #89460 (the lint is no longer future incompat). r? compiler-errors
2 parents ab47de2 + 0774091 commit 584b78e

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

Diff for: src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg_attr(bootstrap, feature(trait_upcasting))]
12
#![feature(rustc_private)]
23
#![feature(cell_update)]
34
#![feature(float_gamma)]
@@ -9,7 +10,6 @@
910
#![feature(yeet_expr)]
1011
#![feature(nonzero_ops)]
1112
#![feature(let_chains)]
12-
#![feature(trait_upcasting)]
1313
#![feature(strict_overflow_ops)]
1414
#![feature(pointer_is_aligned_to)]
1515
#![feature(unqualified_local_imports)]

Diff for: tests/fail/dyn-upcast-trait-mismatch.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// Validation stops this too early.
22
//@compile-flags: -Zmiri-disable-validation
33

4-
#![feature(trait_upcasting)]
5-
#![allow(incomplete_features)]
6-
74
trait Foo: PartialEq<i32> + std::fmt::Debug + Send + Sync {
85
#[allow(dead_code)]
96
fn a(&self) -> i32 {

Diff for: tests/pass/box-custom-alloc.rs

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

65
use std::alloc::{AllocError, Allocator, Layout};
76
use std::cell::Cell;

Diff for: tests/pass/dyn-upcast.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![feature(trait_upcasting)]
2-
#![allow(incomplete_features)]
3-
41
use std::fmt;
52

63
fn main() {

0 commit comments

Comments
 (0)