Skip to content

Rollup of 8 pull requests #136673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8b14227
add MSVC tuple providers
Walnut356 Jan 10, 2025
71b6d49
add MSVC slice providers
Walnut356 Jan 10, 2025
c425660
add msvc enum providers
Walnut356 Jan 11, 2025
009994a
organize lldb_commands
Walnut356 Jan 11, 2025
2b8ff75
add MSVC str providers
Walnut356 Jan 11, 2025
4f59533
add alternate inner type lookup for vec/string for missing template args
Walnut356 Jan 11, 2025
f725ad7
more robust tuple summary
Walnut356 Jan 11, 2025
0bf0817
More robust sequence formatter
Walnut356 Jan 11, 2025
a3adcd2
add alternate inner type lookup for hashmap/set when template args mi…
Walnut356 Jan 11, 2025
2be8812
tidy
Walnut356 Jan 11, 2025
e8c5e09
doc comment for get_template_args
Walnut356 Jan 12, 2025
0f12b8c
slots fix
Walnut356 Jan 19, 2025
77d36c7
Remove rustc-dev-guide
ehuss Jan 23, 2025
af8c33d
Update toolstate maintainers
ehuss Jan 23, 2025
724b885
pattern migration: move labels out of the suggestion struct
dianne Feb 3, 2025
bdc6c4d
reword pattern migration diagnostic to make sense in all editions
dianne Feb 3, 2025
bbe40ac
use more specific wording for subpatterns from macro expansions
dianne Feb 4, 2025
9202001
add tests for label formatting
dianne Feb 4, 2025
4331f55
highlight the whole problem subpattern when pointing out the default …
dianne Feb 4, 2025
203d310
experimentally label the spans for default binding modes
dianne Feb 4, 2025
a064e78
don't include trailing open parens in labels for reference patterns
dianne Feb 4, 2025
767f820
separate labels for default binding mode spans into their own notes
dianne Feb 5, 2025
a5cc4cb
reword default binding mode notes
dianne Feb 5, 2025
060cc37
peace of mind: remove a call to `Option::expect`
dianne Feb 5, 2025
b32a533
try to suggest eliding redundant binding modifiers
dianne Feb 5, 2025
8dcdb3e
peace of mind: be absolutely sure we don't try to emit a 0-part sugge…
dianne Feb 5, 2025
cac63ff
Only suggest unit for unit fallback when spans dont come from macro e…
compiler-errors Feb 5, 2025
eb9bba8
Walk into nested bodies when suggesting unit for unit fallback
compiler-errors Feb 5, 2025
f1e4d94
add more pattern migration tests
dianne Jan 31, 2025
d4914a7
replace one `.map_or(true, ...)` with `.is_none_or(...)`
WaffleLapkin Feb 6, 2025
3815ed6
Remove some unnecessary parens in `assert!` conditions
estebank Jan 23, 2025
da9a85a
stabilize `feature(trait_upcasting)`
WaffleLapkin Dec 16, 2024
a970a0d
change `deref_into_dyn_supertrait` lint wording
WaffleLapkin Dec 16, 2024
e9d5d11
remove `feature(trait_upcasting)` from tests and bless them
WaffleLapkin Dec 16, 2024
9e6d0b3
remove unstable book entry for `feature(trait_upcasting)`
WaffleLapkin Dec 16, 2024
3c94d3e
remove use of `feature(trait_upcasting)` from core tests
WaffleLapkin Dec 16, 2024
fd94542
remove use of `feature(trait_upcasting)` from miri
WaffleLapkin Dec 16, 2024
bc1d68e
adjust a comment
WaffleLapkin Jan 16, 2025
4915995
allow+update `deref_into_dyn_supertrait`
WaffleLapkin Feb 6, 2025
2a6b274
Remove dead code from rustc_codegen_llvm and the LLVM wrapper
dpaoliello Feb 6, 2025
fcd67f1
Rollup merge of #134367 - WaffleLapkin:trait_upcasting_as_a_treat, r=…
matthiaskrgr Feb 7, 2025
c77fdef
Rollup merge of #135354 - Walnut356:msvc_lldb, r=wesleywiser
matthiaskrgr Feb 7, 2025
5c7c10d
Rollup merge of #135940 - ehuss:toolstate-update, r=Mark-Simulacrum
matthiaskrgr Feb 7, 2025
f7e791a
Rollup merge of #135945 - estebank:useless-parens, r=compiler-errors
matthiaskrgr Feb 7, 2025
492711e
Rollup merge of #136577 - dianne:simple-pat-migration-simplification,…
matthiaskrgr Feb 7, 2025
303bc62
Rollup merge of #136598 - compiler-errors:unit-fallback, r=WaffleLapkin
matthiaskrgr Feb 7, 2025
85aec92
Rollup merge of #136653 - dpaoliello:cleanllvm1, r=Zalathar
matthiaskrgr Feb 7, 2025
9541ce1
Rollup merge of #136664 - WaffleLapkin:un-map_or-true, r=compiler-errors
matthiaskrgr Feb 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions library/alloc/tests/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2297,21 +2297,21 @@ fn utf8_chars() {
assert_eq!(schs.len(), 4);
assert_eq!(schs.iter().cloned().collect::<String>(), s);

assert!((from_utf8(s.as_bytes()).is_ok()));
assert!(from_utf8(s.as_bytes()).is_ok());
// invalid prefix
assert!((!from_utf8(&[0x80]).is_ok()));
assert!(!from_utf8(&[0x80]).is_ok());
// invalid 2 byte prefix
assert!((!from_utf8(&[0xc0]).is_ok()));
assert!((!from_utf8(&[0xc0, 0x10]).is_ok()));
assert!(!from_utf8(&[0xc0]).is_ok());
assert!(!from_utf8(&[0xc0, 0x10]).is_ok());
// invalid 3 byte prefix
assert!((!from_utf8(&[0xe0]).is_ok()));
assert!((!from_utf8(&[0xe0, 0x10]).is_ok()));
assert!((!from_utf8(&[0xe0, 0xff, 0x10]).is_ok()));
assert!(!from_utf8(&[0xe0]).is_ok());
assert!(!from_utf8(&[0xe0, 0x10]).is_ok());
assert!(!from_utf8(&[0xe0, 0xff, 0x10]).is_ok());
// invalid 4 byte prefix
assert!((!from_utf8(&[0xf0]).is_ok()));
assert!((!from_utf8(&[0xf0, 0x10]).is_ok()));
assert!((!from_utf8(&[0xf0, 0xff, 0x10]).is_ok()));
assert!((!from_utf8(&[0xf0, 0xff, 0xff, 0x10]).is_ok()));
assert!(!from_utf8(&[0xf0]).is_ok());
assert!(!from_utf8(&[0xf0, 0x10]).is_ok());
assert!(!from_utf8(&[0xf0, 0xff, 0x10]).is_ok());
assert!(!from_utf8(&[0xf0, 0xff, 0xff, 0x10]).is_ok());
}

