Commit Graph

14 Commits

Author SHA1 Message Date
Niko Matsakis
890ed5c468 Fallout in tests 2015-04-01 11:22:39 -04:00
Alex Crichton
43bfaa4a33 Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
2015-03-26 12:10:22 -07:00
Tamir Duberstein
d51047ded0 Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
Felix S. Klock II
270f0eef73 Add : Box<_> or ::Box<_> type annotations to various places.
This is the kind of change that one is expected to need to make to
accommodate overloaded-`box`.

----

Note that this is not *all* of the changes necessary to accommodate
Issue 22181.  It is merely the subset of those cases where there was
already a let-binding in place that made it easy to add the necesasry
type ascription.

(For unnamed intermediate `Box` values, one must go down a different
route; `Box::new` is the option that maximizes portability, but has
potential inefficiency depending on whether the call is inlined.)

----

There is one place worth note, `run-pass/coerce-match.rs`, where I
used an ugly form of `Box<_>` type ascription where I would have
preferred to use `Box::new` to accommodate overloaded-`box`.  I
deliberately did not use `Box::new` here, because that is already done
in coerce-match-calls.rs.

----

Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-03-03 20:29:01 +01:00
Eunji Jeong
b1af8648a7 Enable test/debuginfo on android 2015-02-10 15:48:07 +09:00
Jorge Aparicio
bff462302b cleanup: s/impl Copy/#[derive(Copy)]/g 2015-01-25 11:20:38 -05:00
Alex Crichton
0dc48b47a8 Test fixes and rebase conflicts 2015-01-07 19:27:27 -08:00
Michael Woerister
91a0e18866 debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
Niko Matsakis
096a28607f librustc: Make Copy opt-in.
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-08 13:47:44 -05:00
Michael Woerister
54a5a2b365 debuginfo: Make GDB tests use line breakpoints like done in LLDB tests.
On some Windows versions of GDB this is more stable than setting breakpoints via function names.
2014-10-31 18:49:59 +01:00
Michael Woerister
47e8cf7697 debuginfo: Gate all LLDB debuginfo tests on a minimum LLDB version being available 2014-10-22 10:47:45 +02:00
Patrick Walton
00c70d1a80 librustc: Allow the new UFCS explicit self in trait definitions, and
remove `~self` from the test suite.
2014-07-16 23:16:12 -07:00
Michael Woerister
c7f45a9458 debuginfo: Add LLDB autotests to debuginfo test suite.
This commit adds LLDB autotests to the test suite but does not activate them by default yet.
2014-07-16 09:46:31 +02:00
Michael Woerister
55a8bd56e5 debuginfo: Split debuginfo autotests into debuginfo-gdb and debuginfo-lldb 2014-05-07 19:58:07 +02:00