Skip to content

Commit 3dab332

Browse files
authored
Merge branch 'master' into fix-submodules
2 parents 482346c + 27e5457 commit 3dab332

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1210
-693
lines changed

.gitmodules

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@
5959
[submodule "src/tools/lldb"]
6060
path = src/tools/lldb
6161
url = https://github.com/rust-lang-nursery/lldb.git
62-
branch = rust-release-70
62+
branch = rust-release-80-v1
6363
[submodule "src/tools/clang"]
6464
path = src/tools/clang
6565
url = https://github.com/rust-lang-nursery/clang.git
66-
branch = release_70
66+
branch = rust-release-80-v1
67+

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ matrix:
3030

3131
- env: >
3232
RUST_CHECK_TARGET=dist
33-
RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler"
33+
RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --enable-lldb"
3434
SRC=.
3535
DEPLOY_ALT=1
3636
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -87,7 +87,7 @@ matrix:
8787
# OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
8888
- env: >
8989
RUST_CHECK_TARGET=dist
90-
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler"
90+
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb"
9191
SRC=.
9292
DEPLOY=1
9393
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
@@ -101,7 +101,7 @@ matrix:
101101
102102
- env: >
103103
RUST_CHECK_TARGET=dist
104-
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler"
104+
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --enable-lldb"
105105
SRC=.
106106
DEPLOY=1
107107
RUSTC_RETRY_LINKER_ON_SEGFAULT=1

src/Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2739,6 +2739,7 @@ name = "syntax_ext"
27392739
version = "0.0.0"
27402740
dependencies = [
27412741
"fmt_macros 0.0.0",
2742+
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
27422743
"proc_macro 0.0.0",
27432744
"rustc_data_structures 0.0.0",
27442745
"rustc_errors 0.0.0",

src/bootstrap/dist.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ fn maybe_install_llvm_dylib(builder: &Builder,
19131913
llvm_dylib_path.display(), e);
19141914
});
19151915

1916-
let dst_libdir = image.join("lib");
1916+
let dst_libdir = image.join("lib/rustlib").join(&*target).join("lib");
19171917
t!(fs::create_dir_all(&dst_libdir));
19181918

