about summary refs log tree commit diff
path: root/src/test/debuginfo
AgeCommit message (Collapse)AuthorLines
2014-12-09rollup merge of #19581: luqmana/ducAlex Crichton-6/+43
Fixes #19575.
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+27
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-05librustc: Fix debuginfo for captured variables in non-FnOnce unboxed closures.Luqman Aden-6/+43
2014-12-02gdb: Fix pretty printer for nullable-opt enums with fat pointers.Luqman Aden-2/+10
2014-12-02lldb: Fix pretty printer for nullable-opt enums with fat pointers.Luqman Aden-0/+9
2014-12-01debuginfo: Fix multi-byte character related bug in cleanup scope handling.Michael Woerister-0/+28
Also see issue #18791.
2014-11-27debuginfo: Make variables captured in unboxed closures available in debuginfo.Michael Woerister-1/+18
2014-11-20removed struct_variant feature from testsSimon Wollwage-18/+0
2014-11-17Switch to purely namespaced enumsSteven Fackler-21/+54
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-10-31debuginfo: Enable some GDB tests on Windows.Michael Woerister-9/+0
2014-10-31debuginfo: Make GDB tests use line breakpoints like done in LLDB tests.Michael Woerister-447/+57
On some Windows versions of GDB this is more stable than setting breakpoints via function names.
2014-10-30rollup merge of #18398 : aturon/lint-conventions-2Alex Crichton-50/+50
Conflicts: src/libcollections/slice.rs src/libcore/failure.rs src/libsyntax/parse/token.rs src/test/debuginfo/basic-types-mut-globals.rs src/test/debuginfo/simple-struct.rs src/test/debuginfo/trait-pointers.rs
2014-10-29Rename fail! to panic!Steve Klabnik-1/+1
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-28Update code with new lint namesAaron Turon-50/+50
2014-10-22debuginfo: Gate all LLDB debuginfo tests on a minimum LLDB version being ↵Michael Woerister-16/+100
available
2014-10-11Remove `virtual` struct testsJakub Wieczorek-12/+1
2014-10-09Rename the no_split_stack attribute to no_stack_checkKeegan McAllister-12/+12
The old name is misleading as we haven't had segmented stacks in quite some time. But we still recognize it, with a deprecation warning.
2014-10-08debuginfo: Don't mark struct fields as artificial.Michael Woerister-31/+35
LLDB doesn't allow for reading 'artifical' fields (fields that are generated by the compiler). So do not mark, slice fields, enum discriminants, and GcBox value fields as artificial.
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-0/+1
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-1/+1
2014-10-02Test fixes from the rollupAlex Crichton-53/+53
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-578/+2
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-1/+1
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-1/+0
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02tests: remove uses of Gc.Eduard Burtescu-578/+2
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-0/+1
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-1/+1
2014-09-30Ignore yet another windows debuginfo testBrian Anderson-2/+3
2014-09-25debuginfo: Make sure that all calls to drop glue are associated with debug ↵Michael Woerister-2/+2
locations. This commit makes rustc emit debug locations for all call and invoke statements in LLVM IR, if they are contained within a function that debuginfo is enabled for. This is important because LLVM does not handle the case where a function body containing debuginfo is inlined into another function with debuginfo, but the inlined call statement does not have a debug location. In this case, LLVM will not know where (in terms of source code coordinates) the function was inlined to and we end up with some statements still linked to the source locations in there original, non-inlined function without any indication that they are indeed an inline-copy. Later, when generating DWARF from the IR, LLVM will interpret this as corrupt IR and abort. Unfortunately, the undesirable case described above can still occur when using LTO. If there is a crate compiled without debuginfo calling into a crate compiled with debuginfo, we again end up with the conditions triggering the error. This is why some LTO tests still fail with the dreaded assertion, if the standard library was built with debuginfo enabled. That is, `RUSTFLAGS_STAGE2=-g make rustc-stage2` will succeed but `RUSTFLAGS_STAGE2=-g make check` will still fail after this commit has been merged. This is a problem that has to be dealt with separately. Fixes #17201 Fixes #15816 Fixes #15156
2014-09-21Move -Z lto to -C lto.Colin Davidson-1/+1
Closes #12443
2014-09-18Ignore two gdb tests on windows that are failing on the botsBrian Anderson-0/+2
2014-09-17test: Un-ignore some GDB pretty printing testsAlex Crichton-2/+0
I've confirmed that these are working on the snapshot builders Closes #16919
2014-09-16Fallout from renamingAaron Turon-3/+3
2014-09-02test: Ignore failing gdb pretty testsAlex Crichton-0/+2
These tests are blocking a linux nightly and a new snapshot, so ignore them for now. Their tracking issue is #16919.
2014-08-27debuginfo: Emit different autotest debugger scripts depending on GDB version.Michael Woerister-1/+81
2014-08-27debuginfo: Add GDB pretty printers for structs and enums.Michael Woerister-0/+167
2014-08-20librustc: handle repr on structs, require it for ffi, unify with packedCorey Richardson-9/+9
As of RFC 18, struct layout is undefined. Opting into a C-compatible struct layout is now down with #[repr(C)]. For consistency, specifying a packed layout is now also down with #[repr(packed)]. Both can be specified. To fix errors caused by this, just add #[repr(C)] to the structs, and change #[packed] to #[repr(packed)] Closes #14309 [breaking-change]
2014-08-15debuginfo: Add a "no_debug" attribute that allows to exclude functions from ↵Michael Woerister-0/+45
debuginfo generation.
2014-08-12Replace "ignore-win32" in tests with "ignore-windows"Vadim Chugunov-9/+9
2014-07-26Remove managed_box gate from testsBrian Anderson-12/+1
No longer does anything.
2014-07-24librustc: Stop desugaring `for` expressions and translate them directly.Patrick Walton-0/+1
This makes edge cases in which the `Iterator` trait was not in scope and/or `Option` or its variants were not in scope work properly. This breaks code that looks like: struct MyStruct { ... } impl MyStruct { fn next(&mut self) -> Option<int> { ... } } for x in MyStruct { ... } { ... } Change ad-hoc `next` methods like the above to implementations of the `Iterator` trait. For example: impl Iterator<int> for MyStruct { fn next(&mut self) -> Option<int> { ... } } Closes #15392. [breaking-change]
2014-07-17librustc: Remove cross-borrowing of `Box<T>` to `&T` from the language,Patrick Walton-33/+33
except where trait objects are involved. Part of issue #15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change]
2014-07-16librustc: Allow the new UFCS explicit self in trait definitions, andPatrick Walton-9/+9
remove `~self` from the test suite.
2014-07-16debuginfo: Add LLDB autotests to debuginfo test suite.Michael Woerister-261/+3316
This commit adds LLDB autotests to the test suite but does not activate them by default yet.
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-1/+1
[breaking-change]
2014-07-02debuginfo: Make names of types in debuginfo reliable and omit source ↵Michael Woerister-0/+333
locations from debug info type descriptions. So far, type names generated for debuginfo where a bit sketchy. It was not clearly defined when a name should be fully qualified and when not, if region parameters should be shown or not, and other things like that. This commit makes the debuginfo module responsible for creating type names instead of using ppaux::ty_to_str() and brings type names, as they show up in the DWARF information, in line with GCC and Clang: * The name of the type being described is unqualified. It's path is defined by its position in the namespace hierarchy. * Type arguments are always fully qualified, no matter if they would actually be in scope at the type definition location. Care is also taken to reliably make type names consistent across crate boundaries. That is, the code now tries make the type name the same, regardless if the type is in the local crate or reconstructed from metadata. Otherwise LLVM will complain about violating the one-definition-rule when using link-time-optimization. This commit also removes all source location information from type descriptions because these cannot be reconstructed for types instantiated from metadata. Again, with LTO enabled, this can lead to two versions of the debuginfo type description, one with and one without source location information, which then triggers the LLVM ODR assertion. Fortunately, source location information about types is rarely used, so this has little impact. Once source location information is preserved in metadata (#1972) it can also be reenabled for type descriptions.
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-85/+88
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-24Test fixes from the rollupAlex Crichton-5/+5
Closes #14482 (std: Bring back half of Add on String) Closes #15026 (librustc: Remove the fallback to `int` from typechecking.) Closes #15119 (Add more description to c_str::unwrap().) Closes #15120 (Add tests for #12470 and #14285) Closes #15122 (Remove the cheat sheet.) Closes #15126 (rustc: Always include the morestack library) Closes #15127 (Improve ambiguous pronoun.) Closes #15130 (Fix #15129) Closes #15131 (Add the Guide, add warning to tutorial.) Closes #15134 (Xfailed tests for hygiene, etc.) Closes #15135 (core: Add stability attributes to Clone) Closes #15136 (Some minor improvements to core::bool) Closes #15137 (std: Add stability attributes to primitive numeric modules) Closes #15141 (Fix grammar in tutorial) Closes #15143 (Remove few FIXMEs) Closes #15145 (Avoid unnecessary temporary on assignments) Closes #15147 (Small improvements for metaprogramming) Closes #15153 (librustc: Check function argument patterns for legality of by-move) Closes #15154 (test: Add a test for regions, traits, and variance.) Closes #15159 (rustc: Don't register syntax crates twice) Closes #13816 (Stabilize version output for rustc and rustdoc)
2014-06-23libsyntax: Disallow struct literals after `if`, `while`, `match`, andPatrick Walton-3/+3
`for...in`. Closes #14803. If you used a structure literal after one of these keywords, surround it in parentheses. [breaking-change]
2014-06-18debuginfo: Add test case for issue 14411.Michael Woerister-0/+25