about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorOtto Rask <ojrask@gmail.com>2018-08-29 13:20:56 +0300
committerOtto Rask <ojrask@gmail.com>2018-08-29 13:20:56 +0300
commit5399616f1d98b4bcc1da87af15f75c95e3c2288b (patch)
treec86c2e4583f614d5080cc05cd4ae4384a7d2c6d6 /src/test/incremental/thinlto
parentf4e981cfe474f598b34ca07df8c8f16f042e120f (diff)
downloadrust-5399616f1d98b4bcc1da87af15f75c95e3c2288b.tar.gz
rust-5399616f1d98b4bcc1da87af15f75c95e3c2288b.zip
Make Arc cloning mechanics clearer in module docs
Add some more wording to module documentation regarding how
`Arc::clone()` works, as some users have assumed cloning Arc's
to work via dereferencing to inner value as follows:

    use std::sync::Arc;

    let myarc = Arc::new(1);
    let myarcref = myarc.clone();

    assert!(1 == myarcref);

Instead of the actual mechanic of referencing the existing
Arc value:

    use std::sync::Arg;

    let myarc = Arc::new(1);
    let myarcref = myarc.clone();

    assert!(myarcref == &myarc); // not sure if assert could assert this
    in the real world
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions