diff options
| author | bors <bors@rust-lang.org> | 2017-02-14 22:46:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-02-14 22:46:10 +0000 |
| commit | e8154a092558d79f13d7dd48abbfcc4e9d4ed44c (patch) | |
| tree | 67f41f99c8d4adae5b9c5c82bbf2c9824709bb6d /src/test | |
| parent | 48bc08247a7b4a5579437df54ca3f4a3fb25ce8d (diff) | |
| parent | 4a919cba5b41ff1b8885dfebe5f246fe409e8004 (diff) | |
| download | rust-e8154a092558d79f13d7dd48abbfcc4e9d4ed44c.tar.gz rust-e8154a092558d79f13d7dd48abbfcc4e9d4ed44c.zip | |
Auto merge of #39818 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests - Successful merges: #39659, #39730, #39754, #39772, #39785, #39788, #39790, #39813 - Failed merges:
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/feature-gate-staged_api.rs | 24 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-39709.rs (renamed from src/test/run-make/sanitizer-thread/racy.rs) | 12 | ||||
| -rw-r--r-- | src/test/run-make/sanitizer-thread/Makefile | 10 | ||||
| -rw-r--r-- | src/test/run-pass/test-allow-non-camel-case-variant.rs | 18 |
4 files changed, 45 insertions, 19 deletions
diff --git a/src/test/compile-fail/feature-gate-staged_api.rs b/src/test/compile-fail/feature-gate-staged_api.rs new file mode 100644 index 00000000000..014a0aaaf68 --- /dev/null +++ b/src/test/compile-fail/feature-gate-staged_api.rs @@ -0,0 +1,24 @@ +// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![stable(feature = "a", since = "b")] +//~^ ERROR stability attributes may not be used outside of the standard library +mod inner_private_module { + // UnnameableTypeAlias isn't marked as reachable, so no stability annotation is required here + pub type UnnameableTypeAlias = u8; +} + +#[stable(feature = "a", since = "b")] +//~^ ERROR stability attributes may not be used outside of the standard library +pub fn f() -> inner_private_module::UnnameableTypeAlias { + 0 +} + +fn main() {} diff --git a/src/test/run-make/sanitizer-thread/racy.rs b/src/test/compile-fail/issue-39709.rs index dc929e004a4..0f66fe84393 100644 --- a/src/test/run-make/sanitizer-thread/racy.rs +++ b/src/test/compile-fail/issue-39709.rs @@ -8,14 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::thread; - -static mut ANSWER: i32 = 0; - fn main() { - let t1 = thread::spawn(|| unsafe { ANSWER = 42 }); - unsafe { - ANSWER = 24; - } - t1.join().ok(); + println!("{}", { macro_rules! x { ($()*) => {} } 33 }); + //~^ ERROR no syntax variables matched as repeating at this depth } + diff --git a/src/test/run-make/sanitizer-thread/Makefile b/src/test/run-make/sanitizer-thread/Makefile deleted file mode 100644 index 8bb89a241cb..00000000000 --- a/src/test/run-make/sanitizer-thread/Makefile +++ /dev/null @@ -1,10 +0,0 @@ --include ../tools.mk - -ifdef SANITIZER_SUPPORT -all: - $(RUSTC) -g -Z sanitizer=thread -Z print-link-args racy.rs | grep -q librustc_tsan - $(TMPDIR)/racy 2>&1 | grep -q 'data race' -else -all: - -endif diff --git a/src/test/run-pass/test-allow-non-camel-case-variant.rs b/src/test/run-pass/test-allow-non-camel-case-variant.rs new file mode 100644 index 00000000000..c7073b3a95e --- /dev/null +++ b/src/test/run-pass/test-allow-non-camel-case-variant.rs @@ -0,0 +1,18 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![deny(non_camel_case_types)] + +pub enum Foo { + #[allow(non_camel_case_types)] + bar +} + +fn main() {} |
