Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d1add97
Auto merge of #57696 - rust-lang:beta-next, r=Mark-Simulacrum
bors Jan 17, 2019
79a942b
Update beta to released compiler
Mark-Simulacrum Jan 19, 2019
ad5d12b
beta: Update RLS version to 1.33
Xanewok Jan 19, 2019
5209162
Auto merge of #57763 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
bors Jan 20, 2019
4df66ba
Auto merge of #57766 - Xanewok:beta-rls-version-bump, r=pietroalbini
bors Jan 21, 2019
f9b492f
make sure to accept all android licenses
pietroalbini Jan 23, 2019
dc52f0f
Fix issue 57762
tromey Jan 22, 2019
676ade5
Simplify the version check
tromey Jan 22, 2019
1652c7d
Fix typo bug in DepGraph::try_mark_green().
michaelwoerister Jan 17, 2019
635817b
Auto merge of #57878 - pietroalbini:beta-backports, r=pietroalbini
bors Jan 24, 2019
2cccf59
rustbuild: fix build with rust 1.33
Keruspe Jan 30, 2019
1045131
Auto merge of #57990 - Keruspe:beta, r=alexcrichton
bors Jan 31, 2019
b8527ab
Pass correct arguments to places_conflict
matthewjasper Jan 30, 2019
1983205
Don't panic when accessing enum variant ctor using `Self` in match
estebank Jan 30, 2019
872c966
Fix bug in integer range matching
varkor Feb 1, 2019
edb41d8
Build the standard library for thumbv7neon-unknown-linux-gnueabihf in CI
hsivonen Jan 28, 2019
13542d8
Fix release manifest generation
Jan 16, 2019
b203178
Auto merge of #58159 - pietroalbini:beta-backports, r=pietroalbini
bors Feb 5, 2019
81571bf
libpanic_unwind => 2018: fix ICEs.
Centril Feb 12, 2019
08f1073
Auto merge of #58501 - oli-obk:beta, r=eddyb
bors Feb 16, 2019
119335e
[BETA] Update cargo
ehuss Feb 16, 2019
94ca417
Make `intern_lazy_const` actually intern its argument.
nnethercote Feb 6, 2019
04d6d7b
Lower constant patterns with ascribed types.
davidtwco Feb 4, 2019
8a1b7da
#56411 do not suggest a fix for a import conflict in a macro
mockersf Dec 18, 2018
e4120ee
Address review comments and cleanup code
petrochenkov Jan 25, 2019
5f39bc7
Do not initiate nested probe within `assemble_probe`.
pnkfelix Jan 22, 2019
d820e21
unit test for issue 57673.
pnkfelix Jan 22, 2019
d30f5be
add some comments to method::probe::Candidate
arielb1 Jan 28, 2019
552e2fa
add tests to a few edge cases in method lookup
arielb1 Jan 28, 2019
062e817
avoid committing to autoderef in object method probing
arielb1 Jan 28, 2019
e583c62
Fixes text becoming invisible when element targetted
GuillaumeGomez Jan 15, 2019
bbe9e21
Rollup merge of #58522 - ehuss:update-beta-cargo, r=pietroalbini
pietroalbini Feb 17, 2019
1f84156
Auto merge of #58537 - pietroalbini:beta-backports, r=pietroalbini
bors Feb 20, 2019
f22755f
Fix #57979 by allowing a legitimate type error to take precedence ove…
pnkfelix Feb 22, 2019
687c449
make generalization code create new variables in correct universe
nikomatsakis Feb 1, 2019
f599ab6
s/skol_/placeholder_/
nikomatsakis Feb 20, 2019
4916c8f
reintroduce `commit_if_ok` call into `higher_ranked_sub`
nikomatsakis Feb 19, 2019
2a8c36c
reintroduce `commit_if_ok` calls to `subtype_predicate`
nikomatsakis Feb 19, 2019
3693f18
introduce a dummy leak check and invoke it in all the right places
nikomatsakis Feb 20, 2019
85a24b1
restore the actual leak-check
nikomatsakis Feb 20, 2019
542ad5e
update test files to reflect new output
nikomatsakis Feb 20, 2019
551aafc
partially revert 904a0bde93f0348f69914ee90b1f8b6e4e0d7cbc
nikomatsakis Feb 21, 2019
600ca1e
improve Pin documentation
RalfJung Feb 22, 2019
fdd5467
Updated RELEASES.md for 1.33.0
Feb 6, 2019
a63575c
Fix invalid background color
GuillaumeGomez Jan 23, 2019
5c6eb4e
Fix non-clickable urls
GuillaumeGomez Jan 17, 2019
bb2d0ea
Auto merge of #58656 - Mark-Simulacrum:beta-rollups, r=pietroalbini
bors Feb 23, 2019
ab4c12a
stable 1.33.0 release
pietroalbini Feb 25, 2019
b270e14
Auto merge of #58721 - pietroalbini:stable-1.33.0, r=pietroalbini
bors Feb 25, 2019
e48ffae
Fix release note problems noticed after merging.
Mark-Simulacrum Feb 28, 2019
bd1f032
Permit unwinding through FFI by default
Mark-Simulacrum Feb 28, 2019
2aa4c46
Auto merge of #58795 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
bors Feb 28, 2019
be89474
58982 fix incorrect error diagnostic
pmccarter Mar 24, 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
Prev Previous commit
Next Next commit
improve Pin documentation
Incorporates a bunch of the documentation-related comments that came up when discussing `Pin` stabilization.
  • Loading branch information
