From 7bd2b224344b91d059969299e3b2805d5f2d8243 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 22 Jan 2024 12:23:50 +0000 Subject: [PATCH 1/2] Revert "Auto merge of #118133 - Urgau:stabilize_trait_upcasting, r=WaffleLapkin" This reverts commit 6d2b84b3ed7848fd91b8d6151d4451b3103ed816, reversing changes made to 73bc12199ea8c7651ed98b069c0dd6b0bb5fabcf. --- src/lib.rs | 2 +- tests/fail/dyn-upcast-trait-mismatch.rs | 3 +++ tests/pass/box-custom-alloc.rs | 3 ++- tests/pass/dyn-upcast.rs | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 80a47c8526..b0b6d99436 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ #![feature(nonzero_ops)] #![feature(let_chains)] #![feature(lint_reasons)] -#![feature(int_roundings)] +#![cfg_attr(not(bootstrap), feature(trait_upcasting))] // Configure clippy and other lints #![allow( clippy::collapsible_else_if, diff --git a/tests/fail/dyn-upcast-trait-mismatch.rs b/tests/fail/dyn-upcast-trait-mismatch.rs index 7d46ecd8f6..648ac07c43 100644 --- a/tests/fail/dyn-upcast-trait-mismatch.rs +++ b/tests/fail/dyn-upcast-trait-mismatch.rs @@ -1,3 +1,6 @@ +#![feature(trait_upcasting)] +#![allow(incomplete_features)] + trait Foo: PartialEq + std::fmt::Debug + Send + Sync { fn a(&self) -> i32 { 10 diff --git a/tests/pass/box-custom-alloc.rs b/tests/pass/box-custom-alloc.rs index 75b512f6f7..8d6da0733f 100644 --- a/tests/pass/box-custom-alloc.rs +++ b/tests/pass/box-custom-alloc.rs @@ -1,6 +1,7 @@ //@revisions: stack tree //@[tree]compile-flags: -Zmiri-tree-borrows -#![feature(allocator_api)] +#![allow(incomplete_features)] // for trait upcasting +#![feature(allocator_api, trait_upcasting)] use std::alloc::Layout; use std::alloc::{AllocError, Allocator}; diff --git a/tests/pass/dyn-upcast.rs b/tests/pass/dyn-upcast.rs index ddaefeca3a..8432012a9b 100644 --- a/tests/pass/dyn-upcast.rs +++ b/tests/pass/dyn-upcast.rs @@ -1,3 +1,6 @@ +#![feature(trait_upcasting)] +#![allow(incomplete_features)] + fn main() { basic(); diamond(); From 92c6459a849a71e14df7ba579cec57f577bf8dd8 Mon Sep 17 00:00:00 2001 From: The Miri Conjob Bot Date: Tue, 23 Jan 2024 04:55:07 +0000 Subject: [PATCH 2/2] Preparing for merge from rustc --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index aa05d224c2..ceaabd38e4 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -867d39cdf625e4db4b381faff993346582e598b4 +0011fac90d2846ea3c04506238ff6e4ed3ce0efe