#[test]
Expand Down
8 changes: 4 additions & 4 deletions library/coretests/tests/bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ fn test_bool() {
#[test]
pub fn test_bool_not() {
if !false {
assert!((true));
assert!(true);
} else {
assert!((false));
assert!(false);
}
if !true {
assert!((false));
assert!(false);
} else {
assert!((true));
assert!(true);
}
}

Expand Down
6 changes: 3 additions & 3 deletions library/coretests/tests/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ fn test() {
let mut v1 = vec![0u16, 0u16, 0u16];

copy(v0.as_ptr().offset(1), v1.as_mut_ptr().offset(1), 1);
assert!((v1[0] == 0u16 && v1[1] == 32001u16 && v1[2] == 0u16));
assert!(v1[0] == 0u16 && v1[1] == 32001u16 && v1[2] == 0u16);
copy(v0.as_ptr().offset(2), v1.as_mut_ptr(), 1);
assert!((v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 0u16));
assert!(v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 0u16);
copy(v0.as_ptr(), v1.as_mut_ptr().offset(2), 1);
assert!((v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 32000u16));
assert!(v1[0] == 32002u16 && v1[1] == 32001u16 && v1[2] == 32000u16);
}
}

Expand Down
4 changes: 2 additions & 2 deletions library/std/tests/istr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fn test_stack_assign() {
let t: String = "a".to_string();
assert_eq!(s, t);
let u: String = "b".to_string();
assert!((s != u));
assert!(s != u);
}

#[test]
Expand All @@ -19,7 +19,7 @@ fn test_heap_assign() {
let t: String = "a big ol' string".to_string();
assert_eq!(s, t);
let u: String = "a bad ol' string".to_string();
assert!((s != u));
assert!(s != u);
}