19191919
builder.install(&llvm_dylib_path, &dst_libdir, 0o644);
@@ -1967,7 +1967,9 @@ impl Step for LlvmTools {
19671967
let src_bindir = builder
19681968
.llvm_out(target)
19691969
.join("bin");
1970-
let dst_bindir = image.join("bin");
1970+
let dst_bindir = image.join("lib/rustlib")
1971+
.join(&*target)
1972+
.join("bin");
19711973
t!(fs::create_dir_all(&dst_bindir));
19721974
for tool in LLVM_TOOLS {
19731975
let exe = src_bindir.join(exe(tool, &target));
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# `custom_test_frameworks`
2+
3+
The tracking issue for this feature is: [#50297]
4+
5+
[#50297]: https://github.com/rust-lang/rust/issues/50297
6+
7+
------------------------
8+
9+
The `custom_test_frameworks` feature allows the use of `#[test_case]` and `#![test_runner]`.
10+
Any function, const, or static can be annotated with `#[test_case]` causing it to be aggregated (like `#[test]`)
11+
and be passed to the test runner determined by the `#![test_runner]` crate attribute.
12+
13+
```rust
14+
#![feature(custom_test_frameworks)]
15+
#![test_runner(my_runner)]
16+
17+
fn my_runner(tests: &[&i32]) {
18+
for t in tests {
19+
if **t == 0 {
20+
println!("PASSED");
21+
} else {
22+
println!("FAILED");
23+
}
24+
}
25+
}
26+
27+
#[test_case]
28+
const WILL_PASS: i32 = 0;
29+
30+
#[test_case]
31+
const WILL_FAIL: i32 = 4;
32+
```
33+

src/liballoc/tests/str.rs

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -727,33 +727,33 @@ fn test_is_char_boundary() {
727727
}
728728

729729
#[test]
730-
fn test_trim_left_matches() {
730+
fn test_trim_start_matches() {
731731
let v: &[char] = &[];
732-
assert_eq!(" *** foo *** ".trim_left_matches(v), " *** foo *** ");
732+
assert_eq!(" *** foo *** ".trim_start_matches(v), " *** foo *** ");
733733
let chars: &[char] = &['*', ' '];
734-
assert_eq!(" *** foo *** ".trim_left_matches(chars), "foo *** ");
735-
assert_eq!(" *** *** ".trim_left_matches(chars), "");
736-
assert_eq!("foo *** ".trim_left_matches(chars), "foo *** ");
734+
assert_eq!(" *** foo *** ".trim_start_matches(chars), "foo *** ");
735+
assert_eq!(" *** *** ".trim_start_matches(chars), "");
736+
assert_eq!("foo *** ".trim_start_matches(chars), "foo *** ");
737737

738-
assert_eq!("11foo1bar11".trim_left_matches('1'), "foo1bar11");
738+
assert_eq!("11foo1bar11".trim_start_matches('1'), "foo1bar11");
739739
let chars: &[char] = &['1', '2'];
740-
assert_eq!("12foo1bar12".trim_left_matches(chars), "foo1bar12");
741-
assert_eq!("123foo1bar123".trim_left_matches(|c: char| c.is_numeric()), "foo1bar123");
740+
assert_eq!("12foo1bar12".trim_start_matches(chars), "foo1bar12");
741+
assert_eq!("123foo1bar123".trim_start_matches(|c: char| c.is_numeric()), "foo1bar123");
742742
}
743743

744744
#[test]
745-
fn test_trim_right_matches() {
745+
fn test_trim_end_matches() {
746746
let v: &[char] = &[];
747-
assert_eq!(" *** foo *** ".trim_right_matches(v), " *** foo *** ");
747+
assert_eq!(" *** foo *** ".trim_end_matches(v), " *** foo *** ");
748748
let chars: &[char] = &['*', ' '];
749-
assert_eq!(" *** foo *** ".trim_right_matches(chars), " *** foo");
750-
assert_eq!(" *** *** ".trim_right_matches(chars), "");
751-
assert_eq!(" *** foo".trim_right_matches(chars), " *** foo");
749+
assert_eq!(" *** foo *** ".trim_end_matches(chars), " *** foo");
750+
assert_eq!(" *** *** ".trim_end_matches(chars), "");
751+
assert_eq!(" *** foo".trim_end_matches(chars), " *** foo");
752752

753-
assert_eq!("11foo1bar11".trim_right_matches('1'), "11foo1bar");
753+
assert_eq!("11foo1bar11".trim_end_matches('1'), "11foo1bar");
754754
let chars: &[char] = &['1', '2'];
755-
assert_eq!("12foo1bar12".trim_right_matches(chars), "12foo1bar");
756-
assert_eq!("123foo1bar123".trim_right_matches(|c: char| c.is_numeric()), "123foo1bar");
755+
assert_eq!("12foo1bar12".trim_end_matches(chars), "12foo1bar");
756+
assert_eq!("123foo1bar123".trim_end_matches(|c: char| c.is_numeric()), "123foo1bar");
757757
}
758758

759759
#[test]
@@ -772,23 +772,23 @@ fn test_trim_matches() {
772772
}
773773

774774
#[test]
775-
fn test_trim_left() {
776-
assert_eq!("".trim_left(), "");
777-
assert_eq!("a".trim_left(), "a");
778-
assert_eq!(" ".trim_left(), "");
779-
assert_eq!(" blah".trim_left(), "blah");
780-
assert_eq!(" \u{3000} wut".trim_left(), "wut");
781-
assert_eq!("hey ".trim_left(), "hey ");
775+
fn test_trim_start() {
776+
assert_eq!("".trim_start(), "");
777+
assert_eq!("a".trim_start(), "a");
778+
assert_eq!(" ".trim_start(), "");
779+
assert_eq!(" blah".trim_start(), "blah");
780+
assert_eq!(" \u{3000} wut".trim_start(), "wut");
781+
assert_eq!("hey ".trim_start(), "hey ");
782782
}
783783

784784
#[test]
785-
fn test_trim_right() {
786-
assert_eq!("".trim_right(), "");
787-
assert_eq!("a".trim_right(), "a");
788-
assert_eq!(" ".trim_right(), "");
789-
assert_eq!("blah ".trim_right(), "blah");
790-
assert_eq!("wut \u{3000} ".trim_right(), "wut");
791-
assert_eq!(" hey".trim_right(), " hey");
785+
fn test_trim_end() {
786+
assert_eq!("".trim_end(), "");
787+
assert_eq!("a".trim_end(), "a");
788+
assert_eq!(" ".trim_end(), "");
789+
assert_eq!("blah ".trim_end(), "blah");
790+
assert_eq!("wut \u{3000} ".trim_end(), "wut");
791+
assert_eq!(" hey".trim_end(), " hey");
792792
}
793793

794794
#[test]
@@ -1518,12 +1518,20 @@ fn trim_ws() {
15181518
"a \t ");
15191519
assert_eq!(" \t a \t ".trim_right_matches(|c: char| c.is_whitespace()),
15201520
" \t a");
1521+
assert_eq!(" \t a \t ".trim_start_matches(|c: char| c.is_whitespace()),
1522+
"a \t ");
1523+
assert_eq!(" \t a \t ".trim_end_matches(|c: char| c.is_whitespace()),
1524+
" \t a");
15211525
assert_eq!(" \t a \t ".trim_matches(|c: char| c.is_whitespace()),
15221526
"a");
15231527
assert_eq!(" \t \t ".trim_left_matches(|c: char| c.is_whitespace()),
15241528
"");
15251529
assert_eq!(" \t \t ".trim_right_matches(|c: char| c.is_whitespace()),
15261530
"");
1531+
assert_eq!(" \t \t ".trim_start_matches(|c: char| c.is_whitespace()),
1532+
"");
1533+
assert_eq!(" \t \t ".trim_end_matches(|c: char| c.is_whitespace()),
1534+
"");
15271535
assert_eq!(" \t \t ".trim_matches(|c: char| c.is_whitespace()),
15281536
"");
15291537
}

0 commit comments

Comments
 (0)