Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6f6620b
Rename "cyclone" to "apple-a7" per changes in upstream LLVM
trevyn Jun 7, 2020
95c4899
Added an example where explicitly dropping a lock is necessary/a good…
poliorcetics Jun 7, 2020
9c8f881
Improved the example to work with mutable data, providing a reason fo…
poliorcetics Jun 7, 2020
fdef1a5
Simply use drop instead of std::mem::drop
poliorcetics Jun 8, 2020
496818c
Add methods to go from a nul-terminated Vec<u8> to a CString, checked…
poliorcetics Jun 8, 2020
b03164e
Move to unstable, linking the issue
poliorcetics Jun 9, 2020
1312d30
Remove a lot of unecessary/duplicated comments
poliorcetics Jun 9, 2020
88ea7e5
Use min_specialization in the remaining rustc crates
matthewjasper Jun 1, 2020
c29b3fa
On recursive ADT, provide indirection structured suggestion
estebank May 29, 2020
7cde07e
review comments: only suggest one substitution
estebank May 31, 2020
03552ec
fix rebase
estebank Jun 10, 2020
7f3bb39
Add a TryFrom<Vec<u8>> impl that mirror from_vec_with_nul
poliorcetics Jun 10, 2020
6b95526
Fix the link in the TryFrom impl
poliorcetics Jun 11, 2020
871513d
make miri memory TyCtxtAt a TyCtxt
RalfJung Jun 1, 2020
dc6ffae
make miri InterpCx TyCtxtAt a TyCtxt, and separately remember the roo…
RalfJung Jun 1, 2020
0ac6fd0
fix const_prop spans and re-bless tests
RalfJung Jun 1, 2020
32b01c7
avoid computing cur_span all the time
RalfJung Jun 11, 2020
c0aef6d
Remove vestigial CI job msvc-aux.
ehuss Jun 12, 2020
8b20928
Stabilize Option::zip
tesuji Jun 13, 2020
c45231c
Revert heterogeneous SocketAddr PartialEq impls
dtolnay Jun 13, 2020
6049650
avoid computing precise span for const_eval query
RalfJung Jun 13, 2020
c6512fd
run const_eval_raw with root_span
RalfJung Jun 13, 2020
f747073
Apply suggestions from code review
poliorcetics Jun 13, 2020
34b3ff0
Clarify the scope-related explanation
poliorcetics Jun 13, 2020
c010e71
Rewrap comments in Mutex example
dtolnay Jun 13, 2020
204c236
Add test for comparing SocketAddr with inferred right-hand side
dtolnay Jun 13, 2020
71d41d9
add TcpListener support for HermitCore
stlankes Jun 13, 2020
c99116a
remove unused function
stlankes Jun 13, 2020
fd86a84
use latest interface to HermitCore
stlankes Jun 13, 2020
2210abe
keep root_span and tcx together
RalfJung Jun 14, 2020
5f4eb27
Removing the TryFrom impl
poliorcetics Jun 14, 2020
685f066
Add a new error type for the new method
poliorcetics Jun 14, 2020
47cc5cc
Update to use the new error type and correctly compile the doc tests
poliorcetics Jun 14, 2020
d221ffc
simplify conversion to IpAddr::V6
stlankes Jun 14, 2020
9d596b5
changes to pass the format check
stlankes Jun 15, 2020
810ba39
remove obsolete line
stlankes Jun 15, 2020
aa53a03
Revert "changes to pass the format check"
stlankes Jun 15, 2020
9c9f21f
Revert "simplify conversion to IpAddr::V6"
stlankes Jun 15, 2020
6c983a7
use Ipv6Addr::from to build the IPv6 address
stlankes Jun 15, 2020
a8e3746
add comment about the usage of Arc
stlankes Jun 15, 2020
76f1581
remove obsolete , to pass the format check
stlankes Jun 15, 2020
eef9356
Rollup merge of #72707 - matthewjasper:rustc_min_spec, r=oli-obk
RalfJung Jun 15, 2020
d97e8ca
Rollup merge of #72740 - estebank:recursive-indirection, r=matthewjasper
RalfJung Jun 15, 2020
f9c8a67
Rollup merge of #72879 - RalfJung:miri-tctx-at, r=oli-obk
RalfJung Jun 15, 2020
89eb74d
Rollup merge of #72938 - lzutao:stabilize_option_zip, r=dtolnay
RalfJung Jun 15, 2020
3440957
Rollup merge of #73086 - trevyn:apple-a7, r=nikic
RalfJung Jun 15, 2020
7c8b941
Rollup merge of #73104 - poliorcetics:explicit-mutex-drop-example, r=…
RalfJung Jun 15, 2020
ec6fe42
Rollup merge of #73139 - poliorcetics:cstring-from-vec-with-nul, r=dt…
RalfJung Jun 15, 2020
fb75d4a
Rollup merge of #73296 - ehuss:remove-msvc-aux, r=Mark-Simulacrum
RalfJung Jun 15, 2020
202499f
Rollup merge of #73304 - dtolnay:socketeq, r=Mark-Simulacrum
RalfJung Jun 15, 2020
54bd077
Rollup merge of #73331 - hermitcore:listen, r=kennytm
RalfJung Jun 15, 2020
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
Remove a lot of unecessary/duplicated comments
  • Loading branch information
poliorcetics committed Jun 9, 2020
commit 1312d30a6a837f72c3f36f5dc1c575a29890aa2c
14 changes: 3 additions & 11 deletions src/libstd/sync/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,11 @@ use crate::sys_common::poison::{self, LockResult, TryLockError, TryLockResult};
///
/// const N: usize = 3;
///
/// // Some data to work with in multiple threads.
/// let data_mutex = Arc::new(Mutex::new(vec![1, 2, 3, 4]));
/// // The result of all the work across all threads.
/// let res_mutex = Arc::new(Mutex::new(0));
///
/// // Threads other than the main thread.
/// let mut threads = Vec::with_capacity(N);
/// (0..N).for_each(|_| {
/// // Getting clones for the mutexes.
/// let data_mutex_clone = Arc::clone(&data_mutex);
/// let res_mutex_clone = Arc::clone(&res_mutex);
///
Expand All @@ -135,10 +131,6 @@ use crate::sys_common::poison::{self, LockResult, TryLockError, TryLockResult};
/// // This is the result of some important and long-ish work.
/// let result = data.iter().fold(0, |acc, x| acc + x * 2);
/// data.push(result);
/// // We drop the `data` explicitely because it's not necessary anymore
/// // and the thread still has work to do. This allow other threads to
/// // start working on the data immediately, without waiting
/// // for the rest of the unrelated work to be done here.
/// drop(data);
/// *res_mutex_clone.lock().unwrap() += result;
/// }));
Expand All @@ -153,9 +145,9 @@ use crate::sys_common::poison::{self, LockResult, TryLockError, TryLockResult};
/// // start working on the data immediately, without waiting
/// // for the rest of the unrelated work to be done here.
/// //
/// // It's even more important here because we `.join` the threads after that.
/// // If we had not dropped the lock, a thread could be waiting forever for
/// // it, causing a deadlock.
/// // It's even more important here than in the threads because we `.join` the
/// // threads after that. If we had not dropped the lock, a thread could be
/// // waiting forever for it, causing a deadlock.
/// drop(data);
/// // Here the lock is not assigned to a variable and so, even if the scope
/// // does not end after this line, the mutex is still released:
Expand Down