rust/src/test/pretty
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
..
asm-clobbers.rs syntax: Make asm! clobbers a proper vector. 2014-11-30 11:58:23 +09:00
attr-fn-inner.rs Test fixes from rollup 2014-04-04 15:57:45 -07:00
blank-lines.rs test: Fix test. rs=test 2013-03-19 21:55:23 -07:00
block-comment-multiple-asterisks.rs Fix a pretty printer crash on /***. 2014-02-27 12:16:18 +11:00
block-comment-trailing-whitespace.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
block-comment-trailing-whitespace2.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
block-comment-wchar.pp libsyntax: Forbid escapes in the inclusive range \x80-\xff in 2014-11-04 14:58:11 -08:00
block-comment-wchar.rs libsyntax: Forbid escapes in the inclusive range \x80-\xff in 2014-11-04 14:58:11 -08:00
block-disambig.rs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
closure-reform-pretty.rs Implement generalized object and type parameter bounds (Fixes #16462) 2014-08-27 21:46:52 -04:00
disamb-stmt-expr.rs librustc: Fix merge fallout. 2013-11-26 11:04:39 -08:00
do1.rs librustc: Fix merge fallout. 2013-11-26 11:04:39 -08:00
doc-comments.rs Test fixes from rollup 2014-04-04 15:57:45 -07:00
empty-impl.pp Stop accepting 'impl ...;', require {} instead 2013-09-24 14:12:02 -07:00
empty-impl.rs Added tests to make tidy 2014-02-07 12:49:24 -06:00
empty-lines.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
example1.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
example2.pp tests: relicense .pp files. Oddly not caught during local testing. 2012-12-10 18:15:39 -08:00
example2.rs Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
fn-types.rs librustc: Convert ~fn() to proc() everywhere. 2013-11-18 18:27:31 -08:00
for-comment.rs Fix warnings it tests 2013-08-17 08:42:35 -07:00
issue-929.rs Rename fail! to panic! 2014-10-29 11:43:07 -04:00
issue-4264.pp test: adjust pretty/issue-4264 for formatting changes. 2014-12-08 09:14:21 +02:00
issue-4264.rs test: Convert statics to constants 2014-10-09 09:44:52 -07:00
issue-19077.rs Fixes to the roll-up 2014-11-23 15:23:39 -05:00
match-block-expr.rs Fix a bug pretty printing match { 5i } { _ => { } } 2014-07-29 15:51:03 -07:00
match-naked-expr-medium.rs Fix a bug pretty printing match { 5i } { _ => { } } 2014-07-29 15:51:03 -07:00
match-naked-expr.rs Fix a bug pretty printing match { 5i } { _ => { } } 2014-07-29 15:51:03 -07:00
path-type-bounds.rs Implement generalized object and type parameter bounds (Fixes #16462) 2014-08-27 21:46:52 -04:00
raw-str-nonexpr.rs Convert cfg syntax to new system 2014-09-27 22:59:26 -07:00
record-trailing-comma.rs Change xfail directives in compiletests to ignore, closes #11363 2014-02-11 18:23:20 +01:00
struct-pattern.rs Preserve struct field pattern shorthand in the prettyprinter. 2014-10-27 00:35:35 -07:00
struct-tuple.rs Added tests to make tidy 2014-02-07 12:49:24 -06:00
tag-blank-lines.rs Add enum variants to the type namespace 2014-09-19 15:11:00 +12:00
unary-op-disambig.rs librustc: Remove the fallback to int for integers and f64 for 2014-06-29 11:47:58 -07:00
vec-comments.pp librustc: Remove the fallback to int for integers and f64 for 2014-06-29 11:47:58 -07:00
vec-comments.rs librustc: Remove the fallback to int for integers and f64 for 2014-06-29 11:47:58 -07:00