Skip to content

Commit

Permalink
Auto merge of #6635 - ehuss:beta-1.33-fixup, r=alexcrichton
Browse files Browse the repository at this point in the history
[BETA] backports to appease CI

- #6559 — relax rustdoc output assertion
- #6600 — Remove deprecated ATOMIC initializers.

Required to get the rust-1.33.0 branch passing again.
  • Loading branch information
bors committed Feb 4, 2019
2 parents 9b5d4b7 + f1a9a7f commit a8e5481
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/cargo/core/source/source_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::hash::{self, Hash};
use std::path::Path;
use std::ptr;
use std::sync::atomic::Ordering::SeqCst;
use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT};
use std::sync::atomic::AtomicBool;
use std::sync::Mutex;

use log::trace;
Expand Down Expand Up @@ -193,7 +193,7 @@ impl SourceId {
config.crates_io_source_id(|| {
let cfg = ops::registry_configuration(config, None)?;
let url = if let Some(ref index) = cfg.index {
static WARNED: AtomicBool = ATOMIC_BOOL_INIT;
static WARNED: AtomicBool = AtomicBool::new(false);
if !WARNED.swap(true, SeqCst) {
config.shell().warn(
"custom registry support via \
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ fn output_not_captured() {

p.cargo("doc")
.without_status()
.with_stderr_contains("1 | ☃")
.with_stderr_contains(r"error: unknown start of token: \u{2603}")
.with_stderr_contains("[..]☃")
.with_stderr_contains(r"[..]unknown start of token: \u{2603}")
.run();
}

Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/support/cross_compile.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::env;
use std::process::Command;
use std::sync::atomic::{AtomicBool, Ordering, ATOMIC_BOOL_INIT};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Once, ONCE_INIT};

use crate::support::{basic_bin_manifest, main_file, project};
Expand All @@ -22,7 +22,7 @@ pub fn disabled() -> bool {
// It's not particularly common to have a cross-compilation setup, so
// try to detect that before we fail a bunch of tests through no fault
// of the user.
static CAN_RUN_CROSS_TESTS: AtomicBool = ATOMIC_BOOL_INIT;
static CAN_RUN_CROSS_TESTS: AtomicBool = AtomicBool::new(false);
static CHECK: Once = ONCE_INIT;

let cross_target = alternate();
Expand Down Expand Up @@ -56,7 +56,7 @@ pub fn disabled() -> bool {
// pass. We don't use std::sync::Once here because panicing inside its
// call_once method would poison the Once instance, which is not what
// we want.
static HAVE_WARNED: AtomicBool = ATOMIC_BOOL_INIT;
static HAVE_WARNED: AtomicBool = AtomicBool::new(false);

if HAVE_WARNED.swap(true, Ordering::SeqCst) {
// We are some other test and somebody else is handling the warning.
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/support/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ use std::env;
use std::fs;
use std::io::{self, ErrorKind};
use std::path::{Path, PathBuf};
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Once, ONCE_INIT};

use filetime::{self, FileTime};

static CARGO_INTEGRATION_TEST_DIR: &'static str = "cit";
static NEXT_ID: AtomicUsize = ATOMIC_USIZE_INIT;
static NEXT_ID: AtomicUsize = AtomicUsize::new(0);

thread_local!(static TASK_ID: usize = NEXT_ID.fetch_add(1, Ordering::SeqCst));

Expand Down

0 comments on commit a8e5481

Please sign in to comment.