rust/src/test/debug-info
bors 679102109f auto merge of #8554 : michaelwoerister/rust/generics, r=brson
This pull request includes support for generic functions and self arguments in methods, and combinations thereof. This also encompasses any kind of trait methods, regular and static, with and without default implementation. The implementation is backed up by a felt ton of test cases `:)`

This is a very important step towards being able to compile larger programs with debug info, since practically any generic function caused an ICE before.

One point worth discussing is that activating debug info now automatically (and silently) sets the `no_monomorphic_collapse` flag. Otherwise debug info would show wrong type names in all but one instance of the monomorphized function.

Another thing to note is that the handling of generic types does not strictly follow the DWARF specification. That is, variables with type `T` (where `T=int`) are described as having type `int` and not as having type `T`. In other words, we are losing information whether a variable has been declared with a type parameter as its type. In practice this should not make much of difference though since the concrete type is mostly what one is interested in. I'll post an issue later so this won't be forgotten.

Also included are a number of bug fixes:
* Closes #1758
* Closes #8513
* Closes #8443
* Fixes handling of field names in tuple structs
* Fixes and re-enables test case for option-like enums that relied on undefined behavior before
* Closes #1339 (should have been closed a while ago)

Cheers,
Michael
2013-08-17 15:22:04 -07:00
..
basic-types.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
borrowed-basic.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
borrowed-c-style-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
borrowed-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
borrowed-managed-basic.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
borrowed-struct.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
borrowed-tuple.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
borrowed-unique-basic.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
box.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
boxed-struct.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
boxed-vec.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
by-value-struct-argument.rs debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs. 2013-08-16 22:30:43 +02:00
c-style-enum-in-composite.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
c-style-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
closure-in-generic-function.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
destructured-fn-argument.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
destructured-local.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
evec-in-struct.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
function-arguments.rs debuginfo: Fixed a few things for PR. 2013-07-25 23:05:56 +02:00
generic-function.rs debuginfo: Properly handle monomorphization of generic functions. 2013-08-16 22:30:42 +02:00
generic-functions-nested.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
generic-method-on-generic-struct.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
generic-static-method-on-struct-and-enum.rs debuginfo: Added test cases for static struct and enum methods. 2013-08-16 22:30:43 +02:00
generic-struct-style-enum.rs debuginfo: Added test cases for generic structs and enums. 2013-08-16 22:30:42 +02:00
generic-struct.rs debuginfo: Added test cases for generic structs and enums. 2013-08-16 22:30:42 +02:00
generic-trait-generic-static-default-method.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
generic-tuple-style-enum.rs debuginfo: Added test cases for generic structs and enums. 2013-08-16 22:30:42 +02:00
lexical-scope-in-for-loop.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
lexical-scope-in-if.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
lexical-scope-in-managed-closure.rs debuginfo: Add some tests for visibiliy scopes within closures. 2013-08-13 11:13:49 +02:00
lexical-scope-in-match.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
lexical-scope-in-parameterless-closure.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
lexical-scope-in-stack-closure.rs debuginfo: Add some tests for visibiliy scopes within closures. 2013-08-13 11:13:49 +02:00
lexical-scope-in-unconditional-loop.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
lexical-scope-in-unique-closure.rs debuginfo: Add some tests for visibiliy scopes within closures. 2013-08-13 11:13:49 +02:00
lexical-scope-in-while.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
lexical-scope-with-macro.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
lexical-scopes-in-block-expression.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
managed-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
managed-pointer-within-unique-vec.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
managed-pointer-within-unique.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
method-on-enum.rs debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs. 2013-08-16 22:30:43 +02:00
method-on-generic-struct.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
method-on-struct.rs debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs. 2013-08-16 22:30:43 +02:00
method-on-trait.rs debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs. 2013-08-16 22:30:43 +02:00
method-on-tuple-struct.rs debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs. 2013-08-16 22:30:43 +02:00
multiple-functions-equal-var-names.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
multiple-functions.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
name-shadowing-and-scope-nesting.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
nil-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
option-like-enum.rs debuginfo: Fixed option-like-enum test case so it does not rely on undefined behavior. 2013-08-16 22:27:38 +02:00
packed-struct-with-destructor.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
packed-struct.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
self-in-default-method.rs debuginfo: Implemented support for Self type parameter in trait methods with default implementation. 2013-08-16 22:30:43 +02:00
self-in-generic-default-method.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
shadowed-argument.rs debuginfo: Add support for argument shadowing. 2013-08-13 11:13:49 +02:00
shadowed-variable.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
simple-lexical-scope.rs debuginfo: Implemented proper handling of lexical scopes and variable shadowing. 2013-08-13 11:13:49 +02:00
simple-struct.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
simple-tuple.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
static-method-on-struct-and-enum.rs debuginfo: Added test cases for static struct and enum methods. 2013-08-16 22:30:43 +02:00
struct-in-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
struct-in-struct.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
struct-style-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
struct-with-destructor.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
trait-generic-static-default-method.rs debuginfo: Test cases for [generic][default][static] methods and functions: 2013-08-16 22:30:43 +02:00
tuple-in-struct.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
tuple-in-tuple.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
tuple-struct.rs debuginfo: Added test cases for methods on structs, enums, traits, and tuple-structs. 2013-08-16 22:30:43 +02:00
tuple-style-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
unique-enum.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
vec-slices.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
vec.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00