We have a lot of tests with filenames honoring particular issues by number. Typically, these are called issue-${issue_no}.rs (note the hyphen): ``` $ find . -regextype posix-egrep -regex '.*/issue-[0-9]*.rs' | wc 1289 1289 35935 ``` We also had a much smaller number of files that are like this, but don't have a hyphen in between the substring `issue` and the number: ``` $ find . -regextype posix-egrep -regex '.*/issue[0-9]*.rs' ./debuginfo/issue14411.rs ./debuginfo/issue12886.rs ./debuginfo/issue13213.rs ./debuginfo/issue22656.rs ./debuginfo/issue7712.rs ./compile-fail/issue32829.rs ./run-pass/issue24353.rs ./run-pass/issue34796.rs ./run-pass/issue18173.rs ./run-pass/issue22346.rs ./run-pass/auxiliary/issue13507.rs ./run-pass/issue26127.rs ./run-pass/issue22008.rs ./run-pass/issue34569.rs ./run-pass/issue29927.rs ./run-pass/issue36260.rs ``` Some would argue that the inconsistency is æsthetically displeasing, hence this trivial patch. (Note that run-pass/auxiliary/issue13507.rs has an excuse; it's `use`d in run-pass/issue-13507-2.rs; the matter of there being two different compile-fail tests with different name conventions for issue #32829 is also neglected here for the sake of keeping this trivial cleanup patch as trivial as possible for ease of review.)
59 lines
1.5 KiB
Rust
59 lines
1.5 KiB
Rust
// Copyright 2013-2015 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.
|
|
|
|
|
|
// This test makes sure that the LLDB pretty printer does not throw an exception
|
|
// when trying to handle a Vec<> or anything else that contains zero-sized
|
|
// fields.
|
|
|
|
// min-lldb-version: 310
|
|
// ignore-gdb
|
|
// ignore-tidy-linelength
|
|
|
|
// compile-flags:-g
|
|
|
|
// === LLDB TESTS ==================================================================================
|
|
// lldb-command:run
|
|
|
|
// lldb-command:print v
|
|
// lldb-check:[...]$0 = vec![1, 2, 3]
|
|
// lldb-command:print zs
|
|
// lldb-check:[...]$1 = StructWithZeroSizedField { x: ZeroSizedStruct, y: 123, z: ZeroSizedStruct, w: 456 }
|
|
// lldb-command:continue
|
|
|
|
#![allow(unused_variables)]
|
|
#![allow(dead_code)]
|
|
#![feature(omit_gdb_pretty_printer_section)]
|
|
#![omit_gdb_pretty_printer_section]
|
|
|
|
struct ZeroSizedStruct;
|
|
|
|
struct StructWithZeroSizedField {
|
|
x: ZeroSizedStruct,
|
|
y: u32,
|
|
z: ZeroSizedStruct,
|
|
w: u64
|
|
}
|
|
|
|
fn main() {
|
|
let v = vec![1,2,3];
|
|
|
|
let zs = StructWithZeroSizedField {
|
|
x: ZeroSizedStruct,
|
|
y: 123,
|
|
z: ZeroSizedStruct,
|
|
w: 456
|
|
};
|
|
|
|
zzz(); // #break
|
|
}
|
|
|
|
fn zzz() { () }
|