forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#134666 - matthiaskrgr:rollup-whe0chp, r=matth…
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#130289 (docs: Permissions.readonly() also ignores root user special permissions) - rust-lang#134583 (docs: `transmute<&mut T, &mut MaybeUninit<T>>` is unsound when exposed to safe code) - rust-lang#134611 (Align `{i686,x86_64}-win7-windows-msvc` to their parent targets) - rust-lang#134629 (compiletest: Allow using a specific debugger when running debuginfo tests) - rust-lang#134642 (Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and `SyncUnsafeCell`.) - rust-lang#134660 (Fix spacing of markdown code block fences in compiler rustdoc) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
13 changed files
with
125 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
compiler/rustc_target/src/spec/targets/x86_64_win7_windows_msvc.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// This test with Cell also indirectly exercises UnsafeCell in dyn*. | ||
// | ||
//@ run-pass | ||
|
||
#![feature(dyn_star)] | ||
#![allow(incomplete_features)] | ||
|
||
use std::cell::Cell; | ||
|
||
trait Rw<T> { | ||
fn read(&self) -> T; | ||
fn write(&self, v: T); | ||
} | ||
|
||
impl<T: Copy> Rw<T> for Cell<T> { | ||
fn read(&self) -> T { | ||
self.get() | ||
} | ||
fn write(&self, v: T) { | ||
self.set(v) | ||
} | ||
} | ||
|
||
fn make_dyn_star() -> dyn* Rw<usize> { | ||
Cell::new(42usize) as dyn* Rw<usize> | ||
} | ||
|
||
fn main() { | ||
let x = make_dyn_star(); | ||
|
||
assert_eq!(x.read(), 42); | ||
x.write(24); | ||
assert_eq!(x.read(), 24); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters