Skip to content

Rollup of 11 pull requests #100511

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

Merged
merged 29 commits into from
Aug 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b5786dc
avoid some int2ptr casts in thread_local_key tests
RalfJung Aug 11, 2022
e182d12
Fix HIR pretty printing of let else
compiler-errors Aug 12, 2022
f94220f
Erase regions better in promote_candidate
compiler-errors Aug 12, 2022
43eda18
adapt test for msan message change
krasimirgg Aug 12, 2022
a65647a
remove Clean trait implementation for hir::PathSegment
GuillaumeGomez Aug 12, 2022
001cc12
remove Clean trait implementation for hir::BareFnTy
GuillaumeGomez Aug 12, 2022
dcead65
Make `[rust] use-lld=true` work on windows
khyperia Aug 12, 2022
2787eb0
Use different name for arity-2 `@has` and `@matches`
camelid Aug 10, 2022
01408fc
Rename `@{has,matches}-literal` to `...text`
camelid Aug 10, 2022
37eed1d
Update tests: arity-2 `@{has,matches}` -> `...text`
camelid Aug 10, 2022
13d5327
Rename `@hastext` to `@hasraw` (same for `matches`)
camelid Aug 10, 2022
9db6061
Fix line lengths
camelid Aug 11, 2022
52a1518
give a helpful diagnostic even when the next struct field has an attr…
chenyukang Aug 13, 2022
b34e240
Update `@!has` name in tests
camelid Aug 12, 2022
0d588e9
rustdoc: Fix incorrect usage of `@!has` and `@!matches`
camelid Aug 13, 2022
2dc9bf0
nicer Miri backtraces for from_exposed_addr
RalfJung Aug 13, 2022
40b1f61
move
BoxyUwU Aug 13, 2022
1ec2b9b
wf correctly shallow_resolve consts
lcnr Aug 13, 2022
4b51df3
Rollup merge of #100355 - camelid:has2-rename, r=GuillaumeGomez
compiler-errors Aug 13, 2022
ea42f3c
Rollup merge of #100407 - RalfJung:no-int2ptr, r=Mark-Simulacrum
compiler-errors Aug 13, 2022
2126cc6
Rollup merge of #100434 - compiler-errors:issue-100373, r=cjgillot
compiler-errors Aug 13, 2022
9ab54df
Rollup merge of #100438 - compiler-errors:issue-100360, r=lcnr
compiler-errors Aug 13, 2022
ef72484
Rollup merge of #100445 - krasimirgg:llvm-16-msan, r=tmiasko
compiler-errors Aug 13, 2022
b1d77dd
Rollup merge of #100447 - GuillaumeGomez:rm-clean-impl, r=Dylan-DPC
compiler-errors Aug 13, 2022
7a34d39
Rollup merge of #100464 - khyperia:lld-icf-on-windows, r=jyn514
compiler-errors Aug 13, 2022
29f905b
Rollup merge of #100475 - chenyukang:fix-100461, r=fee1-dead
compiler-errors Aug 13, 2022
aafaec3
Rollup merge of #100490 - lcnr:wf-consts, r=jackh726
compiler-errors Aug 13, 2022
f8bdd9c
Rollup merge of #100501 - RalfJung:miri-from-exposed-addr, r=Mark-Sim…
compiler-errors Aug 13, 2022
860e093
Rollup merge of #100509 - BoxyUwU:merge_hrtb_with_higher_rank_trait_b…
compiler-errors Aug 13, 2022
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
Next Next commit
avoid some int2ptr casts in thread_local_key tests
  • Loading branch information
RalfJung committed Aug 11, 2022
commit b5786dcae6c5a300f146fcbf6dab509d2cd48ec8
9 changes: 5 additions & 4 deletions library/std/src/sys_common/thread_local_key/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::{Key, StaticKey};
use core::ptr;

fn assert_sync<T: Sync>() {}
fn assert_send<T: Send>() {}
Expand All @@ -12,8 +13,8 @@ fn smoke() {
let k2 = Key::new(None);
assert!(k1.get().is_null());
assert!(k2.get().is_null());
k1.set(1 as *mut _);
k2.set(2 as *mut _);
k1.set(ptr::invalid_mut(1));
k2.set(ptr::invalid_mut(2));
assert_eq!(k1.get() as usize, 1);
assert_eq!(k2.get() as usize, 2);
}
Expand All @@ -26,8 +27,8 @@ fn statik() {
unsafe {
assert!(K1.get().is_null());
assert!(K2.get().is_null());
K1.set(1 as *mut _);
K2.set(2 as *mut _);
K1.set(ptr::invalid_mut(1));
K2.set(ptr::invalid_mut(2));
assert_eq!(K1.get() as usize, 1);
assert_eq!(K2.get() as usize, 2);
}
Expand Down