rust/src/test/run-make
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
..
bootstrap-from-c-with-native auto merge of #19133 : nodakai/rust/run-make-tests-missing-extracflags, r=alexcrichton 2014-11-22 14:46:38 +00:00
c-dynamic-dylib rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
c-dynamic-rlib Refactoring: Introduce distinct host and target rpath var setters. 2014-05-18 22:56:26 +02:00
c-link-to-rust-dylib test/run-make: some test cases lacked $(EXTRACFLAGS). 2014-11-20 14:12:57 +08:00
c-link-to-rust-staticlib test: Fix tests for crate_id removal 2014-07-05 12:46:42 -07:00
c-static-dylib rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
c-static-rlib Refactoring: Introduce distinct host and target rpath var setters. 2014-05-18 22:56:26 +02:00
cannot-read-embedded-idents rustc lexer: regression tests for embedded Idents. 2014-08-13 17:41:35 +02:00
codegen-options-parsing Slightly improved rustc error messages for invalid -C arguments 2014-11-15 14:51:22 +01:00
crate-data-smoke rustc: Append platform exe suffix to output files 2014-07-21 11:27:19 -07:00
crate-name-priority rustc: Mix extra-filename in temp outputs 2014-07-18 18:09:08 -07:00
dep-info test: Fix tests for crate_id removal 2014-07-05 12:46:42 -07:00
dep-info-custom Remove a large amount of deprecated functionality 2014-10-19 12:59:40 -07:00
dep-info-spaces Make --dep-info escape spaces in filenames 2014-10-01 11:40:00 -04:00
duplicate-output-flavors Use new attribute syntax in python files in src/etc too (#13478) 2014-04-14 21:00:31 +05:30
dylib-chain rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
error-writing-dependencies rustc: Give a friendlier error when writing deps 2014-04-23 10:04:29 -07:00
extern-diff-internal-name Add regression test for #17186 2014-09-12 18:09:47 -07:00
extern-flag-disambiguates test: Fix tests for crate_id removal 2014-07-05 12:46:42 -07:00
extern-flag-fun test: Fix tests for crate_id removal 2014-07-05 12:46:42 -07:00
extern-fn-generic Allow generic foreign functions. 2014-08-05 23:28:50 -06:00
extern-fn-mangle Add new tests for extern and foreign fns and name mangling. 2014-08-05 23:28:50 -06:00
extern-fn-reachable std: Move dynamic_lib from std::unstable to std 2014-06-09 17:46:53 -07:00
extern-fn-with-packed-struct librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
extern-fn-with-union rustc: Link entire archives of native libraries 2014-08-04 11:02:26 -07:00
extra-filename-with-temp-outputs rustc: Mix extra-filename in temp outputs 2014-07-18 18:09:08 -07:00
graphviz-flowgraph Switch to purely namespaced enums 2014-11-17 07:35:51 -08:00
interdependent-c-libraries rustc: Deterministically link upstream C libraries 2014-04-11 12:20:33 -07:00
intrinsic-unreachable Add tests for intrinsics::unreachable 2014-10-04 20:09:09 -07:00
invalid-library rustc: Better error when loading invalid libraries 2014-03-01 23:36:28 -08:00
issue-7349 don't translate items when monomorphizing foreign-ABI functions 2014-08-08 11:26:21 -07:00
issue-11908 Test fixes and rebase conflicts 2014-07-05 12:46:42 -07:00
issue-12446 Use new attribute syntax in python files in src/etc too (#13478) 2014-04-14 21:00:31 +05:30
issue-14500 Move -Z lto to -C lto. 2014-09-21 02:17:31 -04:00
issue-15460 rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
issue-19371 Fix various references in late-running tests and things 2014-12-05 01:52:18 -05:00
libs-and-bins rustc: Remove the session building_library flag 2014-05-02 15:26:45 -07:00
libs-through-symlinks Remove a large amount of deprecated functionality 2014-10-19 12:59:40 -07:00
link-path-order Added test for link path ordering 2014-09-07 11:42:02 +02:00
linkage-attr-on-static Add tests. 2014-11-17 15:24:34 -05:00
ls-metadata Move --ls behind -Z ls 2014-04-16 17:45:06 +02:00
lto-readonly-lib rustc: Fix permission denied error in 'ar' when lto is enabled 2014-09-29 15:07:14 +02:00
lto-smoke Move -Z lto to -C lto. 2014-09-21 02:17:31 -04:00
lto-smoke-c Move -Z lto to -C lto. 2014-09-21 02:17:31 -04:00
lto-syntax-extension Remove a large amount of deprecated functionality 2014-10-19 12:59:40 -07:00
manual-crate-name rustc: Repurpose the --crate-name CLI flag 2014-07-05 12:46:42 -07:00
manual-link rustc: Implement -l and include! tweaks 2014-10-30 19:02:11 -07:00
many-crates-but-no-match Remove a large amount of deprecated functionality 2014-10-19 12:59:40 -07:00
metadata-flag-frobs-symbols test: Fix tests for crate_id removal 2014-07-05 12:46:42 -07:00
mismatching-target-triples Tweak and add test for detecting libraries with mismatching target triples. 2014-11-13 13:40:25 +11:00
missing-crate-dependency Refactoring: Introduce distinct host and target rpath var setters. 2014-05-18 22:56:26 +02:00
mixing-deps rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
mixing-formats rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
mixing-libs Refactoring: Introduce distinct host and target rpath var setters. 2014-05-18 22:56:26 +02:00
multiple-versions test: Fix tests for crate_id removal 2014-07-05 12:46:42 -07:00
no-duplicate-libs Update infrastructure for fail -> panic 2014-10-29 16:06:13 -04:00
no-intermediate-extras Remove workaround of #13793/#10872 2014-08-18 13:45:08 +09:00
no-stack-check Disable no-stack-check test on Windows 2014-10-09 21:26:51 -07:00
obey-crate-type-flag Refactoring: Introduce distinct host and target rpath var setters. 2014-05-18 22:56:26 +02:00
output-type-permutations don't leave unwanted temporary files with --emit=ir/asm 2014-09-05 09:18:57 -07:00
prefer-dylib rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
prefer-rlib extern mod => extern crate 2014-02-14 22:55:21 -08:00
pretty-expanded pprust: Handle multi-stmt/no-expr ExprFnBlock 2014-04-16 16:02:18 +09:00
pretty-expanded-hygiene rustc: implement a pretty mode to print ident/name's ctxt & gensyms. 2014-08-30 16:50:38 +10:00
pretty-print-path-suffix pretty printer: Added some run-make tests of path-suffix lookup functionality. 2014-08-09 10:19:06 +02:00
pretty-print-to-file Generalized the pretty-print entry points to support -o <file>. 2014-04-10 15:21:59 -07:00
prune-link-args test: Fix run-make on windows 2014-04-28 11:45:30 +09:00
relocation-model Add support for different relocation models 2014-04-06 15:06:44 +02:00
rlib-chain Use new attribute syntax in python files in src/etc too (#13478) 2014-04-14 21:00:31 +05:30
rustdoc-hidden-line Implement flexible target specification 2014-11-04 05:07:47 -05:00
rustdoc-json Remove a large amount of deprecated functionality 2014-10-19 12:59:40 -07:00
rustdoc-recursion rustdoc: Don't try to inline the crate root 2014-09-23 15:19:30 -07:00
rustdoc-search-index Add a simple test for rustdoc search index contents 2014-08-26 22:03:39 -04:00
rustdoc-smoke Remove a large amount of deprecated functionality 2014-10-19 12:59:40 -07:00
rustdoc-where test: Don't depend on /bin/bash 2014-10-02 19:34:26 -07:00
save-analysis Switch to purely namespaced enums 2014-11-17 07:35:51 -08:00
sepcomp-cci-copies test: Convert statics to constants 2014-10-09 09:44:52 -07:00
sepcomp-inlining add tests for separate compilation 2014-09-05 09:18:57 -07:00
sepcomp-separate add tests for separate compilation 2014-09-05 09:18:57 -07:00
simple-dylib rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
simple-rlib extern mod => extern crate 2014-02-14 22:55:21 -08:00
static-dylib-by-default test/run-make: another missing $(EXTRACFLAGS). 2014-12-02 04:52:29 +08:00
static-unwinding Rename fail! to panic! 2014-10-29 11:43:07 -04:00
staticlib-blank-lib Use new attribute syntax in python files in src/etc too (#13478) 2014-04-14 21:00:31 +05:30
suspicious-library rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
symbols-are-reasonable rustc: use Name numbers rather than the Show impl for constants. 2014-08-04 16:32:35 +10:00
symlinked-extern Properly canonicalize crate paths specified via --extern 2014-08-15 14:40:09 +02:00
symlinked-libraries rustc: Default to static linking dylibs 2014-11-03 15:08:20 -08:00
target-specs librustc: Make Copy opt-in. 2014-12-08 13:47:44 -05:00
test-harness Continue cfg syntax transition 2014-10-12 11:40:19 -07:00
test-shard-completeness test: index shards at 1, not 0 2014-05-19 14:27:29 -07:00
unicode-input Remove a large amount of deprecated functionality 2014-10-19 12:59:40 -07:00
version Stabilize version output for rustc and rustdoc 2014-06-24 17:24:34 -07:00
volatile-intrinsics std: Move intrinsics to std::intrinsics. 2014-02-23 01:07:53 -08:00
weird-output-filenames rustc: Default #[crate_name] on input, not output 2014-07-05 12:46:42 -07:00
tools.mk test: readd TMPDIR to LD_LIBRARY_PATH for run-make 2014-06-23 13:12:37 +02:00