#[test]
Expand Down
22 changes: 11 additions & 11 deletions library/std/tests/seq-compare.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#[test]
fn seq_compare() {
assert!(("hello".to_string() < "hellr".to_string()));
assert!(("hello ".to_string() > "hello".to_string()));
assert!(("hello".to_string() != "there".to_string()));
assert!((vec![1, 2, 3, 4] > vec![1, 2, 3]));
assert!((vec![1, 2, 3] < vec![1, 2, 3, 4]));
assert!((vec![1, 2, 4, 4] > vec![1, 2, 3, 4]));
assert!((vec![1, 2, 3, 4] < vec![1, 2, 4, 4]));
assert!((vec![1, 2, 3] <= vec![1, 2, 3]));
assert!((vec![1, 2, 3] <= vec![1, 2, 3, 3]));
assert!((vec![1, 2, 3, 4] > vec![1, 2, 3]));
assert!("hello".to_string() < "hellr".to_string());
assert!("hello ".to_string() > "hello".to_string());
assert!("hello".to_string() != "there".to_string());
assert!(vec![1, 2, 3, 4] > vec![1, 2, 3]);
assert!(vec![1, 2, 3] < vec![1, 2, 3, 4]);
assert!(vec![1, 2, 4, 4] > vec![1, 2, 3, 4]);
assert!(vec![1, 2, 3, 4] < vec![1, 2, 4, 4]);
assert!(vec![1, 2, 3] <= vec![1, 2, 3]);
assert!(vec![1, 2, 3] <= vec![1, 2, 3, 3]);
assert!(vec![1, 2, 3, 4] > vec![1, 2, 3]);
assert_eq!(vec![1, 2, 3], vec![1, 2, 3]);
assert!((vec![1, 2, 3] != vec![1, 1, 3]));
assert!(vec![1, 2, 3] != vec![1, 1, 3]);
}
30 changes: 15 additions & 15 deletions src/tools/miri/tests/pass/binops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

fn test_nil() {
assert_eq!((), ());
assert!((!(() != ())));
assert!((!(() < ())));
assert!((() <= ()));
assert!((!(() > ())));
assert!((() >= ()));
assert!(!(() != ()));
assert!(!(() < ()));
assert!(() <= ());
assert!(!(() > ()));
assert!(() >= ());
}

fn test_bool() {
assert!((!(true < false)));
assert!((!(true <= false)));
assert!((true > false));
assert!((true >= false));
assert!(!(true < false));
assert!(!(true <= false));
assert!(true > false);
assert!(true >= false);

assert!((false < true));
assert!((false <= true));
assert!((!(false > true)));
assert!((!(false >= true)));
assert!(false < true);
assert!(false <= true);
assert!(!(false > true));
assert!(!(false >= true));

// Bools support bitwise binops
assert_eq!(false & false, false);
Expand Down Expand Up @@ -65,9 +65,9 @@ fn test_class() {

assert_eq!(q, r);
r.y = 17;
assert!((r.y != q.y));
assert!(r.y != q.y);
assert_eq!(r.y, 17);
assert!((q != r));
assert!(q != r);
}

pub fn main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/binding/expr-match-generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type compare<T> = extern "Rust" fn(T, T) -> bool;

fn test_generic<T:Clone>(expected: T, eq: compare<T>) {
let actual: T = match true { true => { expected.clone() }, _ => panic!("wat") };
assert!((eq(expected, actual)));
assert!(eq(expected, actual));
}

fn test_bool() {
Expand Down
13 changes: 5 additions & 8 deletions tests/ui/binding/expr-match.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
//@ run-pass




// Tests for using match as an expression

fn test_basic() {
let mut rs: bool = match true { true => { true } false => { false } };
assert!((rs));
assert!(rs);
rs = match false { true => { false } false => { true } };
assert!((rs));
assert!(rs);
}

fn test_inferrence() {
let rs = match true { true => { true } false => { false } };
assert!((rs));
assert!(rs);
}

fn test_alt_as_alt_head() {
Expand All @@ -25,7 +22,7 @@ fn test_alt_as_alt_head() {
true => { false }
false => { true }
};
assert!((rs));
assert!(rs);
}

fn test_alt_as_block_result() {
Expand All @@ -34,7 +31,7 @@ fn test_alt_as_block_result() {
true => { false }
false => { match true { true => { true } false => { false } } }
};
assert!((rs));
assert!(rs);
}

pub fn main() {
Expand Down
30 changes: 15 additions & 15 deletions tests/ui/binop/binops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

fn test_nil() {
assert_eq!((), ());
assert!((!(() != ())));
assert!((!(() < ())));
assert!((() <= ()));
assert!((!(() > ())));
assert!((() >= ()));
assert!(!(() != ()));
assert!(!(() < ()));
assert!(() <= ());
assert!(!(() > ()));
assert!(() >= ());
}

fn test_bool() {
assert!((!(true < false)));
assert!((!(true <= false)));
assert!((true > false));
assert!((true >= false));
assert!(!(true < false));
assert!(!(true <= false));
assert!(true > false);
assert!(true >= false);

assert!((false < true));
assert!((false <= true));
assert!((!(false > true)));
assert!((!(false >= true)));
assert!(false < true);
assert!(false <= true);
assert!(!(false > true));
assert!(!(false >= true));

// Bools support bitwise binops
assert_eq!(false & false, false);
Expand Down Expand Up @@ -76,9 +76,9 @@ fn test_class() {
}
assert_eq!(q, r);
r.y = 17;
assert!((r.y != q.y));
assert!(r.y != q.y);
assert_eq!(r.y, 17);
assert!((q != r));
assert!(q != r);
}

pub fn main() {
Expand Down
14 changes: 7 additions & 7 deletions tests/ui/binop/structured-compare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ pub fn main() {
let a = (1, 2, 3);
let b = (1, 2, 3);
assert_eq!(a, b);
assert!((a != (1, 2, 4)));
assert!((a < (1, 2, 4)));
assert!((a <= (1, 2, 4)));
assert!(((1, 2, 4) > a));
assert!(((1, 2, 4) >= a));
assert!(a != (1, 2, 4));
assert!(a < (1, 2, 4));
assert!(a <= (1, 2, 4));
assert!((1, 2, 4) > a);
assert!((1, 2, 4) >= a);
let x = foo::large;
let y = foo::small;
assert!((x != y));
assert!(x != y);
assert_eq!(x, foo::large);
assert!((x != foo::small));
assert!(x != foo::small);
}
2 changes: 1 addition & 1 deletion tests/ui/cfg/conditional-compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn main() {
pub fn main() {
// Exercise some of the configured items in ways that wouldn't be possible
// if they had the FALSE definition
assert!((b));
assert!(b);
let _x: t = true;
let _y: tg = tg::bar;

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/expr/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Tests for standalone blocks as expressions

fn test_basic() { let rs: bool = { true }; assert!((rs)); }
fn test_basic() { let rs: bool = { true }; assert!(rs); }

struct RS { v1: isize, v2: isize }

Expand Down
18 changes: 9 additions & 9 deletions tests/ui/expr/if/expr-if.rs
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
//@ run-pass
// Tests for if as expressions

fn test_if() { let rs: bool = if true { true } else { false }; assert!((rs)); }
fn test_if() { let rs: bool = if true { true } else { false }; assert!(rs); }

fn test_else() {
let rs: bool = if false { false } else { true };
assert!((rs));
assert!(rs);
}

fn test_elseif1() {
let rs: bool = if true { true } else if true { false } else { false };
assert!((rs));
assert!(rs);
}

fn test_elseif2() {
let rs: bool = if false { false } else if true { true } else { false };
assert!((rs));
assert!(rs);
}

fn test_elseif3() {
let rs: bool = if false { false } else if false { false } else { true };
assert!((rs));
assert!(rs);
}

fn test_inferrence() {
let rs = if true { true } else { false };
assert!((rs));
assert!(rs);
}

fn test_if_as_if_condition() {
let rs1 = if if false { false } else { true } { true } else { false };
assert!((rs1));
assert!(rs1);
let rs2 = if if true { false } else { true } { false } else { true };
assert!((rs2));
assert!(rs2);
}

fn test_if_as_block_result() {
let rs = if true { if false { false } else { true } } else { false };
assert!((rs));
assert!(rs);
}

pub fn main() {
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/for-loop-while/break.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ pub fn main() {
assert_eq!(i, 20);
let xs = [1, 2, 3, 4, 5, 6];
for x in &xs {
if *x == 3 { break; } assert!((*x <= 3));
if *x == 3 { break; } assert!(*x <= 3);
}
i = 0;
while i < 10 { i += 1; if i % 2 == 0 { continue; } assert!((i % 2 != 0)); }
while i < 10 { i += 1; if i % 2 == 0 { continue; } assert!(i % 2 != 0); }
i = 0;
loop {
i += 1; if i % 2 == 0 { continue; } assert!((i % 2 != 0));
i += 1; if i % 2 == 0 { continue; } assert!(i % 2 != 0);
if i >= 10 { break; }
}
let ys = vec![1, 2, 3, 4, 5, 6];
for x in &ys {
if *x % 2 == 0 { continue; }
assert!((*x % 2 != 0));
assert!(*x % 2 != 0);
}
}
2 changes: 1 addition & 1 deletion tests/ui/for-loop-while/while-cont.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pub fn main() {
let mut i = 1;
while i > 0 {
assert!((i > 0));
assert!(i > 0);
println!("{}", i);
i -= 1;
continue;
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/for-loop-while/while-loop-constraints-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ pub fn main() {
while false { x = y; y = z; }
println!("{}", y);
}
assert!((y == 42 && z == 50));
assert!(y == 42 && z == 50);
}
Loading