Skip to content
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

Improve Style #67221

Closed
wants to merge 49 commits into from
Closed
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9ef9015
Improve Style
PirateDragon Dec 11, 2019
c2d6f0a
Merge pull request #2 from rust-lang/master
PirateDragon Dec 13, 2019
b45e03c
Clarify `Box<T>` representation and its use in FFI
stephaneyfx Jul 9, 2019
f39b864
Update Box representation comment based on reviews
stephaneyfx Aug 26, 2019
1ce980e
Update FFI example
stephaneyfx Oct 30, 2019
c404b4c
Optimize Ord trait implementation for bool
Nov 29, 2019
2845b55
Document usage of unsafe block
Dec 2, 2019
69a2249
rustc: include ParamEnv in global trait select/eval cache keys.
eddyb Nov 27, 2019
e05236b
rustc: allow non-empty ParamEnv's in global trait select/eval caches.
eddyb Dec 2, 2019
eac3b0a
Fix #66295
weiznich Dec 3, 2019
dcd0468
Apply suggestions from code review
weiznich Dec 3, 2019
5d320c6
Remove failing test case
weiznich Dec 6, 2019
c14ad54
const-prop: Restrict scalar pair propagation
osa1 Dec 5, 2019
6e4788a
async/await: more improvements to non-send errors
davidtwco Oct 6, 2019
891ab30
async/await: correct diag note for `async move`
davidtwco Oct 31, 2019
95f2ca0
Bootstrap: change logic for choosing linker and rpath
Dec 9, 2019
cac6e98
Remove `checked_add` in `Layout::repeat`
kraai Dec 9, 2019
e3e3e0f
Add options to --extern flag.
ehuss Dec 5, 2019
5ee69bb
compiletest: add aux-crate directive
ehuss Dec 6, 2019
dd08bf7
Ensure that unevaluated constants of type `!` are present in the MIR
matthewjasper Dec 8, 2019
c96fd6f
Make const index and subslice array projections more useful
matthewjasper Nov 22, 2019
1678550
Remove `uniform_array_move_out` passes
matthewjasper Nov 22, 2019
4793a34
Check for `ConstantIndex` move paths correctly in borrowck
matthewjasper Nov 22, 2019
d6f1279
Add more tests for borrowck and dropck slice pattern handling
matthewjasper Nov 22, 2019
4e2ac67
Use Niko's wording
stephaneyfx Dec 10, 2019
6699d58
Specify behavior when passed a null pointer
stephaneyfx Dec 10, 2019
182becc
Remove trailing whitespace
stephaneyfx Dec 10, 2019
2f8b040
Make it executable
JohnTitor Dec 10, 2019
453605d
Add better documentation for unsafe block
Dec 10, 2019
ed28f79
Optimize `shallow_resolve_changed`.
nnethercote Dec 6, 2019
4d77427
Change `PendingPredicateObligation::stalled_on`'s type.
nnethercote Dec 6, 2019
62d372c
Fix `-Z print-type-sizes`'s handling of zero-sized fields.
nnethercote Dec 11, 2019
8219c6f
Fix description based on review
stephaneyfx Dec 11, 2019
147c7cd
Apply review suggestions
weiznich Dec 11, 2019
b10ffdb
Improve Style
PirateDragon Dec 11, 2019
f48f742
clarify that `Box<T>` should only be used when defined *in Rust*
Dec 11, 2019
cb8871d
Remove irelevant comment on `register_dtor`
Dec 11, 2019
8db343f
erase regions instead of using `builtin_deref`
Dec 11, 2019
e86f974
resolve: Always resolve visibilities on impl items
petrochenkov Dec 11, 2019
42cc1d7
Some small readability improvements
llogiq Dec 11, 2019
6c5047d
Small Cow improvements
llogiq Dec 11, 2019
7bb1606
Make TinyList::remove iterate instead of recurse
llogiq Dec 11, 2019
93adec3
get rid of nll submod
mark-i-m Nov 30, 2019
7e530df
fix imports
mark-i-m Nov 30, 2019
4529d78
tidy
mark-i-m Nov 30, 2019
fd07d5f
fix imports
mark-i-m Dec 5, 2019
2e3072d
more private
mark-i-m Dec 6, 2019
f1637a4
fix imports after rebase
mark-i-m Dec 9, 2019
f57b003
Merge branch 'master' of https://github.com/PirateDragon/rust
PirateDragon Dec 16, 2019
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
12 changes: 6 additions & 6 deletions src/libcore/task/wake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ impl RawWaker {
/// function in the `vtable` of the underlying `RawWaker` will be called.
#[rustc_promotable]
#[stable(feature = "futures_api", since = "1.36.0")]
pub const fn new(data: *const (), vtable: &'static RawWakerVTable) -> RawWaker {
RawWaker { data, vtable }
pub const fn new(data: *const (), vtable: &'static RawWakerVTable) -> Self {
Self { data, vtable }
}
}

Expand Down Expand Up @@ -180,7 +180,7 @@ impl<'a> Context<'a> {
#[stable(feature = "futures_api", since = "1.36.0")]
#[inline]
pub fn from_waker(waker: &'a Waker) -> Self {
Context { waker, _marker: PhantomData }
Self { waker, _marker: PhantomData }
}

/// Returns a reference to the `Waker` for the current task.
Expand Down Expand Up @@ -277,16 +277,16 @@ impl Waker {
/// [`RawWakerVTable`]: struct.RawWakerVTable.html
#[inline]
#[stable(feature = "futures_api", since = "1.36.0")]
pub unsafe fn from_raw(waker: RawWaker) -> Waker {
Waker { waker }
pub unsafe fn from_raw(waker: RawWaker) -> Self {
Self { waker }
}
}

#[stable(feature = "futures_api", since = "1.36.0")]
impl Clone for Waker {
#[inline]
fn clone(&self) -> Self {
Waker {
Self {
// SAFETY: This is safe because `Waker::from_raw` is the only way
// to initialize `clone` and `data` requiring the user to acknowledge
// that the contract of [`RawWaker`] is upheld.
Expand Down