Skip to content

Commit ec79d36

Browse files
committed
Test fixes from the rollup
Closes #16097 (fix variable name in tutorial) Closes #16100 (More defailbloating) Closes #16104 (Fix deprecation commment on `core::cmp::lexical_ordering`) Closes #16105 (fix formatting in pointer guide table) Closes #16107 (remove serialize::ebml, add librbml) Closes #16108 (Fix heading levels in pointer guide) Closes #16109 (rustrt: Don't conditionally init the at_exit QUEUE) Closes #16111 (hexfloat: Deprecate to move out of the repo) Closes #16113 (Add examples for GenericPath methods.) Closes #16115 (Byte literals!) Closes #16116 (Add a non-regression test for issue #8372) Closes #16120 (Deprecate semver) Closes #16124 (Deprecate uuid) Closes #16126 (Deprecate fourcc) Closes #16127 (Remove incorrect example) Closes #16129 (Add note about production deployments.) Closes #16131 (librustc: Don't ICE when trying to subst regions in destructor call.) Closes #16133 (librustc: Don't ICE with struct exprs where the name is not a valid struct.) Closes #16136 (Implement slice::Vector for Option<T> and CVec<T>) Closes #16137 (alloc, arena, test, url, uuid: Elide lifetimes.)
1 parent f861848 commit ec79d36

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

src/librustrt/task.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ mod test {
649649
#[should_fail]
650650
fn test_begin_unwind() {
651651
use std::rt::unwind::begin_unwind;
652-
begin_unwind("cause", file!(), line!())
652+
begin_unwind("cause", &(file!(), line!()))
653653
}
654654

655655
#[test]

src/libuuid/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ unlikely.
2929
To create a new random (V4) UUID and print it out in hexadecimal form:
3030
3131
```rust
32+
# #![allow(deprecated)]
33+
# extern crate uuid;
3234
use uuid::Uuid;
3335
3436
fn main() {

src/test/auxiliary/lang-item-public.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#![feature(lang_items)]
1313

1414
#[lang="fail_"]
15-
fn fail(_: &'static str, _: &'static str, _: uint) -> ! { loop {} }
15+
fn fail(_: &(&'static str, &'static str, uint)) -> ! { loop {} }
1616

1717
#[lang = "stack_exhausted"]
1818
extern fn stack_exhausted() {}

src/test/run-pass/backtrace.rs

+11-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ fn start(argc: int, argv: *const *const u8) -> int {
2424

2525
#[inline(never)]
2626
fn foo() {
27-
fail!()
27+
let _v = vec![1i, 2, 3];
28+
if os::getenv("IS_TEST").is_some() {
29+
fail!()
30+
}
2831
}
2932

3033
#[inline(never)]
@@ -37,32 +40,35 @@ fn double() {
3740
}
3841

3942
fn runtest(me: &str) {
43+
let mut template = Command::new(me);
44+
template.env("IS_TEST", "1");
45+
4046
// Make sure that the stack trace is printed
41-
let mut p = Command::new(me).arg("fail").env("RUST_BACKTRACE", "1").spawn().unwrap();
47+
let p = template.clone().arg("fail").env("RUST_BACKTRACE", "1").spawn().unwrap();
4248
let out = p.wait_with_output().unwrap();
4349
assert!(!out.status.success());
4450
let s = str::from_utf8(out.error.as_slice()).unwrap();
4551
assert!(s.contains("stack backtrace") && s.contains("foo::h"),
4652
"bad output: {}", s);
4753

4854
// Make sure the stack trace is *not* printed
49-
let mut p = Command::new(me).arg("fail").spawn().unwrap();
55+
let p = template.clone().arg("fail").spawn().unwrap();
5056
let out = p.wait_with_output().unwrap();
5157
assert!(!out.status.success());
5258
let s = str::from_utf8(out.error.as_slice()).unwrap();
5359
assert!(!s.contains("stack backtrace") && !s.contains("foo::h"),
5460
"bad output2: {}", s);
5561

5662
// Make sure a stack trace is printed
57-
let mut p = Command::new(me).arg("double-fail").spawn().unwrap();
63+
let p = template.clone().arg("double-fail").spawn().unwrap();
5864
let out = p.wait_with_output().unwrap();
5965
assert!(!out.status.success());
6066
let s = str::from_utf8(out.error.as_slice()).unwrap();
6167
assert!(s.contains("stack backtrace") && s.contains("double::h"),
6268
"bad output3: {}", s);
6369

6470
// Make sure a stack trace isn't printed too many times
65-
let mut p = Command::new(me).arg("double-fail")
71+
let p = template.clone().arg("double-fail")
6672
.env("RUST_BACKTRACE", "1").spawn().unwrap();
6773
let out = p.wait_with_output().unwrap();
6874
assert!(!out.status.success());

0 commit comments

Comments
 (0)