Skip to content

Commit b264e12

Browse files
committed
Auto merge of #136697 - matthiaskrgr:rollup-eww4vl9, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #134367 (Stabilize `feature(trait_upcasting)`) - #135940 (Update toolstate maintainers) - #135945 (Remove some unnecessary parens in `assert!` conditions) - #136577 (Pattern Migration 2024: try to suggest eliding redundant binding modifiers) - #136598 (Fix suggestion for `dependency_on_unit_never_type_fallback` involving closures + format args expansions) - #136653 (Remove dead code from rustc_codegen_llvm and the LLVM wrapper) - #136664 (replace one `.map_or(true, ...)` with `.is_none_or(...)`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents ab47de2 + 0f8b337 commit b264e12

File tree

5 files changed

+17
-24
lines changed

5 files changed

+17
-24
lines changed

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)]

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 {

tests/pass/binops.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
fn test_nil() {
44
assert_eq!((), ());
5-
assert!((!(() != ())));
6-
assert!((!(() < ())));
7-
assert!((() <= ()));
8-
assert!((!(() > ())));
9-
assert!((() >= ()));
5+
assert!(!(() != ()));
6+
assert!(!(() < ()));
7+
assert!(() <= ());
8+
assert!(!(() > ()));
9+
assert!(() >= ());
1010
}
1111

1212
fn test_bool() {
13-
assert!((!(true < false)));
14-
assert!((!(true <= false)));
15-
assert!((true > false));
16-
assert!((true >= false));
13+
assert!(!(true < false));
14+
assert!(!(true <= false));
15+
assert!(true > false);
16+
assert!(true >= false);
1717

18-
assert!((false < true));
19-
assert!((false <= true));
20-
assert!((!(false > true)));
21-
assert!((!(false >= true)));
18+
assert!(false < true);
19+
assert!(false <= true);
20+
assert!(!(false > true));
21+
assert!(!(false >= true));
2222

2323
// Bools support bitwise binops
2424
assert_eq!(false & false, false);
@@ -65,9 +65,9 @@ fn test_class() {
6565

6666
assert_eq!(q, r);
6767
r.y = 17;
68-
assert!((r.y != q.y));
68+
assert!(r.y != q.y);
6969
assert_eq!(r.y, 17);
70-
assert!((q != r));
70+
assert!(q != r);
7171
}
7272

7373
pub fn main() {

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;

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)