RalfJung authored and nikomatsakis committed Feb 22, 2019
commit 600ca1ecb09a3811d083366c418169d9f07a6668
27 changes: 18 additions & 9 deletions src/libcore/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,34 +597,43 @@ unsafe impl<T: ?Sized> Freeze for &mut T {}

/// Types which can be safely moved after being pinned.
///
/// Since Rust itself has no notion of immovable types, and will consider moves to always be safe,
/// Since Rust itself has no notion of immovable types, and considers moves
/// (e.g. through assignment or [`mem::replace`]) to always be safe,
/// this trait cannot prevent types from moving by itself.
///
/// Instead it can be used to prevent moves through the type system,
/// by controlling the behavior of pointers wrapped in the [`Pin`] wrapper,
/// Instead it is used to prevent moves through the type system,
/// by controlling the behavior of pointers `P` wrapped in the [`Pin<P>`] wrapper,
/// which "pin" the type in place by not allowing it to be moved out of them.
/// See the [`pin module`] documentation for more information on pinning.
///
/// Implementing this trait lifts the restrictions of pinning off a type,
/// which then allows it to move out with functions such as [`replace`].
/// which then allows it to move out with functions such as [`mem::replace`].
///
/// `Unpin` has no consequence at all for non-pinned data. In particular,
/// [`mem::replace`] happily moves `!Unpin` data (it works for any `&mut T`, not
/// just when `T: Unpin`). However, you cannot use
/// [`mem::replace`] on data wrapped inside a [`Pin<P>`] because you cannot get the
/// `&mut T` you need for that, and *that* is what makes this system work.
///
/// So this, for example, can only be done on types implementing `Unpin`:
///
/// ```rust
/// use std::mem::replace;
/// use std::mem;
/// use std::pin::Pin;
///
/// let mut string = "this".to_string();
/// let mut pinned_string = Pin::new(&mut string);
///
/// // dereferencing the pointer mutably is only possible because String implements Unpin
/// replace(&mut *pinned_string, "other".to_string());
/// // We need a mutable reference to call `mem::replace`.
/// // We can obtain such a reference by (implicitly) invoking `Pin::deref_mut`,
/// // but that is only possible because `String` implements `Unpin`.
/// mem::replace(&mut *pinned_string, "other".to_string());
/// ```
///
/// This trait is automatically implemented for almost every type.
///
/// [`replace`]: ../../std/mem/fn.replace.html
/// [`Pin`]: ../pin/struct.Pin.html
/// [`mem::replace`]: ../../std/mem/fn.replace.html
/// [`Pin<P>`]: ../pin/struct.Pin.html
/// [`pin module`]: ../../std/pin/index.html
#[stable(feature = "pin", since = "1.33.0")]
pub auto trait Unpin {}
Expand Down
Loading