From f035b3d2463a0b1ddd4208b086094a6822d1388b Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 18 Sep 2017 13:34:01 +0200 Subject: [PATCH] Remove all non-CTFE stuff from the miri repository --- .gitignore | 6 - .travis.yml | 45 -- Cargo.lock | 413 ----------- Cargo.toml | 39 - LICENSE-APACHE | 201 ----- LICENSE-MIT | 25 - README.md | 103 --- appveyor.yml | 41 -- benches/fibonacci.rs | 26 - benches/helpers/fibonacci_helper.rs | 8 - benches/helpers/fibonacci_helper_iterative.rs | 15 - benches/helpers/miri_helper.rs | 75 -- benches/helpers/mod.rs | 7 - benches/helpers/repeat.rs | 4 - benches/helpers/repeat_manual.rs | 7 - benches/helpers/smoke_helper.rs | 2 - benches/repeat.rs | 16 - benches/smoke.rs | 35 - build.rs | 8 - cargo-miri-test/Cargo.lock | 14 - cargo-miri-test/Cargo.toml | 7 - cargo-miri-test/src/main.rs | 9 - cargo-miri-test/tests/foo.rs | 4 - miri/bin/cargo-miri.rs | 212 ------ miri/bin/miri.rs | 265 ------- miri/fn_call.rs | 656 ----------------- miri/helpers.rs | 73 -- miri/intrinsic.rs | 685 ------------------ miri/lib.rs | 311 -------- miri/memory.rs | 16 - miri/operator.rs | 175 ----- miri/tls.rs | 142 ---- rustc_tests/Cargo.lock | 217 ------ rustc_tests/Cargo.toml | 7 - rustc_tests/src/main.rs | 292 -------- src/librustc_mir/Cargo.toml | 19 - src/librustc_mir/lib.rs | 26 - .../undefined_byte_read.rs | 9 - tests/compile-fail/alignment.rs | 11 - tests/compile-fail/assume.rs | 10 - tests/compile-fail/bitop-beyond-alignment.rs | 37 - tests/compile-fail/cast_box_int_to_fn_ptr.rs | 11 - tests/compile-fail/cast_fn_ptr.rs | 9 - tests/compile-fail/cast_fn_ptr2.rs | 9 - tests/compile-fail/cast_fn_ptr_unsafe.rs | 10 - tests/compile-fail/cast_fn_ptr_unsafe2.rs | 10 - tests/compile-fail/cast_int_to_fn_ptr.rs | 10 - tests/compile-fail/copy_nonoverlapping.rs | 24 - tests/compile-fail/ctlz_nonzero.rs | 15 - tests/compile-fail/cttz_nonzero.rs | 15 - tests/compile-fail/dangling_pointer_deref.rs | 8 - .../compile-fail/deallocate-bad-alignment.rs | 15 - tests/compile-fail/deallocate-bad-size.rs | 15 - tests/compile-fail/deallocate-twice.rs | 16 - tests/compile-fail/deref_fn_ptr.rs | 8 - tests/compile-fail/div-by-zero-2.rs | 15 - tests/compile-fail/div-by-zero.rs | 21 - tests/compile-fail/execute_memory.rs | 12 - tests/compile-fail/fn_ptr_offset.rs | 14 - tests/compile-fail/invalid_bool.rs | 4 - .../compile-fail/invalid_enum_discriminant.rs | 17 - tests/compile-fail/match_char.rs | 8 - tests/compile-fail/memleak.rs | 5 - tests/compile-fail/memleak_rc.rs | 12 - tests/compile-fail/modifying_constants.rs | 6 - tests/compile-fail/never_say_never.rs | 15 - tests/compile-fail/never_transmute_humans.rs | 17 - tests/compile-fail/never_transmute_void.rs | 19 - tests/compile-fail/null_pointer_deref.rs | 4 - tests/compile-fail/oom.rs | 7 - tests/compile-fail/oom2.rs | 14 - tests/compile-fail/out_of_bounds_ptr_1.rs | 8 - tests/compile-fail/out_of_bounds_ptr_2.rs | 7 - tests/compile-fail/out_of_bounds_read.rs | 5 - tests/compile-fail/out_of_bounds_read2.rs | 5 - tests/compile-fail/overflowing-lsh-neg.rs | 16 - tests/compile-fail/overflowing-rsh-2.rs | 16 - tests/compile-fail/overflowing-rsh.rs | 15 - .../compile-fail/overflowing-unchecked-rsh.rs | 21 - ..._of_relocation_makes_the_rest_undefined.rs | 11 - tests/compile-fail/panic.rs | 7 - tests/compile-fail/pointer_byte_read_1.rs | 7 - tests/compile-fail/pointer_byte_read_2.rs | 7 - ...o_different_allocations_are_unorderable.rs | 7 - tests/compile-fail/ptr_bitops.rs | 7 - tests/compile-fail/ptr_int_cast.rs | 8 - tests/compile-fail/ptr_offset_overflow.rs | 6 - tests/compile-fail/reading_half_a_pointer.rs | 29 - .../reallocate-bad-alignment-2.rs | 16 - .../compile-fail/reallocate-bad-alignment.rs | 16 - tests/compile-fail/reallocate-bad-size.rs | 15 - tests/compile-fail/reallocate-change-alloc.rs | 14 - tests/compile-fail/reallocate-dangling.rs | 16 - tests/compile-fail/reference_to_packed.rs | 19 - tests/compile-fail/repeat.rs | 5 - tests/compile-fail/repeat2.rs | 5 - tests/compile-fail/stack_free.rs | 7 - tests/compile-fail/stack_limit.rs | 20 - .../static_memory_modification.rs | 9 - .../static_memory_modification2.rs | 12 - .../static_memory_modification3.rs | 9 - tests/compile-fail/timeout.rs | 9 - tests/compile-fail/transmute-pair-undef.rs | 20 - tests/compile-fail/transmute_fat.rs | 15 - tests/compile-fail/transmute_fat2.rs | 13 - tests/compile-fail/unaligned_ptr_cast.rs | 6 - tests/compile-fail/unaligned_ptr_cast2.rs | 7 - tests/compile-fail/unaligned_ptr_cast_zst.rs | 6 - .../compile-fail/validation_aliasing_mut1.rs | 10 - .../compile-fail/validation_aliasing_mut2.rs | 10 - .../compile-fail/validation_aliasing_mut3.rs | 10 - .../compile-fail/validation_aliasing_mut4.rs | 13 - .../validation_buggy_as_mut_slice.rs | 20 - .../validation_buggy_split_at_mut.rs | 22 - .../compile-fail/validation_illegal_write.rs | 15 - .../compile-fail/validation_lock_confusion.rs | 24 - .../validation_pointer_smuggling.rs | 20 - tests/compile-fail/validation_recover1.rs | 16 - tests/compile-fail/validation_recover2.rs | 14 - tests/compile-fail/validation_recover3.rs | 15 - tests/compile-fail/validation_undef.rs | 14 - tests/compile-fail/wild_pointer_deref.rs | 5 - tests/compile-fail/zst.rs | 4 - tests/compiletest.rs | 213 ------ tests/run-pass-fullmir/catch.rs | 8 - tests/run-pass-fullmir/catch.stdout | 1 - tests/run-pass-fullmir/foreign-fn-linkname.rs | 37 - tests/run-pass-fullmir/format.rs | 4 - tests/run-pass-fullmir/format.stdout | 1 - tests/run-pass-fullmir/from_utf8.rs | 4 - tests/run-pass-fullmir/hashmap.rs | 26 - tests/run-pass-fullmir/heap.rs | 35 - tests/run-pass-fullmir/hello.rs | 4 - tests/run-pass-fullmir/hello.stdout | 1 - tests/run-pass-fullmir/integer-ops.rs | 175 ----- tests/run-pass-fullmir/issue-15080.rs | 34 - tests/run-pass-fullmir/issue-3794.rs | 42 -- tests/run-pass-fullmir/issue-3794.stdout | 2 - tests/run-pass-fullmir/loop-break-value.rs | 143 ---- tests/run-pass-fullmir/move-arg-2-unique.rs | 22 - tests/run-pass-fullmir/regions-mock-trans.rs | 66 -- tests/run-pass-fullmir/u128.rs | 79 -- tests/run-pass-fullmir/unsized-tuple-impls.rs | 25 - tests/run-pass-fullmir/vecs.rs | 52 -- tests/run-pass/arrays.rs | 45 -- tests/run-pass/associated-const.rs | 21 - tests/run-pass/assume_bug.rs | 3 - tests/run-pass/atomic-access-bool.rs | 30 - tests/run-pass/atomic-compare_exchange.rs | 36 - tests/run-pass/aux_test.rs | 9 - tests/run-pass/auxiliary/dep.rs | 1 - tests/run-pass/bad_substs.rs | 4 - tests/run-pass/binops.rs | 91 --- tests/run-pass/bools.rs | 28 - tests/run-pass/box_box_trait.rs | 29 - tests/run-pass/btreemap.rs | 17 - tests/run-pass/c_enums.rs | 32 - tests/run-pass/call_drop_on_array_elements.rs | 22 - .../call_drop_on_fat_ptr_array_elements.rs | 20 - .../call_drop_on_zst_array_elements.rs | 21 - .../run-pass/call_drop_through_owned_slice.rs | 16 - .../call_drop_through_trait_object.rs | 20 - .../call_drop_through_trait_object_rc.rs | 22 - tests/run-pass/calls.rs | 45 -- tests/run-pass/cast-rfc0401-vtable-kinds.rs | 59 -- tests/run-pass/cast_fn_ptr.rs | 9 - tests/run-pass/cast_fn_ptr_unsafe.rs | 8 - tests/run-pass/char.rs | 9 - tests/run-pass/closure-drop.rs | 25 - tests/run-pass/closure-field-ty.rs | 10 - tests/run-pass/closures.rs | 48 -- tests/run-pass/const-vec-of-fns.rs | 29 - tests/run-pass/constants.rs | 9 - tests/run-pass/deriving-associated-types.rs | 208 ------ tests/run-pass/drop_empty_slice.rs | 7 - tests/run-pass/dst-field-align.rs | 77 -- tests/run-pass/dst-irrefutable-bind.rs | 24 - tests/run-pass/dst-raw.rs | 113 --- tests/run-pass/dst-struct-sole.rs | 85 --- tests/run-pass/dst-struct.rs | 134 ---- .../enum-nullable-const-null-with-fields.rs | 22 - tests/run-pass/enums.rs | 34 - tests/run-pass/float_fast_math.rs | 30 - tests/run-pass/floats.rs | 11 - .../fn_item_as_closure_trait_object.rs | 6 - ..._item_with_args_as_closure_trait_object.rs | 8 - ...h_multiple_args_as_closure_trait_object.rs | 18 - .../fn_ptr_as_closure_trait_object.rs | 15 - tests/run-pass/function_pointers.rs | 46 -- tests/run-pass/generator_control_flow.rs | 65 -- tests/run-pass/intrinsics-integer.rs | 142 ---- tests/run-pass/intrinsics-math.rs | 67 -- tests/run-pass/intrinsics.rs | 10 - tests/run-pass/ints.rs | 58 -- tests/run-pass/issue-15063.rs | 20 - tests/run-pass/issue-15523-big.rs | 48 -- tests/run-pass/issue-17877.rs | 25 - tests/run-pass/issue-20575.rs | 19 - tests/run-pass/issue-23261.rs | 70 -- tests/run-pass/issue-26709.rs | 26 - tests/run-pass/issue-27901.rs | 20 - tests/run-pass/issue-29746.rs | 45 -- tests/run-pass/issue-30530.rs | 35 - tests/run-pass/issue-31267-additional.rs | 29 - tests/run-pass/issue-33387.rs | 19 - tests/run-pass/issue-34571.rs | 20 - tests/run-pass/issue-35815.rs | 25 - tests/run-pass/issue-36278-prefix-nesting.rs | 28 - tests/run-pass/issue-5917.rs | 17 - tests/run-pass/issue-miri-184.rs | 4 - tests/run-pass/iter_slice.rs | 12 - tests/run-pass/last-use-in-cap-clause.rs | 25 - tests/run-pass/loops.rs | 35 - tests/run-pass/main_fn.rs | 5 - tests/run-pass/many_shr_bor.rs | 36 - tests/run-pass/match_slice.rs | 8 - tests/run-pass/mir_coercions.rs | 80 -- tests/run-pass/mir_fat_ptr.rs | 61 -- tests/run-pass/miri-issue-133.rs | 30 - tests/run-pass/move-arg-3-unique.rs | 18 - tests/run-pass/move-undef-primval.rs | 15 - tests/run-pass/multi_arg_closure.rs | 8 - tests/run-pass/negative_discriminant.rs | 13 - .../run-pass/non_capture_closure_to_fn_ptr.rs | 14 - tests/run-pass/observed_local_mut.rs | 21 - tests/run-pass/option_box_transmute_ptr.rs | 15 - tests/run-pass/option_eq.rs | 3 - tests/run-pass/overloaded-calls-simple.rs | 33 - tests/run-pass/packed_static.rs | 10 - tests/run-pass/packed_struct.rs | 69 -- tests/run-pass/pointers.rs | 60 -- tests/run-pass/products.rs | 32 - tests/run-pass/ptr_arith_offset.rs | 6 - tests/run-pass/ptr_arith_offset_overflow.rs | 9 - tests/run-pass/ptr_int_casts.rs | 35 - tests/run-pass/ptr_offset.rs | 6 - tests/run-pass/rc.rs | 39 - tests/run-pass/recursive_static.rs | 12 - tests/run-pass/ref-invalid-ptr.rs | 7 - .../regions-lifetime-nonfree-late-bound.rs | 45 -- tests/run-pass/rfc1623.rs | 81 --- tests/run-pass/rust-lang-org.rs | 21 - tests/run-pass/send-is-not-static-par-for.rs | 43 -- tests/run-pass/sendable-class.rs | 34 - .../simd-intrinsic-generic-elements.rs | 42 -- tests/run-pass/slice-of-zero-size-elements.rs | 58 -- tests/run-pass/small_enum_size_bug.rs | 14 - tests/run-pass/specialization.rs | 21 - tests/run-pass/static_memory_modification.rs | 8 - tests/run-pass/static_mut.rs | 17 - tests/run-pass/std.rs | 33 - tests/run-pass/strings.rs | 27 - tests/run-pass/subslice_array.rs | 14 - tests/run-pass/sums.rs | 59 -- tests/run-pass/tag-align-dyn-u64.rs | 37 - tests/run-pass/thread-local.rs | 67 -- .../too-large-primval-write-problem.rs | 23 - tests/run-pass/traits.rs | 30 - tests/run-pass/trivial.rs | 11 - tests/run-pass/try-operator-custom.rs | 13 - .../tuple_like_enum_variant_constructor.rs | 3 - ...ke_enum_variant_constructor_pointer_opt.rs | 4 - ..._variant_constructor_struct_pointer_opt.rs | 33 - .../run-pass/tuple_like_struct_constructor.rs | 5 - tests/run-pass/union-overwrite.rs | 81 --- tests/run-pass/union.rs | 88 --- tests/run-pass/unique-send.rs | 20 - .../validation_lifetime_resolution.rs | 30 - tests/run-pass/vec-matching-fold.rs | 58 -- tests/run-pass/write-bytes.rs | 45 -- tests/run-pass/zero-sized-binary-heap-push.rs | 28 - tests/run-pass/zst.rs | 18 - tests/run-pass/zst2.rs | 12 - tests/run-pass/zst_box.rs | 8 - tests/run-pass/zst_variant_drop.rs | 23 - tex/final-presentation/latexmkrc | 12 - tex/final-presentation/rust-logo-512x512.png | Bin 96029 -> 0 bytes tex/final-presentation/slides.tex | 444 ------------ tex/report/latexmkrc | 12 - tex/report/miri-report.tex | 663 ----------------- xargo/Cargo.lock | 4 - xargo/Cargo.toml | 6 - xargo/Xargo.toml | 2 - xargo/build.sh | 3 - xargo/src/lib.rs | 0 285 files changed, 11610 deletions(-) delete mode 100644 .gitignore delete mode 100644 .travis.yml delete mode 100644 Cargo.lock delete mode 100644 Cargo.toml delete mode 100644 LICENSE-APACHE delete mode 100644 LICENSE-MIT delete mode 100644 README.md delete mode 100644 appveyor.yml delete mode 100644 benches/fibonacci.rs delete mode 100644 benches/helpers/fibonacci_helper.rs delete mode 100644 benches/helpers/fibonacci_helper_iterative.rs delete mode 100644 benches/helpers/miri_helper.rs delete mode 100644 benches/helpers/mod.rs delete mode 100644 benches/helpers/repeat.rs delete mode 100644 benches/helpers/repeat_manual.rs delete mode 100644 benches/helpers/smoke_helper.rs delete mode 100644 benches/repeat.rs delete mode 100644 benches/smoke.rs delete mode 100644 build.rs delete mode 100644 cargo-miri-test/Cargo.lock delete mode 100644 cargo-miri-test/Cargo.toml delete mode 100644 cargo-miri-test/src/main.rs delete mode 100644 cargo-miri-test/tests/foo.rs delete mode 100644 miri/bin/cargo-miri.rs delete mode 100644 miri/bin/miri.rs delete mode 100644 miri/fn_call.rs delete mode 100644 miri/helpers.rs delete mode 100644 miri/intrinsic.rs delete mode 100644 miri/lib.rs delete mode 100644 miri/memory.rs delete mode 100644 miri/operator.rs delete mode 100644 miri/tls.rs delete mode 100644 rustc_tests/Cargo.lock delete mode 100644 rustc_tests/Cargo.toml delete mode 100644 rustc_tests/src/main.rs delete mode 100644 src/librustc_mir/Cargo.toml delete mode 100644 src/librustc_mir/lib.rs delete mode 100644 tests/compile-fail-fullmir/undefined_byte_read.rs delete mode 100644 tests/compile-fail/alignment.rs delete mode 100644 tests/compile-fail/assume.rs delete mode 100644 tests/compile-fail/bitop-beyond-alignment.rs delete mode 100644 tests/compile-fail/cast_box_int_to_fn_ptr.rs delete mode 100644 tests/compile-fail/cast_fn_ptr.rs delete mode 100644 tests/compile-fail/cast_fn_ptr2.rs delete mode 100644 tests/compile-fail/cast_fn_ptr_unsafe.rs delete mode 100644 tests/compile-fail/cast_fn_ptr_unsafe2.rs delete mode 100644 tests/compile-fail/cast_int_to_fn_ptr.rs delete mode 100644 tests/compile-fail/copy_nonoverlapping.rs delete mode 100644 tests/compile-fail/ctlz_nonzero.rs delete mode 100644 tests/compile-fail/cttz_nonzero.rs delete mode 100644 tests/compile-fail/dangling_pointer_deref.rs delete mode 100644 tests/compile-fail/deallocate-bad-alignment.rs delete mode 100644 tests/compile-fail/deallocate-bad-size.rs delete mode 100644 tests/compile-fail/deallocate-twice.rs delete mode 100644 tests/compile-fail/deref_fn_ptr.rs delete mode 100644 tests/compile-fail/div-by-zero-2.rs delete mode 100644 tests/compile-fail/div-by-zero.rs delete mode 100644 tests/compile-fail/execute_memory.rs delete mode 100644 tests/compile-fail/fn_ptr_offset.rs delete mode 100644 tests/compile-fail/invalid_bool.rs delete mode 100644 tests/compile-fail/invalid_enum_discriminant.rs delete mode 100644 tests/compile-fail/match_char.rs delete mode 100644 tests/compile-fail/memleak.rs delete mode 100644 tests/compile-fail/memleak_rc.rs delete mode 100644 tests/compile-fail/modifying_constants.rs delete mode 100644 tests/compile-fail/never_say_never.rs delete mode 100644 tests/compile-fail/never_transmute_humans.rs delete mode 100644 tests/compile-fail/never_transmute_void.rs delete mode 100644 tests/compile-fail/null_pointer_deref.rs delete mode 100644 tests/compile-fail/oom.rs delete mode 100644 tests/compile-fail/oom2.rs delete mode 100644 tests/compile-fail/out_of_bounds_ptr_1.rs delete mode 100644 tests/compile-fail/out_of_bounds_ptr_2.rs delete mode 100644 tests/compile-fail/out_of_bounds_read.rs delete mode 100644 tests/compile-fail/out_of_bounds_read2.rs delete mode 100644 tests/compile-fail/overflowing-lsh-neg.rs delete mode 100644 tests/compile-fail/overflowing-rsh-2.rs delete mode 100644 tests/compile-fail/overflowing-rsh.rs delete mode 100644 tests/compile-fail/overflowing-unchecked-rsh.rs delete mode 100644 tests/compile-fail/overwriting_part_of_relocation_makes_the_rest_undefined.rs delete mode 100644 tests/compile-fail/panic.rs delete mode 100644 tests/compile-fail/pointer_byte_read_1.rs delete mode 100644 tests/compile-fail/pointer_byte_read_2.rs delete mode 100644 tests/compile-fail/pointers_to_different_allocations_are_unorderable.rs delete mode 100644 tests/compile-fail/ptr_bitops.rs delete mode 100644 tests/compile-fail/ptr_int_cast.rs delete mode 100644 tests/compile-fail/ptr_offset_overflow.rs delete mode 100644 tests/compile-fail/reading_half_a_pointer.rs delete mode 100644 tests/compile-fail/reallocate-bad-alignment-2.rs delete mode 100644 tests/compile-fail/reallocate-bad-alignment.rs delete mode 100644 tests/compile-fail/reallocate-bad-size.rs delete mode 100644 tests/compile-fail/reallocate-change-alloc.rs delete mode 100644 tests/compile-fail/reallocate-dangling.rs delete mode 100644 tests/compile-fail/reference_to_packed.rs delete mode 100644 tests/compile-fail/repeat.rs delete mode 100644 tests/compile-fail/repeat2.rs delete mode 100644 tests/compile-fail/stack_free.rs delete mode 100644 tests/compile-fail/stack_limit.rs delete mode 100644 tests/compile-fail/static_memory_modification.rs delete mode 100644 tests/compile-fail/static_memory_modification2.rs delete mode 100644 tests/compile-fail/static_memory_modification3.rs delete mode 100644 tests/compile-fail/timeout.rs delete mode 100644 tests/compile-fail/transmute-pair-undef.rs delete mode 100644 tests/compile-fail/transmute_fat.rs delete mode 100644 tests/compile-fail/transmute_fat2.rs delete mode 100644 tests/compile-fail/unaligned_ptr_cast.rs delete mode 100644 tests/compile-fail/unaligned_ptr_cast2.rs delete mode 100644 tests/compile-fail/unaligned_ptr_cast_zst.rs delete mode 100644 tests/compile-fail/validation_aliasing_mut1.rs delete mode 100644 tests/compile-fail/validation_aliasing_mut2.rs delete mode 100644 tests/compile-fail/validation_aliasing_mut3.rs delete mode 100644 tests/compile-fail/validation_aliasing_mut4.rs delete mode 100644 tests/compile-fail/validation_buggy_as_mut_slice.rs delete mode 100644 tests/compile-fail/validation_buggy_split_at_mut.rs delete mode 100644 tests/compile-fail/validation_illegal_write.rs delete mode 100644 tests/compile-fail/validation_lock_confusion.rs delete mode 100644 tests/compile-fail/validation_pointer_smuggling.rs delete mode 100644 tests/compile-fail/validation_recover1.rs delete mode 100644 tests/compile-fail/validation_recover2.rs delete mode 100644 tests/compile-fail/validation_recover3.rs delete mode 100644 tests/compile-fail/validation_undef.rs delete mode 100644 tests/compile-fail/wild_pointer_deref.rs delete mode 100644 tests/compile-fail/zst.rs delete mode 100644 tests/compiletest.rs delete mode 100644 tests/run-pass-fullmir/catch.rs delete mode 100644 tests/run-pass-fullmir/catch.stdout delete mode 100644 tests/run-pass-fullmir/foreign-fn-linkname.rs delete mode 100644 tests/run-pass-fullmir/format.rs delete mode 100644 tests/run-pass-fullmir/format.stdout delete mode 100644 tests/run-pass-fullmir/from_utf8.rs delete mode 100644 tests/run-pass-fullmir/hashmap.rs delete mode 100644 tests/run-pass-fullmir/heap.rs delete mode 100644 tests/run-pass-fullmir/hello.rs delete mode 100644 tests/run-pass-fullmir/hello.stdout delete mode 100644 tests/run-pass-fullmir/integer-ops.rs delete mode 100644 tests/run-pass-fullmir/issue-15080.rs delete mode 100644 tests/run-pass-fullmir/issue-3794.rs delete mode 100644 tests/run-pass-fullmir/issue-3794.stdout delete mode 100644 tests/run-pass-fullmir/loop-break-value.rs delete mode 100644 tests/run-pass-fullmir/move-arg-2-unique.rs delete mode 100644 tests/run-pass-fullmir/regions-mock-trans.rs delete mode 100644 tests/run-pass-fullmir/u128.rs delete mode 100644 tests/run-pass-fullmir/unsized-tuple-impls.rs delete mode 100644 tests/run-pass-fullmir/vecs.rs delete mode 100644 tests/run-pass/arrays.rs delete mode 100644 tests/run-pass/associated-const.rs delete mode 100644 tests/run-pass/assume_bug.rs delete mode 100644 tests/run-pass/atomic-access-bool.rs delete mode 100644 tests/run-pass/atomic-compare_exchange.rs delete mode 100644 tests/run-pass/aux_test.rs delete mode 100644 tests/run-pass/auxiliary/dep.rs delete mode 100644 tests/run-pass/bad_substs.rs delete mode 100644 tests/run-pass/binops.rs delete mode 100644 tests/run-pass/bools.rs delete mode 100644 tests/run-pass/box_box_trait.rs delete mode 100644 tests/run-pass/btreemap.rs delete mode 100644 tests/run-pass/c_enums.rs delete mode 100644 tests/run-pass/call_drop_on_array_elements.rs delete mode 100644 tests/run-pass/call_drop_on_fat_ptr_array_elements.rs delete mode 100644 tests/run-pass/call_drop_on_zst_array_elements.rs delete mode 100644 tests/run-pass/call_drop_through_owned_slice.rs delete mode 100644 tests/run-pass/call_drop_through_trait_object.rs delete mode 100644 tests/run-pass/call_drop_through_trait_object_rc.rs delete mode 100644 tests/run-pass/calls.rs delete mode 100644 tests/run-pass/cast-rfc0401-vtable-kinds.rs delete mode 100644 tests/run-pass/cast_fn_ptr.rs delete mode 100644 tests/run-pass/cast_fn_ptr_unsafe.rs delete mode 100644 tests/run-pass/char.rs delete mode 100644 tests/run-pass/closure-drop.rs delete mode 100644 tests/run-pass/closure-field-ty.rs delete mode 100644 tests/run-pass/closures.rs delete mode 100644 tests/run-pass/const-vec-of-fns.rs delete mode 100644 tests/run-pass/constants.rs delete mode 100644 tests/run-pass/deriving-associated-types.rs delete mode 100644 tests/run-pass/drop_empty_slice.rs delete mode 100644 tests/run-pass/dst-field-align.rs delete mode 100644 tests/run-pass/dst-irrefutable-bind.rs delete mode 100644 tests/run-pass/dst-raw.rs delete mode 100644 tests/run-pass/dst-struct-sole.rs delete mode 100644 tests/run-pass/dst-struct.rs delete mode 100644 tests/run-pass/enum-nullable-const-null-with-fields.rs delete mode 100644 tests/run-pass/enums.rs delete mode 100644 tests/run-pass/float_fast_math.rs delete mode 100644 tests/run-pass/floats.rs delete mode 100644 tests/run-pass/fn_item_as_closure_trait_object.rs delete mode 100644 tests/run-pass/fn_item_with_args_as_closure_trait_object.rs delete mode 100644 tests/run-pass/fn_item_with_multiple_args_as_closure_trait_object.rs delete mode 100644 tests/run-pass/fn_ptr_as_closure_trait_object.rs delete mode 100644 tests/run-pass/function_pointers.rs delete mode 100644 tests/run-pass/generator_control_flow.rs delete mode 100644 tests/run-pass/intrinsics-integer.rs delete mode 100644 tests/run-pass/intrinsics-math.rs delete mode 100755 tests/run-pass/intrinsics.rs delete mode 100644 tests/run-pass/ints.rs delete mode 100644 tests/run-pass/issue-15063.rs delete mode 100644 tests/run-pass/issue-15523-big.rs delete mode 100644 tests/run-pass/issue-17877.rs delete mode 100644 tests/run-pass/issue-20575.rs delete mode 100644 tests/run-pass/issue-23261.rs delete mode 100644 tests/run-pass/issue-26709.rs delete mode 100644 tests/run-pass/issue-27901.rs delete mode 100644 tests/run-pass/issue-29746.rs delete mode 100644 tests/run-pass/issue-30530.rs delete mode 100644 tests/run-pass/issue-31267-additional.rs delete mode 100644 tests/run-pass/issue-33387.rs delete mode 100644 tests/run-pass/issue-34571.rs delete mode 100644 tests/run-pass/issue-35815.rs delete mode 100644 tests/run-pass/issue-36278-prefix-nesting.rs delete mode 100644 tests/run-pass/issue-5917.rs delete mode 100644 tests/run-pass/issue-miri-184.rs delete mode 100644 tests/run-pass/iter_slice.rs delete mode 100644 tests/run-pass/last-use-in-cap-clause.rs delete mode 100644 tests/run-pass/loops.rs delete mode 100644 tests/run-pass/main_fn.rs delete mode 100644 tests/run-pass/many_shr_bor.rs delete mode 100644 tests/run-pass/match_slice.rs delete mode 100644 tests/run-pass/mir_coercions.rs delete mode 100644 tests/run-pass/mir_fat_ptr.rs delete mode 100644 tests/run-pass/miri-issue-133.rs delete mode 100644 tests/run-pass/move-arg-3-unique.rs delete mode 100644 tests/run-pass/move-undef-primval.rs delete mode 100644 tests/run-pass/multi_arg_closure.rs delete mode 100644 tests/run-pass/negative_discriminant.rs delete mode 100644 tests/run-pass/non_capture_closure_to_fn_ptr.rs delete mode 100644 tests/run-pass/observed_local_mut.rs delete mode 100644 tests/run-pass/option_box_transmute_ptr.rs delete mode 100644 tests/run-pass/option_eq.rs delete mode 100644 tests/run-pass/overloaded-calls-simple.rs delete mode 100644 tests/run-pass/packed_static.rs delete mode 100644 tests/run-pass/packed_struct.rs delete mode 100644 tests/run-pass/pointers.rs delete mode 100644 tests/run-pass/products.rs delete mode 100644 tests/run-pass/ptr_arith_offset.rs delete mode 100644 tests/run-pass/ptr_arith_offset_overflow.rs delete mode 100644 tests/run-pass/ptr_int_casts.rs delete mode 100644 tests/run-pass/ptr_offset.rs delete mode 100644 tests/run-pass/rc.rs delete mode 100644 tests/run-pass/recursive_static.rs delete mode 100644 tests/run-pass/ref-invalid-ptr.rs delete mode 100644 tests/run-pass/regions-lifetime-nonfree-late-bound.rs delete mode 100644 tests/run-pass/rfc1623.rs delete mode 100644 tests/run-pass/rust-lang-org.rs delete mode 100644 tests/run-pass/send-is-not-static-par-for.rs delete mode 100644 tests/run-pass/sendable-class.rs delete mode 100644 tests/run-pass/simd-intrinsic-generic-elements.rs delete mode 100644 tests/run-pass/slice-of-zero-size-elements.rs delete mode 100644 tests/run-pass/small_enum_size_bug.rs delete mode 100644 tests/run-pass/specialization.rs delete mode 100644 tests/run-pass/static_memory_modification.rs delete mode 100644 tests/run-pass/static_mut.rs delete mode 100644 tests/run-pass/std.rs delete mode 100644 tests/run-pass/strings.rs delete mode 100644 tests/run-pass/subslice_array.rs delete mode 100644 tests/run-pass/sums.rs delete mode 100644 tests/run-pass/tag-align-dyn-u64.rs delete mode 100644 tests/run-pass/thread-local.rs delete mode 100644 tests/run-pass/too-large-primval-write-problem.rs delete mode 100644 tests/run-pass/traits.rs delete mode 100644 tests/run-pass/trivial.rs delete mode 100644 tests/run-pass/try-operator-custom.rs delete mode 100644 tests/run-pass/tuple_like_enum_variant_constructor.rs delete mode 100644 tests/run-pass/tuple_like_enum_variant_constructor_pointer_opt.rs delete mode 100644 tests/run-pass/tuple_like_enum_variant_constructor_struct_pointer_opt.rs delete mode 100644 tests/run-pass/tuple_like_struct_constructor.rs delete mode 100644 tests/run-pass/union-overwrite.rs delete mode 100644 tests/run-pass/union.rs delete mode 100644 tests/run-pass/unique-send.rs delete mode 100644 tests/run-pass/validation_lifetime_resolution.rs delete mode 100644 tests/run-pass/vec-matching-fold.rs delete mode 100644 tests/run-pass/write-bytes.rs delete mode 100644 tests/run-pass/zero-sized-binary-heap-push.rs delete mode 100644 tests/run-pass/zst.rs delete mode 100644 tests/run-pass/zst2.rs delete mode 100644 tests/run-pass/zst_box.rs delete mode 100644 tests/run-pass/zst_variant_drop.rs delete mode 100644 tex/final-presentation/latexmkrc delete mode 100644 tex/final-presentation/rust-logo-512x512.png delete mode 100644 tex/final-presentation/slides.tex delete mode 100644 tex/report/latexmkrc delete mode 100644 tex/report/miri-report.tex delete mode 100644 xargo/Cargo.lock delete mode 100644 xargo/Cargo.toml delete mode 100644 xargo/Xargo.toml delete mode 100755 xargo/build.sh delete mode 100644 xargo/src/lib.rs diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d32d9eb99afd..000000000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -target -/doc -tex/*/out -*.dot -*.mir -*.rs.bk diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 86577702e96d..000000000000 --- a/.travis.yml +++ /dev/null @@ -1,45 +0,0 @@ -language: rust -rust: -- nightly -before_script: -- export PATH=$HOME/.local/bin:$PATH -- rustup target add i686-unknown-linux-gnu -- rustup target add i686-pc-windows-gnu -- rustup target add i686-pc-windows-msvc -- rustup component add rust-src -- cargo install --git https://github.com/japaric/xargo.git -- export RUST_SYSROOT=$HOME/rust -script: -- set -e -- | - # get ourselves a MIR-ful libstd - xargo/build.sh -- | - # Test plain miri - cargo build --locked --release --all-features && - cargo test --locked --release --all-features --all && - cargo install --locked --all-features -- | - # Test cargo miri - cd cargo-miri-test && - cargo miri && - cargo miri test && - cd .. -- | - # and run all tests with full mir - MIRI_SYSROOT=~/.xargo/HOST cargo test --locked --release -- | - # test that the rustc_tests binary compiles - cd rustc_tests && - cargo build --locked --release && - cd .. -notifications: - email: - on_success: never -branches: - only: - - master -env: - global: - - RUST_TEST_NOCAPTURE=1 - - TRAVIS_CARGO_NIGHTLY_FEATURE="" diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index c84d79a089c3..000000000000 --- a/Cargo.lock +++ /dev/null @@ -1,413 +0,0 @@ -[root] -name = "rustc_miri" -version = "0.1.0" -dependencies = [ - "backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "aho-corasick" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cargo_metadata" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "compiletest_rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "conv" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "custom_derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "diff" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "dtoa" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "env_logger" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "filetime" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "gcc" -version = "0.3.53" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "getopts" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "itoa" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lazy_static" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.30" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log_settings" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "magenta" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "magenta-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "memchr" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miri" -version = "0.1.0" -dependencies = [ - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "compiletest_rs 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_miri 0.1.0", -] - -[[package]] -name = "num-traits" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "quote" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rand" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-demangle" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_derive" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive_internals" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "0.11.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "synom" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tempdir" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-xid" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" -"checksum backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99f2ce94e22b8e664d95c57fff45b98a966c2252b60691d0b7aeeccd88d70983" -"checksum backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c" -"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" -"checksum cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "be1057b8462184f634c3a208ee35b0f935cfd94b694b26deadccd98732088d7b" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum compiletest_rs 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "86f4663adfd113e17109c35c2067194eca782a5baf9c90f4696ca13d04631adb" -"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" -"checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" -"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -"checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472" -"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" -"checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" -"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" -"checksum gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)" = "e8310f7e9c890398b0e80e301c4f474e9918d2b27fca8f48486ca775fa9ffc5a" -"checksum getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "65922871abd2f101a2eb0eaebadc66668e54a87ad9c3dd82520b5f86ede5eff9" -"checksum itoa 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f74cf6ca1bdbc28496a2b9798ab7fccc2ca5a42cace95bb2b219577216a5fb90" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" -"checksum libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)" = "2370ca07ec338939e356443dac2296f581453c35fe1e3a3ed06023c49435f915" -"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" -"checksum log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d382732ea0fbc09790c4899db3255bdea0fc78b54bf234bd18a63bb603915b6" -"checksum magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527" -"checksum magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699" -"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" -"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0" -"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf" -"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b" -"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db" -"checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f7726f29ddf9731b17ff113c461e362c381d9d69433f79de4f3dd572488823e9" -"checksum serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cf823e706be268e73e7747b147aa31c8f633ab4ba31f115efb57e5047c3a76dd" -"checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a" -"checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" -"checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14" -"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index b3db572871da..000000000000 --- a/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -authors = ["Scott Olson "] -description = "An experimental interpreter for Rust MIR." -license = "MIT/Apache-2.0" -name = "miri" -repository = "https://github.com/solson/miri" -version = "0.1.0" -build = "build.rs" - -[[bin]] -doc = false -name = "miri" -path = "miri/bin/miri.rs" - -[[bin]] -doc = false -name = "cargo-miri" -path = "miri/bin/cargo-miri.rs" -required-features = ["cargo_miri"] - -[lib] -path = "miri/lib.rs" - -[dependencies] -byteorder = { version = "1.1", features = ["i128"]} -env_logger = "0.4.3" -log = "0.3.6" -log_settings = "0.1.1" -cargo_metadata = { version = "0.2", optional = true } -rustc_miri = { path = "src/librustc_mir" } - -[features] -cargo_miri = ["cargo_metadata"] - -[dev-dependencies] -compiletest_rs = { version = "0.3", features = ["tmp"] } - -[workspace] -exclude = ["xargo", "cargo-miri-test", "rustc_tests"] diff --git a/LICENSE-APACHE b/LICENSE-APACHE deleted file mode 100644 index a32595fa70bc..000000000000 --- a/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright 2016 The Miri Developers - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/LICENSE-MIT b/LICENSE-MIT deleted file mode 100644 index 1f9d89a5862b..000000000000 --- a/LICENSE-MIT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2016 The Miri Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 22cb5aed79b1..000000000000 --- a/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Miri [[slides](https://solson.me/miri-slides.pdf)] [[report](https://solson.me/miri-report.pdf)] [![Build Status](https://travis-ci.org/solson/miri.svg?branch=master)](https://travis-ci.org/solson/miri) [![Windows build status](https://ci.appveyor.com/api/projects/status/github/solson/miri?svg=true)](https://ci.appveyor.com/project/solson63299/miri) - - -An experimental interpreter for [Rust][rust]'s [mid-level intermediate -representation][mir] (MIR). This project began as part of my work for the -undergraduate research course at the [University of Saskatchewan][usask]. - -## Installing Rust - -I recommend that you install [rustup][rustup] and then use it to install the -current Rust nightly version: - -```sh -rustup update nightly -``` - -You should also make `nightly` the default version for your Miri directory by -running the following command while you're in it. If you don't do this, you can -run the later `cargo` commands by using `cargo +nightly` instead. - -```sh -rustup override add nightly -``` - -## Building Miri - -```sh -cargo build -``` - -If Miri fails to build, it's likely because a change in the latest nightly -compiler broke it. You could try an older nightly with `rustup update -nightly-` where `` is a few days or weeks ago, e.g. `2016-05-20` for -May 20th. Otherwise, you could notify me in an issue or on IRC. Or, if you know -how to fix it, you could send a PR. :smile: - -## Running tests - -```sh -cargo run --bin miri tests/run-pass/vecs.rs # Or whatever test you like. -``` - -## Debugging - -You can get detailed, statement-by-statement traces by setting the `MIRI_LOG` -environment variable to `trace`. These traces are indented based on call stack -depth. You can get a much less verbose set of information with other logging -levels such as `warn`. - -## Running miri on your own project('s test suite) - -Install miri as a cargo subcommand with `cargo install --debug`. -Then, inside your own project, use `cargo +nightly miri` to run your project, if it is -a bin project, or run `cargo +nightly miri test` to run all tests in your project -through miri. - -## Running miri with full libstd - -Per default libstd does not contain the MIR of non-polymorphic functions. When -miri hits a call to such a function, execution terminates. To fix this, it is -possible to compile libstd with full MIR: - -```sh -rustup component add rust-src -cargo install xargo -cd xargo/ -RUSTFLAGS='-Zalways-encode-mir' xargo build -``` - -Now you can run miri against the libstd compiled by xargo: - -```sh -MIRI_SYSROOT=~/.xargo/HOST cargo run --bin miri tests/run-pass-fullmir/vecs.rs -``` - -Notice that you will have to re-run the last step of the preparations above when -your toolchain changes (e.g., when you update the nightly). - -## Contributing and getting help - -Check out the issues on this GitHub repository for some ideas. There's lots that -needs to be done that I haven't documented in the issues yet, however. For more -ideas or help with running or hacking on Miri, you can contact me (`scott`) on -Mozilla IRC in any of the Rust IRC channels (`#rust`, `#rust-offtopic`, etc). - -## License - -Licensed under either of - * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or - http://www.apache.org/licenses/LICENSE-2.0) - * MIT license ([LICENSE-MIT](LICENSE-MIT) or - http://opensource.org/licenses/MIT) at your option. - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in the work by you shall be dual licensed as above, without any -additional terms or conditions. - -[rust]: https://www.rust-lang.org/ -[mir]: https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md -[usask]: https://www.usask.ca/ -[rustup]: https://www.rustup.rs diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 86f9b19af87f..000000000000 --- a/appveyor.yml +++ /dev/null @@ -1,41 +0,0 @@ -environment: - global: - PROJECT_NAME: miri - matrix: - - TARGET: i686-pc-windows-msvc - MSYS2_BITS: 32 - - TARGET: x86_64-pc-windows-msvc - MSYS2_BITS: 64 - -# branches to build -branches: - # whitelist - only: - - master - -install: - - set PATH=C:\Program Files\Git\mingw64\bin;%PATH% - - curl -sSf -o rustup-init.exe https://win.rustup.rs/ - - rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin;C:\Users\appveyor\.rustup\toolchains\nightly-%TARGET%\bin - - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin - - rustc -V - - cargo -V - - rustup component add rust-src - - cargo install --git https://github.com/japaric/xargo.git - - cd xargo - - set RUSTFLAGS=-Zalways-encode-mir -Zmir-emit-validate=1 - - xargo build - - set RUSTFLAGS= - - cd .. - -build: false - -test_script: - - set RUST_BACKTRACE=1 - - cargo build --locked --release - - cargo test --locked --release - -notifications: - - provider: Email - on_build_success: false diff --git a/benches/fibonacci.rs b/benches/fibonacci.rs deleted file mode 100644 index 90b231a32bfb..000000000000 --- a/benches/fibonacci.rs +++ /dev/null @@ -1,26 +0,0 @@ -#![feature(test, rustc_private)] - -extern crate test; -use test::Bencher; -mod helpers; -use helpers::*; - -#[bench] -fn fib(bencher: &mut Bencher) { - bencher.iter(|| { fibonacci_helper::main(); }) -} - -#[bench] -fn fib_miri(bencher: &mut Bencher) { - miri_helper::run("fibonacci_helper", bencher); -} - -#[bench] -fn fib_iter(bencher: &mut Bencher) { - bencher.iter(|| { fibonacci_helper_iterative::main(); }) -} - -#[bench] -fn fib_iter_miri(bencher: &mut Bencher) { - miri_helper::run("fibonacci_helper_iterative", bencher); -} diff --git a/benches/helpers/fibonacci_helper.rs b/benches/helpers/fibonacci_helper.rs deleted file mode 100644 index 586f1ce7da4d..000000000000 --- a/benches/helpers/fibonacci_helper.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[inline(never)] -pub fn main() { - assert_eq!(fib(10), 55); -} - -fn fib(n: usize) -> usize { - if n <= 2 { 1 } else { fib(n - 1) + fib(n - 2) } -} diff --git a/benches/helpers/fibonacci_helper_iterative.rs b/benches/helpers/fibonacci_helper_iterative.rs deleted file mode 100644 index 59283be4820f..000000000000 --- a/benches/helpers/fibonacci_helper_iterative.rs +++ /dev/null @@ -1,15 +0,0 @@ -#[inline(never)] -pub fn main() { - assert_eq!(fib(10), 55); -} - -fn fib(n: usize) -> usize { - let mut a = 0; - let mut b = 1; - for _ in 0..n { - let c = a; - a = b; - b = c + b; - } - a -} diff --git a/benches/helpers/miri_helper.rs b/benches/helpers/miri_helper.rs deleted file mode 100644 index 6657ba119976..000000000000 --- a/benches/helpers/miri_helper.rs +++ /dev/null @@ -1,75 +0,0 @@ -extern crate getopts; -extern crate miri; -extern crate rustc; -extern crate rustc_driver; -extern crate test; - -use self::miri::eval_main; -use self::rustc::session::Session; -use self::rustc_driver::{driver, CompilerCalls, Compilation}; -use std::cell::RefCell; -use std::rc::Rc; -use test::Bencher; - -pub struct MiriCompilerCalls<'a>(Rc>); - -fn find_sysroot() -> String { - // Taken from https://github.com/Manishearth/rust-clippy/pull/911. - let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME")); - let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN")); - match (home, toolchain) { - (Some(home), Some(toolchain)) => format!("{}/toolchains/{}", home, toolchain), - _ => { - option_env!("RUST_SYSROOT") - .expect( - "need to specify RUST_SYSROOT env var or use rustup or multirust", - ) - .to_owned() - } - } -} - -pub fn run(filename: &str, bencher: &mut Bencher) { - let args = &[ - "miri".to_string(), - format!("benches/helpers/{}.rs", filename), - "--sysroot".to_string(), - find_sysroot(), - ]; - let compiler_calls = &mut MiriCompilerCalls(Rc::new(RefCell::new(bencher))); - rustc_driver::run_compiler(args, compiler_calls, None, None); -} - -impl<'a> CompilerCalls<'a> for MiriCompilerCalls<'a> { - fn build_controller( - &mut self, - _: &Session, - _: &getopts::Matches, - ) -> driver::CompileController<'a> { - let mut control: driver::CompileController<'a> = driver::CompileController::basic(); - - let bencher = self.0.clone(); - - control.after_analysis.stop = Compilation::Stop; - control.after_analysis.callback = Box::new(move |state| { - state.session.abort_if_errors(); - - let tcx = state.tcx.unwrap(); - let (entry_node_id, _) = state.session.entry_fn.borrow().expect( - "no main or start function found", - ); - let entry_def_id = tcx.map.local_def_id(entry_node_id); - - let memory_size = 100 * 1024 * 1024; // 100MB - let step_limit = 1000_000; - let stack_limit = 100; - bencher.borrow_mut().iter(|| { - eval_main(tcx, entry_def_id, memory_size, step_limit, stack_limit); - }); - - state.session.abort_if_errors(); - }); - - control - } -} diff --git a/benches/helpers/mod.rs b/benches/helpers/mod.rs deleted file mode 100644 index 27504a2cc034..000000000000 --- a/benches/helpers/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -// This module gets included in multiple crates, and they each only use part of it. -#![allow(dead_code)] - -pub mod fibonacci_helper; -pub mod fibonacci_helper_iterative; -pub mod miri_helper; -pub mod smoke_helper; diff --git a/benches/helpers/repeat.rs b/benches/helpers/repeat.rs deleted file mode 100644 index 0e8c5980b82b..000000000000 --- a/benches/helpers/repeat.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let data: [u8; 1024] = [42; 1024]; - assert_eq!(data.len(), 1024); -} diff --git a/benches/helpers/repeat_manual.rs b/benches/helpers/repeat_manual.rs deleted file mode 100644 index 6ef6f724efce..000000000000 --- a/benches/helpers/repeat_manual.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let mut data: [u8; 1024] = unsafe { std::mem::uninitialized() }; - for i in 0..data.len() { - unsafe { std::ptr::write(&mut data[i], 0); } - } - assert_eq!(data.len(), 1024); -} diff --git a/benches/helpers/smoke_helper.rs b/benches/helpers/smoke_helper.rs deleted file mode 100644 index e81db817aeac..000000000000 --- a/benches/helpers/smoke_helper.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[inline(never)] -pub fn main() {} diff --git a/benches/repeat.rs b/benches/repeat.rs deleted file mode 100644 index f5920e83d9b0..000000000000 --- a/benches/repeat.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![feature(test, rustc_private)] - -extern crate test; -use test::Bencher; -mod helpers; -use helpers::*; - -#[bench] -fn repeat(bencher: &mut Bencher) { - miri_helper::run("repeat", bencher); -} - -#[bench] -fn repeat_manual(bencher: &mut Bencher) { - miri_helper::run("repeat_manual", bencher); -} diff --git a/benches/smoke.rs b/benches/smoke.rs deleted file mode 100644 index 1dbc4fed82f1..000000000000 --- a/benches/smoke.rs +++ /dev/null @@ -1,35 +0,0 @@ -#![feature(test, rustc_private)] - -extern crate test; -use test::Bencher; -mod helpers; -use helpers::*; - -#[bench] -fn noop(bencher: &mut Bencher) { - bencher.iter(|| { smoke_helper::main(); }) -} - -/* -// really slow -#[bench] -fn noop_miri_full(bencher: &mut Bencher) { - let path = std::env::var("RUST_SYSROOT").expect("env variable `RUST_SYSROOT` not set"); - bencher.iter(|| { - let mut process = std::process::Command::new("target/release/miri"); - process.arg("benches/smoke_helper.rs") - .arg("--sysroot").arg(&path); - let output = process.output().unwrap(); - if !output.status.success() { - println!("{}", String::from_utf8(output.stdout).unwrap()); - println!("{}", String::from_utf8(output.stderr).unwrap()); - panic!("failed to run miri"); - } - }) -} -*/ - -#[bench] -fn noop_miri_interpreter(bencher: &mut Bencher) { - miri_helper::run("smoke_helper", bencher); -} diff --git a/build.rs b/build.rs deleted file mode 100644 index 2f74f7f4f616..000000000000 --- a/build.rs +++ /dev/null @@ -1,8 +0,0 @@ -use std::env; - -fn main() { - // Forward the profile to the main compilation - println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap()); - // Don't rebuild miri even if nothing changed - println!("cargo:rerun-if-changed=build.rs"); -} diff --git a/cargo-miri-test/Cargo.lock b/cargo-miri-test/Cargo.lock deleted file mode 100644 index 8b2387fa6410..000000000000 --- a/cargo-miri-test/Cargo.lock +++ /dev/null @@ -1,14 +0,0 @@ -[root] -name = "cargo-miri-test" -version = "0.1.0" -dependencies = [ - "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "byteorder" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8" diff --git a/cargo-miri-test/Cargo.toml b/cargo-miri-test/Cargo.toml deleted file mode 100644 index 5fbe923f23d3..000000000000 --- a/cargo-miri-test/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "cargo-miri-test" -version = "0.1.0" -authors = ["Oliver Schneider "] - -[dependencies] -byteorder = "1.0" \ No newline at end of file diff --git a/cargo-miri-test/src/main.rs b/cargo-miri-test/src/main.rs deleted file mode 100644 index 07b0e4cee4e5..000000000000 --- a/cargo-miri-test/src/main.rs +++ /dev/null @@ -1,9 +0,0 @@ -extern crate byteorder; - -use byteorder::{BigEndian, ByteOrder}; - -fn main() { - let buf = &[1,2,3,4]; - let n = ::read_u32(buf); - assert_eq!(n, 0x01020304); -} diff --git a/cargo-miri-test/tests/foo.rs b/cargo-miri-test/tests/foo.rs deleted file mode 100644 index fb7fad21c9db..000000000000 --- a/cargo-miri-test/tests/foo.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[test] -fn bar() { - assert_eq!(4, 4); -} diff --git a/miri/bin/cargo-miri.rs b/miri/bin/cargo-miri.rs deleted file mode 100644 index 06d5b3e9971f..000000000000 --- a/miri/bin/cargo-miri.rs +++ /dev/null @@ -1,212 +0,0 @@ -extern crate cargo_metadata; - -use std::path::{PathBuf, Path}; -use std::io::Write; -use std::process::Command; - - -const CARGO_MIRI_HELP: &str = r#"Interprets bin crates - -Usage: - cargo miri [options] [--] [...] - -Common options: - -h, --help Print this message - --features Features to compile for the package - -V, --version Print version info and exit - -Other options are the same as `cargo rustc`. - -The feature `cargo-miri` is automatically defined for convenience. You can use -it to configure the resource limits - - #![cfg_attr(feature = "cargo-miri", memory_size = 42)] - -available resource limits are `memory_size`, `step_limit`, `stack_limit` -"#; - -fn show_help() { - println!("{}", CARGO_MIRI_HELP); -} - -fn show_version() { - println!("{}", env!("CARGO_PKG_VERSION")); -} - -fn main() { - // Check for version and help flags even when invoked as 'cargo-miri' - if std::env::args().any(|a| a == "--help" || a == "-h") { - show_help(); - return; - } - if std::env::args().any(|a| a == "--version" || a == "-V") { - show_version(); - return; - } - - if let Some("miri") = std::env::args().nth(1).as_ref().map(AsRef::as_ref) { - // this arm is when `cargo miri` is called - - let test = std::env::args().nth(2).map_or(false, |text| text == "test"); - let skip = if test { 3 } else { 2 }; - - let manifest_path_arg = std::env::args().skip(skip).find(|val| { - val.starts_with("--manifest-path=") - }); - - let mut metadata = if let Ok(metadata) = cargo_metadata::metadata( - manifest_path_arg.as_ref().map(AsRef::as_ref), - ) - { - metadata - } else { - let _ = std::io::stderr().write_fmt(format_args!( - "error: Could not obtain cargo metadata." - )); - std::process::exit(101); - }; - - let manifest_path = manifest_path_arg.map(|arg| { - PathBuf::from(Path::new(&arg["--manifest-path=".len()..])) - }); - - let current_dir = std::env::current_dir(); - - let package_index = metadata - .packages - .iter() - .position(|package| { - let package_manifest_path = Path::new(&package.manifest_path); - if let Some(ref manifest_path) = manifest_path { - package_manifest_path == manifest_path - } else { - let current_dir = current_dir.as_ref().expect( - "could not read current directory", - ); - let package_manifest_directory = package_manifest_path.parent().expect( - "could not find parent directory of package manifest", - ); - package_manifest_directory == current_dir - } - }) - .expect("could not find matching package"); - let package = metadata.packages.remove(package_index); - for target in package.targets { - let args = std::env::args().skip(skip); - let kind = target.kind.get(0).expect( - "badly formatted cargo metadata: target::kind is an empty array", - ); - if test && kind == "test" { - if let Err(code) = process( - vec!["--test".to_string(), target.name].into_iter().chain( - args, - ), - ) - { - std::process::exit(code); - } - } else if !test && kind == "bin" { - if let Err(code) = process( - vec!["--bin".to_string(), target.name].into_iter().chain( - args, - ), - ) - { - std::process::exit(code); - } - } - } - } else { - // this arm is executed when cargo-miri runs `cargo rustc` with the `RUSTC` env var set to itself - - let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME")); - let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN")); - let sys_root = if let (Some(home), Some(toolchain)) = (home, toolchain) { - format!("{}/toolchains/{}", home, toolchain) - } else { - option_env!("RUST_SYSROOT") - .map(|s| s.to_owned()) - .or_else(|| { - Command::new("rustc") - .arg("--print") - .arg("sysroot") - .output() - .ok() - .and_then(|out| String::from_utf8(out.stdout).ok()) - .map(|s| s.trim().to_owned()) - }) - .expect("need to specify RUST_SYSROOT env var during miri compilation, or use rustup or multirust") - }; - - // this conditional check for the --sysroot flag is there so users can call `cargo-miri` directly - // without having to pass --sysroot or anything - let mut args: Vec = if std::env::args().any(|s| s == "--sysroot") { - std::env::args().skip(1).collect() - } else { - std::env::args() - .skip(1) - .chain(Some("--sysroot".to_owned())) - .chain(Some(sys_root)) - .collect() - }; - - // this check ensures that dependencies are built but not interpreted and the final crate is - // interpreted but not built - let miri_enabled = std::env::args().any(|s| s == "-Zno-trans"); - - let mut command = if miri_enabled { - let mut path = std::env::current_exe().expect("current executable path invalid"); - path.set_file_name("miri"); - Command::new(path) - } else { - Command::new("rustc") - }; - - args.extend_from_slice(&["-Z".to_owned(), "always-encode-mir".to_owned()]); - args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-miri""#.to_owned()]); - - match command.args(&args).status() { - Ok(exit) => { - if !exit.success() { - std::process::exit(exit.code().unwrap_or(42)); - } - } - Err(ref e) if miri_enabled => panic!("error during miri run: {:?}", e), - Err(ref e) => panic!("error during rustc call: {:?}", e), - } - } -} - -fn process(old_args: I) -> Result<(), i32> -where - I: Iterator, -{ - let mut args = vec!["rustc".to_owned()]; - - let mut found_dashes = false; - for arg in old_args { - found_dashes |= arg == "--"; - args.push(arg); - } - if !found_dashes { - args.push("--".to_owned()); - } - args.push("-Zno-trans".to_owned()); - args.push("--cfg".to_owned()); - args.push(r#"feature="cargo-miri""#.to_owned()); - - let path = std::env::current_exe().expect("current executable path invalid"); - let exit_status = std::process::Command::new("cargo") - .args(&args) - .env("RUSTC", path) - .spawn() - .expect("could not run cargo") - .wait() - .expect("failed to wait for cargo?"); - - if exit_status.success() { - Ok(()) - } else { - Err(exit_status.code().unwrap_or(-1)) - } -} diff --git a/miri/bin/miri.rs b/miri/bin/miri.rs deleted file mode 100644 index d38f63610a0e..000000000000 --- a/miri/bin/miri.rs +++ /dev/null @@ -1,265 +0,0 @@ -#![feature(rustc_private, i128_type)] - -extern crate getopts; -extern crate miri; -extern crate rustc; -extern crate rustc_driver; -extern crate rustc_errors; -extern crate env_logger; -extern crate log_settings; -extern crate syntax; -extern crate log; - -use rustc::session::Session; -use rustc::middle::cstore::CrateStore; -use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls}; -use rustc_driver::driver::{CompileState, CompileController}; -use rustc::session::config::{self, Input, ErrorOutputType}; -use rustc::hir::{self, itemlikevisit}; -use rustc::ty::TyCtxt; -use syntax::ast::{self, MetaItemKind, NestedMetaItemKind}; -use std::path::PathBuf; - -struct MiriCompilerCalls { - default: RustcDefaultCalls, -} - -impl<'a> CompilerCalls<'a> for MiriCompilerCalls { - fn early_callback( - &mut self, - matches: &getopts::Matches, - sopts: &config::Options, - cfg: &ast::CrateConfig, - descriptions: &rustc_errors::registry::Registry, - output: ErrorOutputType, - ) -> Compilation { - self.default.early_callback( - matches, - sopts, - cfg, - descriptions, - output, - ) - } - fn no_input( - &mut self, - matches: &getopts::Matches, - sopts: &config::Options, - cfg: &ast::CrateConfig, - odir: &Option, - ofile: &Option, - descriptions: &rustc_errors::registry::Registry, - ) -> Option<(Input, Option)> { - self.default.no_input( - matches, - sopts, - cfg, - odir, - ofile, - descriptions, - ) - } - fn late_callback( - &mut self, - matches: &getopts::Matches, - sess: &Session, - cstore: &CrateStore, - input: &Input, - odir: &Option, - ofile: &Option, - ) -> Compilation { - self.default.late_callback(matches, sess, cstore, input, odir, ofile) - } - fn build_controller( - &mut self, - sess: &Session, - matches: &getopts::Matches, - ) -> CompileController<'a> { - let mut control = self.default.build_controller(sess, matches); - control.after_hir_lowering.callback = Box::new(after_hir_lowering); - control.after_analysis.callback = Box::new(after_analysis); - if sess.target.target != sess.host { - // only fully compile targets on the host. linking will fail for cross-compilation. - control.after_analysis.stop = Compilation::Stop; - } - control - } -} - -fn after_hir_lowering(state: &mut CompileState) { - let attr = ( - String::from("miri"), - syntax::feature_gate::AttributeType::Whitelisted, - ); - state.session.plugin_attributes.borrow_mut().push(attr); -} - -fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) { - state.session.abort_if_errors(); - - let tcx = state.tcx.unwrap(); - let limits = resource_limits_from_attributes(state); - - if std::env::args().any(|arg| arg == "--test") { - struct Visitor<'a, 'tcx: 'a>( - miri::ResourceLimits, - TyCtxt<'a, 'tcx, 'tcx>, - &'a CompileState<'a, 'tcx> - ); - impl<'a, 'tcx: 'a, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'a, 'tcx> { - fn visit_item(&mut self, i: &'hir hir::Item) { - if let hir::Item_::ItemFn(_, _, _, _, _, body_id) = i.node { - if i.attrs.iter().any(|attr| { - attr.name().map_or(false, |n| n == "test") - }) - { - let did = self.1.hir.body_owner_def_id(body_id); - println!( - "running test: {}", - self.1.hir.def_path(did).to_string(self.1) - ); - miri::eval_main(self.1, did, None, self.0); - self.2.session.abort_if_errors(); - } - } - } - fn visit_trait_item(&mut self, _trait_item: &'hir hir::TraitItem) {} - fn visit_impl_item(&mut self, _impl_item: &'hir hir::ImplItem) {} - } - state.hir_crate.unwrap().visit_all_item_likes( - &mut Visitor(limits, tcx, state), - ); - } else if let Some((entry_node_id, _)) = *state.session.entry_fn.borrow() { - let entry_def_id = tcx.hir.local_def_id(entry_node_id); - let start_wrapper = tcx.lang_items().start_fn().and_then(|start_fn| { - if tcx.is_mir_available(start_fn) { - Some(start_fn) - } else { - None - } - }); - miri::eval_main(tcx, entry_def_id, start_wrapper, limits); - - state.session.abort_if_errors(); - } else { - println!("no main function found, assuming auxiliary build"); - } -} - -fn resource_limits_from_attributes(state: &CompileState) -> miri::ResourceLimits { - let mut limits = miri::ResourceLimits::default(); - let krate = state.hir_crate.as_ref().unwrap(); - let err_msg = "miri attributes need to be in the form `miri(key = value)`"; - let extract_int = |lit: &syntax::ast::Lit| -> u128 { - match lit.node { - syntax::ast::LitKind::Int(i, _) => i, - _ => { - state.session.span_fatal( - lit.span, - "expected an integer literal", - ) - } - } - }; - - for attr in krate.attrs.iter().filter(|a| { - a.name().map_or(false, |n| n == "miri") - }) - { - if let Some(items) = attr.meta_item_list() { - for item in items { - if let NestedMetaItemKind::MetaItem(ref inner) = item.node { - if let MetaItemKind::NameValue(ref value) = inner.node { - match &inner.name().as_str()[..] { - "memory_size" => limits.memory_size = extract_int(value) as u64, - "step_limit" => limits.step_limit = extract_int(value) as u64, - "stack_limit" => limits.stack_limit = extract_int(value) as usize, - _ => state.session.span_err(item.span, "unknown miri attribute"), - } - } else { - state.session.span_err(inner.span, err_msg); - } - } else { - state.session.span_err(item.span, err_msg); - } - } - } else { - state.session.span_err(attr.span, err_msg); - } - } - limits -} - -fn init_logger() { - let format = |record: &log::LogRecord| { - if record.level() == log::LogLevel::Trace { - // prepend spaces to indent the final string - let indentation = log_settings::settings().indentation; - format!( - "{lvl}:{module}:{indent: String { - if let Ok(sysroot) = std::env::var("MIRI_SYSROOT") { - return sysroot; - } - - // Taken from https://github.com/Manishearth/rust-clippy/pull/911. - let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME")); - let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN")); - match (home, toolchain) { - (Some(home), Some(toolchain)) => format!("{}/toolchains/{}", home, toolchain), - _ => { - option_env!("RUST_SYSROOT") - .expect( - "need to specify RUST_SYSROOT env var or use rustup or multirust", - ) - .to_owned() - } - } -} - -fn main() { - init_logger(); - let mut args: Vec = std::env::args().collect(); - - let sysroot_flag = String::from("--sysroot"); - if !args.contains(&sysroot_flag) { - args.push(sysroot_flag); - args.push(find_sysroot()); - } - - // Make sure we always have all the MIR (e.g. for auxilary builds in unit tests). - args.push("-Zalways-encode-mir".to_owned()); - - rustc_driver::run_compiler(&args, &mut MiriCompilerCalls { - default: RustcDefaultCalls, - }, None, None); -} diff --git a/miri/fn_call.rs b/miri/fn_call.rs deleted file mode 100644 index 79ef3f97a9e9..000000000000 --- a/miri/fn_call.rs +++ /dev/null @@ -1,656 +0,0 @@ -use rustc::ty::{self, Ty}; -use rustc::hir::def_id::{DefId, CRATE_DEF_INDEX}; -use rustc::mir; -use syntax::attr; -use syntax::abi::Abi; -use syntax::codemap::Span; - -use std::mem; - -use rustc_miri::interpret::*; - -use super::{TlsKey, EvalContext}; - -use tls::MemoryExt; - -use super::memory::MemoryKind; - -pub trait EvalContextExt<'tcx> { - fn call_c_abi( - &mut self, - def_id: DefId, - args: &[ValTy<'tcx>], - dest: Lvalue, - dest_ty: Ty<'tcx>, - dest_block: mir::BasicBlock, - ) -> EvalResult<'tcx>; - - fn resolve_path(&self, path: &[&str]) -> EvalResult<'tcx, ty::Instance<'tcx>>; - - fn call_missing_fn( - &mut self, - instance: ty::Instance<'tcx>, - destination: Option<(Lvalue, mir::BasicBlock)>, - args: &[ValTy<'tcx>], - sig: ty::FnSig<'tcx>, - path: String, - ) -> EvalResult<'tcx>; - - fn eval_fn_call( - &mut self, - instance: ty::Instance<'tcx>, - destination: Option<(Lvalue, mir::BasicBlock)>, - args: &[ValTy<'tcx>], - span: Span, - sig: ty::FnSig<'tcx>, - ) -> EvalResult<'tcx, bool>; -} - -impl<'a, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, super::Evaluator> { - fn eval_fn_call( - &mut self, - instance: ty::Instance<'tcx>, - destination: Option<(Lvalue, mir::BasicBlock)>, - args: &[ValTy<'tcx>], - span: Span, - sig: ty::FnSig<'tcx>, - ) -> EvalResult<'tcx, bool> { - trace!("eval_fn_call: {:#?}, {:#?}", instance, destination); - - let mir = match self.load_mir(instance.def) { - Ok(mir) => mir, - Err(EvalError { kind: EvalErrorKind::NoMirFor(path), .. }) => { - self.call_missing_fn( - instance, - destination, - args, - sig, - path, - )?; - return Ok(true); - } - Err(other) => return Err(other), - }; - - let (return_lvalue, return_to_block) = match destination { - Some((lvalue, block)) => (lvalue, StackPopCleanup::Goto(block)), - None => (Lvalue::undef(), StackPopCleanup::None), - }; - - self.push_stack_frame( - instance, - span, - mir, - return_lvalue, - return_to_block, - )?; - - Ok(false) - } - - fn call_c_abi( - &mut self, - def_id: DefId, - args: &[ValTy<'tcx>], - dest: Lvalue, - dest_ty: Ty<'tcx>, - dest_block: mir::BasicBlock, - ) -> EvalResult<'tcx> { - let attrs = self.tcx.get_attrs(def_id); - let link_name = match attr::first_attr_value_str_by_name(&attrs, "link_name") { - Some(name) => name.as_str(), - None => self.tcx.item_name(def_id), - }; - - match &link_name[..] { - "malloc" => { - let size = self.value_to_primval(args[0])?.to_u64()?; - if size == 0 { - self.write_null(dest, dest_ty)?; - } else { - let align = self.memory.pointer_size(); - let ptr = self.memory.allocate(size, align, MemoryKind::C.into())?; - self.write_primval(dest, PrimVal::Ptr(ptr), dest_ty)?; - } - } - - "free" => { - let ptr = args[0].into_ptr(&mut self.memory)?; - if !ptr.is_null()? { - self.memory.deallocate( - ptr.to_ptr()?, - None, - MemoryKind::C.into(), - )?; - } - } - - "syscall" => { - // TODO: read `syscall` ids like `sysconf` ids and - // figure out some way to actually process some of them - // - // libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), GRND_NONBLOCK) - // is called if a `HashMap` is created the regular way. - match self.value_to_primval(args[0])?.to_u64()? { - 318 | 511 => { - return err!(Unimplemented( - "miri does not support random number generators".to_owned(), - )) - } - id => { - return err!(Unimplemented( - format!("miri does not support syscall id {}", id), - )) - } - } - } - - "dlsym" => { - let _handle = args[0].into_ptr(&mut self.memory)?; - let symbol = args[1].into_ptr(&mut self.memory)?.to_ptr()?; - let symbol_name = self.memory.read_c_str(symbol)?; - let err = format!("bad c unicode symbol: {:?}", symbol_name); - let symbol_name = ::std::str::from_utf8(symbol_name).unwrap_or(&err); - return err!(Unimplemented(format!( - "miri does not support dynamically loading libraries (requested symbol: {})", - symbol_name - ))); - } - - "__rust_maybe_catch_panic" => { - // fn __rust_maybe_catch_panic(f: fn(*mut u8), data: *mut u8, data_ptr: *mut usize, vtable_ptr: *mut usize) -> u32 - // We abort on panic, so not much is going on here, but we still have to call the closure - let u8_ptr_ty = self.tcx.mk_mut_ptr(self.tcx.types.u8); - let f = args[0].into_ptr(&mut self.memory)?.to_ptr()?; - let data = args[1].into_ptr(&mut self.memory)?; - let f_instance = self.memory.get_fn(f)?; - self.write_null(dest, dest_ty)?; - - // Now we make a function call. TODO: Consider making this re-usable? EvalContext::step does sth. similar for the TLS dtors, - // and of course eval_main. - let mir = self.load_mir(f_instance.def)?; - self.push_stack_frame( - f_instance, - mir.span, - mir, - Lvalue::undef(), - StackPopCleanup::Goto(dest_block), - )?; - let mut args = self.frame().mir.args_iter(); - - let arg_local = args.next().ok_or( - EvalErrorKind::AbiViolation( - "Argument to __rust_maybe_catch_panic does not take enough arguments." - .to_owned(), - ), - )?; - let arg_dest = self.eval_lvalue(&mir::Lvalue::Local(arg_local))?; - self.write_ptr(arg_dest, data, u8_ptr_ty)?; - - assert!(args.next().is_none(), "__rust_maybe_catch_panic argument has more arguments than expected"); - - // We ourselves return 0 - self.write_null(dest, dest_ty)?; - - // Don't fall through - return Ok(()); - } - - "__rust_start_panic" => { - return err!(Panic); - } - - "memcmp" => { - let left = args[0].into_ptr(&mut self.memory)?; - let right = args[1].into_ptr(&mut self.memory)?; - let n = self.value_to_primval(args[2])?.to_u64()?; - - let result = { - let left_bytes = self.memory.read_bytes(left, n)?; - let right_bytes = self.memory.read_bytes(right, n)?; - - use std::cmp::Ordering::*; - match left_bytes.cmp(right_bytes) { - Less => -1i8, - Equal => 0, - Greater => 1, - } - }; - - self.write_primval( - dest, - PrimVal::Bytes(result as u128), - dest_ty, - )?; - } - - "memrchr" => { - let ptr = args[0].into_ptr(&mut self.memory)?; - let val = self.value_to_primval(args[1])?.to_u64()? as u8; - let num = self.value_to_primval(args[2])?.to_u64()?; - if let Some(idx) = self.memory.read_bytes(ptr, num)?.iter().rev().position( - |&c| c == val, - ) - { - let new_ptr = ptr.offset(num - idx as u64 - 1, &self)?; - self.write_ptr(dest, new_ptr, dest_ty)?; - } else { - self.write_null(dest, dest_ty)?; - } - } - - "memchr" => { - let ptr = args[0].into_ptr(&mut self.memory)?; - let val = self.value_to_primval(args[1])?.to_u64()? as u8; - let num = self.value_to_primval(args[2])?.to_u64()?; - if let Some(idx) = self.memory.read_bytes(ptr, num)?.iter().position( - |&c| c == val, - ) - { - let new_ptr = ptr.offset(idx as u64, &self)?; - self.write_ptr(dest, new_ptr, dest_ty)?; - } else { - self.write_null(dest, dest_ty)?; - } - } - - "getenv" => { - let result = { - let name_ptr = args[0].into_ptr(&mut self.memory)?.to_ptr()?; - let name = self.memory.read_c_str(name_ptr)?; - match self.machine_data.env_vars.get(name) { - Some(&var) => PrimVal::Ptr(var), - None => PrimVal::Bytes(0), - } - }; - self.write_primval(dest, result, dest_ty)?; - } - - "unsetenv" => { - let mut success = None; - { - let name_ptr = args[0].into_ptr(&mut self.memory)?; - if !name_ptr.is_null()? { - let name = self.memory.read_c_str(name_ptr.to_ptr()?)?; - if !name.is_empty() && !name.contains(&b'=') { - success = Some(self.machine_data.env_vars.remove(name)); - } - } - } - if let Some(old) = success { - if let Some(var) = old { - self.memory.deallocate(var, None, MemoryKind::Env.into())?; - } - self.write_null(dest, dest_ty)?; - } else { - self.write_primval(dest, PrimVal::from_i128(-1), dest_ty)?; - } - } - - "setenv" => { - let mut new = None; - { - let name_ptr = args[0].into_ptr(&mut self.memory)?; - let value_ptr = args[1].into_ptr(&mut self.memory)?.to_ptr()?; - let value = self.memory.read_c_str(value_ptr)?; - if !name_ptr.is_null()? { - let name = self.memory.read_c_str(name_ptr.to_ptr()?)?; - if !name.is_empty() && !name.contains(&b'=') { - new = Some((name.to_owned(), value.to_owned())); - } - } - } - if let Some((name, value)) = new { - // +1 for the null terminator - let value_copy = self.memory.allocate( - (value.len() + 1) as u64, - 1, - MemoryKind::Env.into(), - )?; - self.memory.write_bytes(value_copy.into(), &value)?; - let trailing_zero_ptr = value_copy.offset(value.len() as u64, &self)?.into(); - self.memory.write_bytes(trailing_zero_ptr, &[0])?; - if let Some(var) = self.machine_data.env_vars.insert( - name.to_owned(), - value_copy, - ) - { - self.memory.deallocate(var, None, MemoryKind::Env.into())?; - } - self.write_null(dest, dest_ty)?; - } else { - self.write_primval(dest, PrimVal::from_i128(-1), dest_ty)?; - } - } - - "write" => { - let fd = self.value_to_primval(args[0])?.to_u64()?; - let buf = args[1].into_ptr(&mut self.memory)?; - let n = self.value_to_primval(args[2])?.to_u64()?; - trace!("Called write({:?}, {:?}, {:?})", fd, buf, n); - let result = if fd == 1 || fd == 2 { - // stdout/stderr - use std::io::{self, Write}; - - let buf_cont = self.memory.read_bytes(buf, n)?; - let res = if fd == 1 { - io::stdout().write(buf_cont) - } else { - io::stderr().write(buf_cont) - }; - match res { - Ok(n) => n as isize, - Err(_) => -1, - } - } else { - warn!("Ignored output to FD {}", fd); - n as isize // pretend it all went well - }; // now result is the value we return back to the program - self.write_primval( - dest, - PrimVal::Bytes(result as u128), - dest_ty, - )?; - } - - "strlen" => { - let ptr = args[0].into_ptr(&mut self.memory)?.to_ptr()?; - let n = self.memory.read_c_str(ptr)?.len(); - self.write_primval(dest, PrimVal::Bytes(n as u128), dest_ty)?; - } - - // Some things needed for sys::thread initialization to go through - "signal" | "sigaction" | "sigaltstack" => { - self.write_primval(dest, PrimVal::Bytes(0), dest_ty)?; - } - - "sysconf" => { - let name = self.value_to_primval(args[0])?.to_u64()?; - trace!("sysconf() called with name {}", name); - // cache the sysconf integers via miri's global cache - let paths = &[ - (&["libc", "_SC_PAGESIZE"], PrimVal::Bytes(4096)), - (&["libc", "_SC_GETPW_R_SIZE_MAX"], PrimVal::from_i128(-1)), - ]; - let mut result = None; - for &(path, path_value) in paths { - if let Ok(instance) = self.resolve_path(path) { - let cid = GlobalId { - instance, - promoted: None, - }; - // compute global if not cached - let val = match self.globals.get(&cid).cloned() { - Some(ptr) => self.value_to_primval(ValTy { value: Value::ByRef(ptr), ty: args[0].ty })?.to_u64()?, - None => eval_body_as_primval(self.tcx, instance)?.0.to_u64()?, - }; - if val == name { - result = Some(path_value); - break; - } - } - } - if let Some(result) = result { - self.write_primval(dest, result, dest_ty)?; - } else { - return err!(Unimplemented( - format!("Unimplemented sysconf name: {}", name), - )); - } - } - - // Hook pthread calls that go to the thread-local storage memory subsystem - "pthread_key_create" => { - let key_ptr = args[0].into_ptr(&mut self.memory)?; - - // Extract the function type out of the signature (that seems easier than constructing it ourselves...) - let dtor = match args[1].into_ptr(&mut self.memory)?.into_inner_primval() { - PrimVal::Ptr(dtor_ptr) => Some(self.memory.get_fn(dtor_ptr)?), - PrimVal::Bytes(0) => None, - PrimVal::Bytes(_) => return err!(ReadBytesAsPointer), - PrimVal::Undef => return err!(ReadUndefBytes), - }; - - // Figure out how large a pthread TLS key actually is. This is libc::pthread_key_t. - let key_type = args[0].ty.builtin_deref(true, ty::LvaluePreference::NoPreference) - .ok_or(EvalErrorKind::AbiViolation("Wrong signature used for pthread_key_create: First argument must be a raw pointer.".to_owned()))?.ty; - let key_size = { - let layout = self.type_layout(key_type)?; - layout.size(&self.tcx.data_layout) - }; - - // Create key and write it into the memory where key_ptr wants it - let key = self.memory.create_tls_key(dtor) as u128; - if key_size.bits() < 128 && key >= (1u128 << key_size.bits() as u128) { - return err!(OutOfTls); - } - self.memory.write_primval( - key_ptr.to_ptr()?, - PrimVal::Bytes(key), - key_size.bytes(), - false, - )?; - - // Return success (0) - self.write_null(dest, dest_ty)?; - } - "pthread_key_delete" => { - // The conversion into TlsKey here is a little fishy, but should work as long as usize >= libc::pthread_key_t - let key = self.value_to_primval(args[0])?.to_u64()? as TlsKey; - self.memory.delete_tls_key(key)?; - // Return success (0) - self.write_null(dest, dest_ty)?; - } - "pthread_getspecific" => { - // The conversion into TlsKey here is a little fishy, but should work as long as usize >= libc::pthread_key_t - let key = self.value_to_primval(args[0])?.to_u64()? as TlsKey; - let ptr = self.memory.load_tls(key)?; - self.write_ptr(dest, ptr, dest_ty)?; - } - "pthread_setspecific" => { - // The conversion into TlsKey here is a little fishy, but should work as long as usize >= libc::pthread_key_t - let key = self.value_to_primval(args[0])?.to_u64()? as TlsKey; - let new_ptr = args[1].into_ptr(&mut self.memory)?; - self.memory.store_tls(key, new_ptr)?; - - // Return success (0) - self.write_null(dest, dest_ty)?; - } - - // Stub out all the other pthread calls to just return 0 - link_name if link_name.starts_with("pthread_") => { - info!("ignoring C ABI call: {}", link_name); - self.write_null(dest, dest_ty)?; - } - - _ => { - return err!(Unimplemented( - format!("can't call C ABI function: {}", link_name), - )); - } - } - - // Since we pushed no stack frame, the main loop will act - // as if the call just completed and it's returning to the - // current frame. - self.dump_local(dest); - self.goto_block(dest_block); - Ok(()) - } - - /// Get an instance for a path. - fn resolve_path(&self, path: &[&str]) -> EvalResult<'tcx, ty::Instance<'tcx>> { - self.tcx - .crates() - .iter() - .find(|&&krate| self.tcx.original_crate_name(krate) == path[0]) - .and_then(|krate| { - let krate = DefId { - krate: *krate, - index: CRATE_DEF_INDEX, - }; - let mut items = self.tcx.item_children(krate); - let mut path_it = path.iter().skip(1).peekable(); - - while let Some(segment) = path_it.next() { - for item in mem::replace(&mut items, Default::default()).iter() { - if item.ident.name == *segment { - if path_it.peek().is_none() { - return Some(ty::Instance::mono(self.tcx, item.def.def_id())); - } - - items = self.tcx.item_children(item.def.def_id()); - break; - } - } - } - None - }) - .ok_or_else(|| { - let path = path.iter().map(|&s| s.to_owned()).collect(); - EvalErrorKind::PathNotFound(path).into() - }) - } - - fn call_missing_fn( - &mut self, - instance: ty::Instance<'tcx>, - destination: Option<(Lvalue, mir::BasicBlock)>, - args: &[ValTy<'tcx>], - sig: ty::FnSig<'tcx>, - path: String, - ) -> EvalResult<'tcx> { - // In some cases in non-MIR libstd-mode, not having a destination is legit. Handle these early. - match &path[..] { - "std::panicking::rust_panic_with_hook" | - "core::panicking::panic_fmt::::panic_impl" | - "std::rt::begin_panic_fmt" => return err!(Panic), - _ => {} - } - - let dest_ty = sig.output(); - let (dest, dest_block) = destination.ok_or_else( - || EvalErrorKind::NoMirFor(path.clone()), - )?; - - if sig.abi == Abi::C { - // An external C function - // TODO: That functions actually has a similar preamble to what follows here. May make sense to - // unify these two mechanisms for "hooking into missing functions". - self.call_c_abi( - instance.def_id(), - args, - dest, - dest_ty, - dest_block, - )?; - return Ok(()); - } - - match &path[..] { - // Allocators are magic. They have no MIR, even when the rest of libstd does. - "alloc::heap::::__rust_alloc" => { - let size = self.value_to_primval(args[0])?.to_u64()?; - let align = self.value_to_primval(args[1])?.to_u64()?; - if size == 0 { - return err!(HeapAllocZeroBytes); - } - if !align.is_power_of_two() { - return err!(HeapAllocNonPowerOfTwoAlignment(align)); - } - let ptr = self.memory.allocate(size, align, MemoryKind::Rust.into())?; - self.write_primval(dest, PrimVal::Ptr(ptr), dest_ty)?; - } - "alloc::heap::::__rust_alloc_zeroed" => { - let size = self.value_to_primval(args[0])?.to_u64()?; - let align = self.value_to_primval(args[1])?.to_u64()?; - if size == 0 { - return err!(HeapAllocZeroBytes); - } - if !align.is_power_of_two() { - return err!(HeapAllocNonPowerOfTwoAlignment(align)); - } - let ptr = self.memory.allocate(size, align, MemoryKind::Rust.into())?; - self.memory.write_repeat(ptr.into(), 0, size)?; - self.write_primval(dest, PrimVal::Ptr(ptr), dest_ty)?; - } - "alloc::heap::::__rust_dealloc" => { - let ptr = args[0].into_ptr(&mut self.memory)?.to_ptr()?; - let old_size = self.value_to_primval(args[1])?.to_u64()?; - let align = self.value_to_primval(args[2])?.to_u64()?; - if old_size == 0 { - return err!(HeapAllocZeroBytes); - } - if !align.is_power_of_two() { - return err!(HeapAllocNonPowerOfTwoAlignment(align)); - } - self.memory.deallocate( - ptr, - Some((old_size, align)), - MemoryKind::Rust.into(), - )?; - } - "alloc::heap::::__rust_realloc" => { - let ptr = args[0].into_ptr(&mut self.memory)?.to_ptr()?; - let old_size = self.value_to_primval(args[1])?.to_u64()?; - let old_align = self.value_to_primval(args[2])?.to_u64()?; - let new_size = self.value_to_primval(args[3])?.to_u64()?; - let new_align = self.value_to_primval(args[4])?.to_u64()?; - if old_size == 0 || new_size == 0 { - return err!(HeapAllocZeroBytes); - } - if !old_align.is_power_of_two() { - return err!(HeapAllocNonPowerOfTwoAlignment(old_align)); - } - if !new_align.is_power_of_two() { - return err!(HeapAllocNonPowerOfTwoAlignment(new_align)); - } - let new_ptr = self.memory.reallocate( - ptr, - old_size, - old_align, - new_size, - new_align, - MemoryKind::Rust.into(), - )?; - self.write_primval(dest, PrimVal::Ptr(new_ptr), dest_ty)?; - } - - // A Rust function is missing, which means we are running with MIR missing for libstd (or other dependencies). - // Still, we can make many things mostly work by "emulating" or ignoring some functions. - "std::io::_print" => { - warn!( - "Ignoring output. To run programs that print, make sure you have a libstd with full MIR." - ); - } - "std::thread::Builder::new" => { - return err!(Unimplemented("miri does not support threading".to_owned())) - } - "std::env::args" => { - return err!(Unimplemented( - "miri does not support program arguments".to_owned(), - )) - } - "std::panicking::panicking" | - "std::rt::panicking" => { - // we abort on panic -> `std::rt::panicking` always returns false - let bool = self.tcx.types.bool; - self.write_primval(dest, PrimVal::from_bool(false), bool)?; - } - "std::sys::imp::c::::AddVectoredExceptionHandler" | - "std::sys::imp::c::::SetThreadStackGuarantee" => { - let usize = self.tcx.types.usize; - // any non zero value works for the stdlib. This is just used for stackoverflows anyway - self.write_primval(dest, PrimVal::Bytes(1), usize)?; - }, - _ => return err!(NoMirFor(path)), - } - - // Since we pushed no stack frame, the main loop will act - // as if the call just completed and it's returning to the - // current frame. - self.dump_local(dest); - self.goto_block(dest_block); - return Ok(()); - } -} diff --git a/miri/helpers.rs b/miri/helpers.rs deleted file mode 100644 index 809e5ebfacdb..000000000000 --- a/miri/helpers.rs +++ /dev/null @@ -1,73 +0,0 @@ -use rustc_miri::interpret::{Pointer, EvalResult, PrimVal, EvalContext}; - -use rustc::ty::Ty; - -pub trait EvalContextExt<'tcx> { - fn wrapping_pointer_offset( - &self, - ptr: Pointer, - pointee_ty: Ty<'tcx>, - offset: i64, - ) -> EvalResult<'tcx, Pointer>; - - fn pointer_offset( - &self, - ptr: Pointer, - pointee_ty: Ty<'tcx>, - offset: i64, - ) -> EvalResult<'tcx, Pointer>; -} - -impl<'a, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, super::Evaluator> { - fn wrapping_pointer_offset( - &self, - ptr: Pointer, - pointee_ty: Ty<'tcx>, - offset: i64, - ) -> EvalResult<'tcx, Pointer> { - // FIXME: assuming here that type size is < i64::max_value() - let pointee_size = self.type_size(pointee_ty)?.expect( - "cannot offset a pointer to an unsized type", - ) as i64; - let offset = offset.overflowing_mul(pointee_size).0; - ptr.wrapping_signed_offset(offset, self) - } - - fn pointer_offset( - &self, - ptr: Pointer, - pointee_ty: Ty<'tcx>, - offset: i64, - ) -> EvalResult<'tcx, Pointer> { - // This function raises an error if the offset moves the pointer outside of its allocation. We consider - // ZSTs their own huge allocation that doesn't overlap with anything (and nothing moves in there because the size is 0). - // We also consider the NULL pointer its own separate allocation, and all the remaining integers pointers their own - // allocation. - - if ptr.is_null()? { - // NULL pointers must only be offset by 0 - return if offset == 0 { - Ok(ptr) - } else { - err!(InvalidNullPointerUsage) - }; - } - // FIXME: assuming here that type size is < i64::max_value() - let pointee_size = self.type_size(pointee_ty)?.expect( - "cannot offset a pointer to an unsized type", - ) as i64; - return if let Some(offset) = offset.checked_mul(pointee_size) { - let ptr = ptr.signed_offset(offset, self)?; - // Do not do bounds-checking for integers; they can never alias a normal pointer anyway. - if let PrimVal::Ptr(ptr) = ptr.into_inner_primval() { - self.memory.check_bounds(ptr, false)?; - } else if ptr.is_null()? { - // We moved *to* a NULL pointer. That seems wrong, LLVM considers the NULL pointer its own small allocation. Reject this, for now. - return err!(InvalidNullPointerUsage); - } - Ok(ptr) - } else { - err!(OverflowingMath) - }; - } -} diff --git a/miri/intrinsic.rs b/miri/intrinsic.rs deleted file mode 100644 index bcff3b4aa991..000000000000 --- a/miri/intrinsic.rs +++ /dev/null @@ -1,685 +0,0 @@ -use rustc::mir; -use rustc::traits::Reveal; -use rustc::ty::layout::Layout; -use rustc::ty::{self, Ty}; - -use rustc_miri::interpret::{EvalResult, Lvalue, LvalueExtra, PrimVal, PrimValKind, Value, Pointer, - HasMemory, AccessKind, EvalContext, PtrAndAlign, ValTy}; - -use helpers::EvalContextExt as HelperEvalContextExt; - -pub trait EvalContextExt<'tcx> { - fn call_intrinsic( - &mut self, - instance: ty::Instance<'tcx>, - args: &[ValTy<'tcx>], - dest: Lvalue, - dest_ty: Ty<'tcx>, - dest_layout: &'tcx Layout, - target: mir::BasicBlock, - ) -> EvalResult<'tcx>; -} - -impl<'a, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, super::Evaluator> { - fn call_intrinsic( - &mut self, - instance: ty::Instance<'tcx>, - args: &[ValTy<'tcx>], - dest: Lvalue, - dest_ty: Ty<'tcx>, - dest_layout: &'tcx Layout, - target: mir::BasicBlock, - ) -> EvalResult<'tcx> { - let substs = instance.substs; - - let intrinsic_name = &self.tcx.item_name(instance.def_id())[..]; - match intrinsic_name { - "align_offset" => { - // FIXME: return a real value in case the target allocation has an - // alignment bigger than the one requested - self.write_primval(dest, PrimVal::Bytes(u128::max_value()), dest_ty)?; - }, - - "add_with_overflow" => { - self.intrinsic_with_overflow( - mir::BinOp::Add, - args[0], - args[1], - dest, - dest_ty, - )? - } - - "sub_with_overflow" => { - self.intrinsic_with_overflow( - mir::BinOp::Sub, - args[0], - args[1], - dest, - dest_ty, - )? - } - - "mul_with_overflow" => { - self.intrinsic_with_overflow( - mir::BinOp::Mul, - args[0], - args[1], - dest, - dest_ty, - )? - } - - "arith_offset" => { - let offset = self.value_to_primval(args[1])?.to_i128()? as i64; - let ptr = args[0].into_ptr(&self.memory)?; - let result_ptr = self.wrapping_pointer_offset(ptr, substs.type_at(0), offset)?; - self.write_ptr(dest, result_ptr, dest_ty)?; - } - - "assume" => { - let cond = self.value_to_primval(args[0])?.to_bool()?; - if !cond { - return err!(AssumptionNotHeld); - } - } - - "atomic_load" | - "atomic_load_relaxed" | - "atomic_load_acq" | - "volatile_load" => { - let ptr = args[0].into_ptr(&self.memory)?; - let valty = ValTy { - value: Value::by_ref(ptr), - ty: substs.type_at(0), - }; - self.write_value(valty, dest)?; - } - - "atomic_store" | - "atomic_store_relaxed" | - "atomic_store_rel" | - "volatile_store" => { - let ty = substs.type_at(0); - let dest = args[0].into_ptr(&self.memory)?; - self.write_value_to_ptr(args[1].value, dest, ty)?; - } - - "atomic_fence_acq" => { - // we are inherently singlethreaded and singlecored, this is a nop - } - - _ if intrinsic_name.starts_with("atomic_xchg") => { - let ty = substs.type_at(0); - let ptr = args[0].into_ptr(&self.memory)?; - let change = self.value_to_primval(args[1])?; - let old = self.read_value(ptr, ty)?; - let old = match old { - Value::ByVal(val) => val, - Value::ByRef { .. } => bug!("just read the value, can't be byref"), - Value::ByValPair(..) => bug!("atomic_xchg doesn't work with nonprimitives"), - }; - self.write_primval(dest, old, ty)?; - self.write_primval( - Lvalue::from_primval_ptr(ptr), - change, - ty, - )?; - } - - _ if intrinsic_name.starts_with("atomic_cxchg") => { - let ty = substs.type_at(0); - let ptr = args[0].into_ptr(&self.memory)?; - let expect_old = self.value_to_primval(args[1])?; - let change = self.value_to_primval(args[2])?; - let old = self.read_value(ptr, ty)?; - let old = match old { - Value::ByVal(val) => val, - Value::ByRef { .. } => bug!("just read the value, can't be byref"), - Value::ByValPair(..) => bug!("atomic_cxchg doesn't work with nonprimitives"), - }; - let (val, _) = self.binary_op(mir::BinOp::Eq, old, ty, expect_old, ty)?; - let dest = self.force_allocation(dest)?.to_ptr()?; - self.write_pair_to_ptr(old, val, dest, dest_ty)?; - self.write_primval( - Lvalue::from_primval_ptr(ptr), - change, - ty, - )?; - } - - "atomic_or" | - "atomic_or_acq" | - "atomic_or_rel" | - "atomic_or_acqrel" | - "atomic_or_relaxed" | - "atomic_xor" | - "atomic_xor_acq" | - "atomic_xor_rel" | - "atomic_xor_acqrel" | - "atomic_xor_relaxed" | - "atomic_and" | - "atomic_and_acq" | - "atomic_and_rel" | - "atomic_and_acqrel" | - "atomic_and_relaxed" | - "atomic_xadd" | - "atomic_xadd_acq" | - "atomic_xadd_rel" | - "atomic_xadd_acqrel" | - "atomic_xadd_relaxed" | - "atomic_xsub" | - "atomic_xsub_acq" | - "atomic_xsub_rel" | - "atomic_xsub_acqrel" | - "atomic_xsub_relaxed" => { - let ty = substs.type_at(0); - let ptr = args[0].into_ptr(&self.memory)?; - let change = self.value_to_primval(args[1])?; - let old = self.read_value(ptr, ty)?; - let old = match old { - Value::ByVal(val) => val, - Value::ByRef { .. } => bug!("just read the value, can't be byref"), - Value::ByValPair(..) => { - bug!("atomic_xadd_relaxed doesn't work with nonprimitives") - } - }; - self.write_primval(dest, old, ty)?; - let op = match intrinsic_name.split('_').nth(1).unwrap() { - "or" => mir::BinOp::BitOr, - "xor" => mir::BinOp::BitXor, - "and" => mir::BinOp::BitAnd, - "xadd" => mir::BinOp::Add, - "xsub" => mir::BinOp::Sub, - _ => bug!(), - }; - // FIXME: what do atomics do on overflow? - let (val, _) = self.binary_op(op, old, ty, change, ty)?; - self.write_primval(Lvalue::from_primval_ptr(ptr), val, ty)?; - } - - "breakpoint" => unimplemented!(), // halt miri - - "copy" | - "copy_nonoverlapping" => { - let elem_ty = substs.type_at(0); - let elem_size = self.type_size(elem_ty)?.expect("cannot copy unsized value"); - let count = self.value_to_primval(args[2])?.to_u64()?; - if count * elem_size != 0 { - // TODO: We do not even validate alignment for the 0-bytes case. libstd relies on this in vec::IntoIter::next. - // Also see the write_bytes intrinsic. - let elem_align = self.type_align(elem_ty)?; - let src = args[0].into_ptr(&self.memory)?; - let dest = args[1].into_ptr(&self.memory)?; - self.memory.copy( - src, - dest, - count * elem_size, - elem_align, - intrinsic_name.ends_with("_nonoverlapping"), - )?; - } - } - - "ctpop" | "cttz" | "cttz_nonzero" | "ctlz" | "ctlz_nonzero" | "bswap" => { - let ty = substs.type_at(0); - let num = self.value_to_primval(args[0])?.to_bytes()?; - let kind = self.ty_to_primval_kind(ty)?; - let num = if intrinsic_name.ends_with("_nonzero") { - if num == 0 { - return err!(Intrinsic(format!("{} called on 0", intrinsic_name))); - } - numeric_intrinsic(intrinsic_name.trim_right_matches("_nonzero"), num, kind)? - } else { - numeric_intrinsic(intrinsic_name, num, kind)? - }; - self.write_primval(dest, num, ty)?; - } - - "discriminant_value" => { - let ty = substs.type_at(0); - let adt_ptr = args[0].into_ptr(&self.memory)?.to_ptr()?; - let discr_val = self.read_discriminant_value(adt_ptr, ty)?; - self.write_primval(dest, PrimVal::Bytes(discr_val), dest_ty)?; - } - - "sinf32" | "fabsf32" | "cosf32" | "sqrtf32" | "expf32" | "exp2f32" | "logf32" | - "log10f32" | "log2f32" | "floorf32" | "ceilf32" | "truncf32" => { - let f = self.value_to_primval(args[0])?.to_f32()?; - let f = match intrinsic_name { - "sinf32" => f.sin(), - "fabsf32" => f.abs(), - "cosf32" => f.cos(), - "sqrtf32" => f.sqrt(), - "expf32" => f.exp(), - "exp2f32" => f.exp2(), - "logf32" => f.ln(), - "log10f32" => f.log10(), - "log2f32" => f.log2(), - "floorf32" => f.floor(), - "ceilf32" => f.ceil(), - "truncf32" => f.trunc(), - _ => bug!(), - }; - self.write_primval(dest, PrimVal::from_f32(f), dest_ty)?; - } - - "sinf64" | "fabsf64" | "cosf64" | "sqrtf64" | "expf64" | "exp2f64" | "logf64" | - "log10f64" | "log2f64" | "floorf64" | "ceilf64" | "truncf64" => { - let f = self.value_to_primval(args[0])?.to_f64()?; - let f = match intrinsic_name { - "sinf64" => f.sin(), - "fabsf64" => f.abs(), - "cosf64" => f.cos(), - "sqrtf64" => f.sqrt(), - "expf64" => f.exp(), - "exp2f64" => f.exp2(), - "logf64" => f.ln(), - "log10f64" => f.log10(), - "log2f64" => f.log2(), - "floorf64" => f.floor(), - "ceilf64" => f.ceil(), - "truncf64" => f.trunc(), - _ => bug!(), - }; - self.write_primval(dest, PrimVal::from_f64(f), dest_ty)?; - } - - "fadd_fast" | "fsub_fast" | "fmul_fast" | "fdiv_fast" | "frem_fast" => { - let ty = substs.type_at(0); - let a = self.value_to_primval(args[0])?; - let b = self.value_to_primval(args[1])?; - let op = match intrinsic_name { - "fadd_fast" => mir::BinOp::Add, - "fsub_fast" => mir::BinOp::Sub, - "fmul_fast" => mir::BinOp::Mul, - "fdiv_fast" => mir::BinOp::Div, - "frem_fast" => mir::BinOp::Rem, - _ => bug!(), - }; - let result = self.binary_op(op, a, ty, b, ty)?; - self.write_primval(dest, result.0, dest_ty)?; - } - - "likely" | "unlikely" | "forget" => {} - - "init" => { - let size = self.type_size(dest_ty)?.expect("cannot zero unsized value"); - let init = |this: &mut Self, val: Value| { - let zero_val = match val { - Value::ByRef(PtrAndAlign { ptr, .. }) => { - // These writes have no alignment restriction anyway. - this.memory.write_repeat(ptr, 0, size)?; - val - } - // TODO(solson): Revisit this, it's fishy to check for Undef here. - Value::ByVal(PrimVal::Undef) => { - match this.ty_to_primval_kind(dest_ty) { - Ok(_) => Value::ByVal(PrimVal::Bytes(0)), - Err(_) => { - let ptr = this.alloc_ptr_with_substs(dest_ty, substs)?; - let ptr = Pointer::from(PrimVal::Ptr(ptr)); - this.memory.write_repeat(ptr, 0, size)?; - Value::by_ref(ptr) - } - } - } - Value::ByVal(_) => Value::ByVal(PrimVal::Bytes(0)), - Value::ByValPair(..) => { - Value::ByValPair(PrimVal::Bytes(0), PrimVal::Bytes(0)) - } - }; - Ok(zero_val) - }; - match dest { - Lvalue::Local { frame, local } => self.modify_local(frame, local, init)?, - Lvalue::Ptr { - ptr: PtrAndAlign { ptr, aligned: true }, - extra: LvalueExtra::None, - } => self.memory.write_repeat(ptr, 0, size)?, - Lvalue::Ptr { .. } => { - bug!("init intrinsic tried to write to fat or unaligned ptr target") - } - } - } - - "min_align_of" => { - let elem_ty = substs.type_at(0); - let elem_align = self.type_align(elem_ty)?; - let align_val = PrimVal::from_u128(elem_align as u128); - self.write_primval(dest, align_val, dest_ty)?; - } - - "pref_align_of" => { - let ty = substs.type_at(0); - let layout = self.type_layout(ty)?; - let align = layout.align(&self.tcx.data_layout).pref(); - let align_val = PrimVal::from_u128(align as u128); - self.write_primval(dest, align_val, dest_ty)?; - } - - "move_val_init" => { - let ty = substs.type_at(0); - let ptr = args[0].into_ptr(&self.memory)?; - self.write_value_to_ptr(args[1].value, ptr, ty)?; - } - - "needs_drop" => { - let ty = substs.type_at(0); - let env = ty::ParamEnv::empty(Reveal::All); - let needs_drop = ty.needs_drop(self.tcx, env); - self.write_primval( - dest, - PrimVal::from_bool(needs_drop), - dest_ty, - )?; - } - - "offset" => { - let offset = self.value_to_primval(args[1])?.to_i128()? as i64; - let ptr = args[0].into_ptr(&self.memory)?; - let result_ptr = self.pointer_offset(ptr, substs.type_at(0), offset)?; - self.write_ptr(dest, result_ptr, dest_ty)?; - } - - "overflowing_sub" => { - self.intrinsic_overflowing( - mir::BinOp::Sub, - args[0], - args[1], - dest, - dest_ty, - )?; - } - - "overflowing_mul" => { - self.intrinsic_overflowing( - mir::BinOp::Mul, - args[0], - args[1], - dest, - dest_ty, - )?; - } - - "overflowing_add" => { - self.intrinsic_overflowing( - mir::BinOp::Add, - args[0], - args[1], - dest, - dest_ty, - )?; - } - - "powf32" => { - let f = self.value_to_primval(args[0])?.to_f32()?; - let f2 = self.value_to_primval(args[1])?.to_f32()?; - self.write_primval( - dest, - PrimVal::from_f32(f.powf(f2)), - dest_ty, - )?; - } - - "powf64" => { - let f = self.value_to_primval(args[0])?.to_f64()?; - let f2 = self.value_to_primval(args[1])?.to_f64()?; - self.write_primval( - dest, - PrimVal::from_f64(f.powf(f2)), - dest_ty, - )?; - } - - "fmaf32" => { - let a = self.value_to_primval(args[0])?.to_f32()?; - let b = self.value_to_primval(args[1])?.to_f32()?; - let c = self.value_to_primval(args[2])?.to_f32()?; - self.write_primval( - dest, - PrimVal::from_f32(a * b + c), - dest_ty, - )?; - } - - "fmaf64" => { - let a = self.value_to_primval(args[0])?.to_f64()?; - let b = self.value_to_primval(args[1])?.to_f64()?; - let c = self.value_to_primval(args[2])?.to_f64()?; - self.write_primval( - dest, - PrimVal::from_f64(a * b + c), - dest_ty, - )?; - } - - "powif32" => { - let f = self.value_to_primval(args[0])?.to_f32()?; - let i = self.value_to_primval(args[1])?.to_i128()?; - self.write_primval( - dest, - PrimVal::from_f32(f.powi(i as i32)), - dest_ty, - )?; - } - - "powif64" => { - let f = self.value_to_primval(args[0])?.to_f64()?; - let i = self.value_to_primval(args[1])?.to_i128()?; - self.write_primval( - dest, - PrimVal::from_f64(f.powi(i as i32)), - dest_ty, - )?; - } - - "size_of" => { - let ty = substs.type_at(0); - let size = self.type_size(ty)?.expect( - "size_of intrinsic called on unsized value", - ) as u128; - self.write_primval(dest, PrimVal::from_u128(size), dest_ty)?; - } - - "size_of_val" => { - let ty = substs.type_at(0); - let (size, _) = self.size_and_align_of_dst(ty, args[0].value)?; - self.write_primval( - dest, - PrimVal::from_u128(size as u128), - dest_ty, - )?; - } - - "min_align_of_val" | - "align_of_val" => { - let ty = substs.type_at(0); - let (_, align) = self.size_and_align_of_dst(ty, args[0].value)?; - self.write_primval( - dest, - PrimVal::from_u128(align as u128), - dest_ty, - )?; - } - - "type_name" => { - let ty = substs.type_at(0); - let ty_name = ty.to_string(); - let value = self.str_to_value(&ty_name)?; - self.write_value(ValTy { value, ty: dest_ty }, dest)?; - } - "type_id" => { - let ty = substs.type_at(0); - let n = self.tcx.type_id_hash(ty); - self.write_primval(dest, PrimVal::Bytes(n as u128), dest_ty)?; - } - - "transmute" => { - let src_ty = substs.type_at(0); - let ptr = self.force_allocation(dest)?.to_ptr()?; - self.write_maybe_aligned_mut( - /*aligned*/ - false, - |ectx| { - ectx.write_value_to_ptr(args[0].value, ptr.into(), src_ty) - }, - )?; - } - - "unchecked_shl" => { - let bits = self.type_size(dest_ty)?.expect( - "intrinsic can't be called on unsized type", - ) as u128 * 8; - let rhs = self.value_to_primval(args[1])? - .to_bytes()?; - if rhs >= bits { - return err!(Intrinsic( - format!("Overflowing shift by {} in unchecked_shl", rhs), - )); - } - self.intrinsic_overflowing( - mir::BinOp::Shl, - args[0], - args[1], - dest, - dest_ty, - )?; - } - - "unchecked_shr" => { - let bits = self.type_size(dest_ty)?.expect( - "intrinsic can't be called on unsized type", - ) as u128 * 8; - let rhs = self.value_to_primval(args[1])? - .to_bytes()?; - if rhs >= bits { - return err!(Intrinsic( - format!("Overflowing shift by {} in unchecked_shr", rhs), - )); - } - self.intrinsic_overflowing( - mir::BinOp::Shr, - args[0], - args[1], - dest, - dest_ty, - )?; - } - - "unchecked_div" => { - let rhs = self.value_to_primval(args[1])? - .to_bytes()?; - if rhs == 0 { - return err!(Intrinsic(format!("Division by 0 in unchecked_div"))); - } - self.intrinsic_overflowing( - mir::BinOp::Div, - args[0], - args[1], - dest, - dest_ty, - )?; - } - - "unchecked_rem" => { - let rhs = self.value_to_primval(args[1])? - .to_bytes()?; - if rhs == 0 { - return err!(Intrinsic(format!("Division by 0 in unchecked_rem"))); - } - self.intrinsic_overflowing( - mir::BinOp::Rem, - args[0], - args[1], - dest, - dest_ty, - )?; - } - - "uninit" => { - let size = dest_layout.size(&self.tcx.data_layout).bytes(); - let uninit = |this: &mut Self, val: Value| match val { - Value::ByRef(PtrAndAlign { ptr, .. }) => { - this.memory.mark_definedness(ptr, size, false)?; - Ok(val) - } - _ => Ok(Value::ByVal(PrimVal::Undef)), - }; - match dest { - Lvalue::Local { frame, local } => self.modify_local(frame, local, uninit)?, - Lvalue::Ptr { - ptr: PtrAndAlign { ptr, aligned: true }, - extra: LvalueExtra::None, - } => self.memory.mark_definedness(ptr, size, false)?, - Lvalue::Ptr { .. } => { - bug!("uninit intrinsic tried to write to fat or unaligned ptr target") - } - } - } - - "write_bytes" => { - let ty = substs.type_at(0); - let ty_align = self.type_align(ty)?; - let val_byte = self.value_to_primval(args[1])?.to_u128()? as u8; - let size = self.type_size(ty)?.expect( - "write_bytes() type must be sized", - ); - let ptr = args[0].into_ptr(&self.memory)?; - let count = self.value_to_primval(args[2])?.to_u64()?; - if count > 0 { - // HashMap relies on write_bytes on a NULL ptr with count == 0 to work - // TODO: Should we, at least, validate the alignment? (Also see the copy intrinsic) - self.memory.check_align(ptr, ty_align, Some(AccessKind::Write))?; - self.memory.write_repeat(ptr, val_byte, size * count)?; - } - } - - name => return err!(Unimplemented(format!("unimplemented intrinsic: {}", name))), - } - - self.goto_block(target); - - // Since we pushed no stack frame, the main loop will act - // as if the call just completed and it's returning to the - // current frame. - Ok(()) - } -} - -fn numeric_intrinsic<'tcx>( - name: &str, - bytes: u128, - kind: PrimValKind, -) -> EvalResult<'tcx, PrimVal> { - macro_rules! integer_intrinsic { - ($method:ident) => ({ - use rustc_miri::interpret::PrimValKind::*; - let result_bytes = match kind { - I8 => (bytes as i8).$method() as u128, - U8 => (bytes as u8).$method() as u128, - I16 => (bytes as i16).$method() as u128, - U16 => (bytes as u16).$method() as u128, - I32 => (bytes as i32).$method() as u128, - U32 => (bytes as u32).$method() as u128, - I64 => (bytes as i64).$method() as u128, - U64 => (bytes as u64).$method() as u128, - I128 => (bytes as i128).$method() as u128, - U128 => bytes.$method() as u128, - _ => bug!("invalid `{}` argument: {:?}", name, bytes), - }; - - PrimVal::Bytes(result_bytes) - }); - } - - let result_val = match name { - "bswap" => integer_intrinsic!(swap_bytes), - "ctlz" => integer_intrinsic!(leading_zeros), - "ctpop" => integer_intrinsic!(count_ones), - "cttz" => integer_intrinsic!(trailing_zeros), - _ => bug!("not a numeric intrinsic: {}", name), - }; - - Ok(result_val) -} diff --git a/miri/lib.rs b/miri/lib.rs deleted file mode 100644 index f6ecd6e0b00b..000000000000 --- a/miri/lib.rs +++ /dev/null @@ -1,311 +0,0 @@ -#![feature( - i128_type, - rustc_private, -)] - -// From rustc. -#[macro_use] -extern crate log; -#[macro_use] -extern crate rustc; -extern crate syntax; - -use rustc::ty::{self, TyCtxt}; -use rustc::ty::layout::Layout; -use rustc::hir::def_id::DefId; -use rustc::mir; - -use syntax::ast::Mutability; -use syntax::codemap::Span; - -use std::collections::{HashMap, BTreeMap}; - -#[macro_use] -extern crate rustc_miri; -pub use rustc_miri::interpret::*; - -mod fn_call; -mod operator; -mod intrinsic; -mod helpers; -mod memory; -mod tls; - -use fn_call::EvalContextExt as MissingFnsEvalContextExt; -use operator::EvalContextExt as OperatorEvalContextExt; -use intrinsic::EvalContextExt as IntrinsicEvalContextExt; -use tls::EvalContextExt as TlsEvalContextExt; - -pub fn eval_main<'a, 'tcx: 'a>( - tcx: TyCtxt<'a, 'tcx, 'tcx>, - main_id: DefId, - start_wrapper: Option, - limits: ResourceLimits, -) { - fn run_main<'a, 'tcx: 'a>( - ecx: &mut rustc_miri::interpret::EvalContext<'a, 'tcx, Evaluator>, - main_id: DefId, - start_wrapper: Option, - ) -> EvalResult<'tcx> { - let main_instance = ty::Instance::mono(ecx.tcx, main_id); - let main_mir = ecx.load_mir(main_instance.def)?; - let mut cleanup_ptr = None; // Pointer to be deallocated when we are done - - if !main_mir.return_ty.is_nil() || main_mir.arg_count != 0 { - return err!(Unimplemented( - "miri does not support main functions without `fn()` type signatures" - .to_owned(), - )); - } - - if let Some(start_id) = start_wrapper { - let start_instance = ty::Instance::mono(ecx.tcx, start_id); - let start_mir = ecx.load_mir(start_instance.def)?; - - if start_mir.arg_count != 3 { - return err!(AbiViolation(format!( - "'start' lang item should have three arguments, but has {}", - start_mir.arg_count - ))); - } - - // Return value - let size = ecx.tcx.data_layout.pointer_size.bytes(); - let align = ecx.tcx.data_layout.pointer_align.abi(); - let ret_ptr = ecx.memory_mut().allocate(size, align, MemoryKind::Stack)?; - cleanup_ptr = Some(ret_ptr); - - // Push our stack frame - ecx.push_stack_frame( - start_instance, - start_mir.span, - start_mir, - Lvalue::from_ptr(ret_ptr), - StackPopCleanup::None, - )?; - - let mut args = ecx.frame().mir.args_iter(); - - // First argument: pointer to main() - let main_ptr = ecx.memory_mut().create_fn_alloc(main_instance); - let dest = ecx.eval_lvalue(&mir::Lvalue::Local(args.next().unwrap()))?; - let main_ty = main_instance.def.def_ty(ecx.tcx); - let main_ptr_ty = ecx.tcx.mk_fn_ptr(main_ty.fn_sig(ecx.tcx)); - ecx.write_value( - ValTy { - value: Value::ByVal(PrimVal::Ptr(main_ptr)), - ty: main_ptr_ty, - }, - dest, - )?; - - // Second argument (argc): 1 - let dest = ecx.eval_lvalue(&mir::Lvalue::Local(args.next().unwrap()))?; - let ty = ecx.tcx.types.isize; - ecx.write_primval(dest, PrimVal::Bytes(1), ty)?; - - // FIXME: extract main source file path - // Third argument (argv): &[b"foo"] - let dest = ecx.eval_lvalue(&mir::Lvalue::Local(args.next().unwrap()))?; - let ty = ecx.tcx.mk_imm_ptr(ecx.tcx.mk_imm_ptr(ecx.tcx.types.u8)); - let foo = ecx.memory.allocate_cached(b"foo\0")?; - let ptr_size = ecx.memory.pointer_size(); - let foo_ptr = ecx.memory.allocate(ptr_size * 1, ptr_size, MemoryKind::UninitializedStatic)?; - ecx.memory.write_primval(foo_ptr.into(), PrimVal::Ptr(foo.into()), ptr_size, false)?; - ecx.memory.mark_static_initalized(foo_ptr.alloc_id, Mutability::Immutable)?; - ecx.write_ptr(dest, foo_ptr.into(), ty)?; - - assert!(args.next().is_none(), "start lang item has more arguments than expected"); - } else { - ecx.push_stack_frame( - main_instance, - main_mir.span, - main_mir, - Lvalue::undef(), - StackPopCleanup::None, - )?; - - // No arguments - let mut args = ecx.frame().mir.args_iter(); - assert!(args.next().is_none(), "main function must not have arguments"); - } - - while ecx.step()? {} - ecx.run_tls_dtors()?; - if let Some(cleanup_ptr) = cleanup_ptr { - ecx.memory_mut().deallocate( - cleanup_ptr, - None, - MemoryKind::Stack, - )?; - } - Ok(()) - } - - let mut ecx = EvalContext::new(tcx, limits, Default::default(), Default::default()); - match run_main(&mut ecx, main_id, start_wrapper) { - Ok(()) => { - let leaks = ecx.memory().leak_report(); - if leaks != 0 { - tcx.sess.err("the evaluated program leaked memory"); - } - } - Err(mut e) => { - ecx.report(&mut e); - } - } -} - -pub struct Evaluator; -#[derive(Default)] -pub struct EvaluatorData { - /// Environment variables set by `setenv` - /// Miri does not expose env vars from the host to the emulated program - pub(crate) env_vars: HashMap, MemoryPointer>, -} - -pub type TlsKey = usize; - -#[derive(Copy, Clone, Debug)] -pub struct TlsEntry<'tcx> { - data: Pointer, // Will eventually become a map from thread IDs to `Pointer`s, if we ever support more than one thread. - dtor: Option>, -} - -#[derive(Default)] -pub struct MemoryData<'tcx> { - /// The Key to use for the next thread-local allocation. - next_thread_local: TlsKey, - - /// pthreads-style thread-local storage. - thread_local: BTreeMap>, -} - -impl<'tcx> Machine<'tcx> for Evaluator { - type Data = EvaluatorData; - type MemoryData = MemoryData<'tcx>; - type MemoryKinds = memory::MemoryKind; - - /// Returns Ok() when the function was handled, fail otherwise - fn eval_fn_call<'a>( - ecx: &mut EvalContext<'a, 'tcx, Self>, - instance: ty::Instance<'tcx>, - destination: Option<(Lvalue, mir::BasicBlock)>, - args: &[ValTy<'tcx>], - span: Span, - sig: ty::FnSig<'tcx>, - ) -> EvalResult<'tcx, bool> { - ecx.eval_fn_call(instance, destination, args, span, sig) - } - - fn call_intrinsic<'a>( - ecx: &mut rustc_miri::interpret::EvalContext<'a, 'tcx, Self>, - instance: ty::Instance<'tcx>, - args: &[ValTy<'tcx>], - dest: Lvalue, - dest_ty: ty::Ty<'tcx>, - dest_layout: &'tcx Layout, - target: mir::BasicBlock, - ) -> EvalResult<'tcx> { - ecx.call_intrinsic(instance, args, dest, dest_ty, dest_layout, target) - } - - fn try_ptr_op<'a>( - ecx: &rustc_miri::interpret::EvalContext<'a, 'tcx, Self>, - bin_op: mir::BinOp, - left: PrimVal, - left_ty: ty::Ty<'tcx>, - right: PrimVal, - right_ty: ty::Ty<'tcx>, - ) -> EvalResult<'tcx, Option<(PrimVal, bool)>> { - ecx.ptr_op(bin_op, left, left_ty, right, right_ty) - } - - fn mark_static_initialized(m: memory::MemoryKind) -> EvalResult<'tcx> { - use memory::MemoryKind::*; - match m { - // FIXME: This could be allowed, but not for env vars set during miri execution - Env => err!(Unimplemented("statics can't refer to env vars".to_owned())), - _ => Ok(()), - } - } - - fn box_alloc<'a>( - ecx: &mut EvalContext<'a, 'tcx, Self>, - ty: ty::Ty<'tcx>, - dest: Lvalue, - ) -> EvalResult<'tcx> { - let size = ecx.type_size(ty)?.expect("box only works with sized types"); - let align = ecx.type_align(ty)?; - - // Call the `exchange_malloc` lang item - let malloc = ecx.tcx.lang_items().exchange_malloc_fn().unwrap(); - let malloc = ty::Instance::mono(ecx.tcx, malloc); - let malloc_mir = ecx.load_mir(malloc.def)?; - ecx.push_stack_frame( - malloc, - malloc_mir.span, - malloc_mir, - dest, - // Don't do anything when we are done. The statement() function will increment - // the old stack frame's stmt counter to the next statement, which means that when - // exchange_malloc returns, we go on evaluating exactly where we want to be. - StackPopCleanup::None, - )?; - - let mut args = ecx.frame().mir.args_iter(); - let usize = ecx.tcx.types.usize; - - // First argument: size - let dest = ecx.eval_lvalue(&mir::Lvalue::Local(args.next().unwrap()))?; - ecx.write_value( - ValTy { - value: Value::ByVal(PrimVal::Bytes(size as u128)), - ty: usize, - }, - dest, - )?; - - // Second argument: align - let dest = ecx.eval_lvalue(&mir::Lvalue::Local(args.next().unwrap()))?; - ecx.write_value( - ValTy { - value: Value::ByVal(PrimVal::Bytes(align as u128)), - ty: usize, - }, - dest, - )?; - - // No more arguments - assert!(args.next().is_none(), "exchange_malloc lang item has more arguments than expected"); - Ok(()) - } - - fn global_item_with_linkage<'a>( - ecx: &mut EvalContext<'a, 'tcx, Self>, - instance: ty::Instance<'tcx>, - mutability: Mutability, - ) -> EvalResult<'tcx> { - // FIXME: check that it's `#[linkage = "extern_weak"]` - trace!("Initializing an extern global with NULL"); - let ptr_size = ecx.memory.pointer_size(); - let ptr = ecx.memory.allocate( - ptr_size, - ptr_size, - MemoryKind::UninitializedStatic, - )?; - ecx.memory.write_ptr_sized_unsigned(ptr, PrimVal::Bytes(0))?; - ecx.memory.mark_static_initalized(ptr.alloc_id, mutability)?; - ecx.globals.insert( - GlobalId { - instance, - promoted: None, - }, - PtrAndAlign { - ptr: ptr.into(), - aligned: true, - }, - ); - Ok(()) - } -} diff --git a/miri/memory.rs b/miri/memory.rs deleted file mode 100644 index 110540c0cf1d..000000000000 --- a/miri/memory.rs +++ /dev/null @@ -1,16 +0,0 @@ - -#[derive(Debug, PartialEq, Copy, Clone)] -pub enum MemoryKind { - /// Error if deallocated any other way than `rust_deallocate` - Rust, - /// Error if deallocated any other way than `free` - C, - /// Part of env var emulation - Env, -} - -impl Into<::rustc_miri::interpret::MemoryKind> for MemoryKind { - fn into(self) -> ::rustc_miri::interpret::MemoryKind { - ::rustc_miri::interpret::MemoryKind::Machine(self) - } -} diff --git a/miri/operator.rs b/miri/operator.rs deleted file mode 100644 index 6d68aadf96cc..000000000000 --- a/miri/operator.rs +++ /dev/null @@ -1,175 +0,0 @@ -use rustc::ty; -use rustc::mir; - -use rustc_miri::interpret::*; - -use helpers::EvalContextExt as HelperEvalContextExt; - -pub trait EvalContextExt<'tcx> { - fn ptr_op( - &self, - bin_op: mir::BinOp, - left: PrimVal, - left_ty: ty::Ty<'tcx>, - right: PrimVal, - right_ty: ty::Ty<'tcx>, - ) -> EvalResult<'tcx, Option<(PrimVal, bool)>>; - - fn ptr_int_arithmetic( - &self, - bin_op: mir::BinOp, - left: MemoryPointer, - right: i128, - signed: bool, - ) -> EvalResult<'tcx, (PrimVal, bool)>; -} - -impl<'a, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, super::Evaluator> { - fn ptr_op( - &self, - bin_op: mir::BinOp, - left: PrimVal, - left_ty: ty::Ty<'tcx>, - right: PrimVal, - right_ty: ty::Ty<'tcx>, - ) -> EvalResult<'tcx, Option<(PrimVal, bool)>> { - use rustc_miri::interpret::PrimValKind::*; - use rustc::mir::BinOp::*; - let usize = PrimValKind::from_uint_size(self.memory.pointer_size()); - let isize = PrimValKind::from_int_size(self.memory.pointer_size()); - let left_kind = self.ty_to_primval_kind(left_ty)?; - let right_kind = self.ty_to_primval_kind(right_ty)?; - match bin_op { - Offset if left_kind == Ptr && right_kind == usize => { - let pointee_ty = left_ty - .builtin_deref(true, ty::LvaluePreference::NoPreference) - .expect("Offset called on non-ptr type") - .ty; - let ptr = self.pointer_offset( - left.into(), - pointee_ty, - right.to_bytes()? as i64, - )?; - Ok(Some((ptr.into_inner_primval(), false))) - } - // These work on anything - Eq if left_kind == right_kind => { - let result = match (left, right) { - (PrimVal::Bytes(left), PrimVal::Bytes(right)) => left == right, - (PrimVal::Ptr(left), PrimVal::Ptr(right)) => left == right, - (PrimVal::Undef, _) | - (_, PrimVal::Undef) => return err!(ReadUndefBytes), - _ => false, - }; - Ok(Some((PrimVal::from_bool(result), false))) - } - Ne if left_kind == right_kind => { - let result = match (left, right) { - (PrimVal::Bytes(left), PrimVal::Bytes(right)) => left != right, - (PrimVal::Ptr(left), PrimVal::Ptr(right)) => left != right, - (PrimVal::Undef, _) | - (_, PrimVal::Undef) => return err!(ReadUndefBytes), - _ => true, - }; - Ok(Some((PrimVal::from_bool(result), false))) - } - // These need both pointers to be in the same allocation - Lt | Le | Gt | Ge | Sub - if left_kind == right_kind && - (left_kind == Ptr || left_kind == usize || left_kind == isize) && - left.is_ptr() && right.is_ptr() => { - let left = left.to_ptr()?; - let right = right.to_ptr()?; - if left.alloc_id == right.alloc_id { - let res = match bin_op { - Lt => left.offset < right.offset, - Le => left.offset <= right.offset, - Gt => left.offset > right.offset, - Ge => left.offset >= right.offset, - Sub => { - return self.binary_op( - Sub, - PrimVal::Bytes(left.offset as u128), - self.tcx.types.usize, - PrimVal::Bytes(right.offset as u128), - self.tcx.types.usize, - ).map(Some) - } - _ => bug!("We already established it has to be one of these operators."), - }; - Ok(Some((PrimVal::from_bool(res), false))) - } else { - // Both are pointers, but from different allocations. - err!(InvalidPointerMath) - } - } - // These work if one operand is a pointer, the other an integer - Add | BitAnd | Sub - if left_kind == right_kind && (left_kind == usize || left_kind == isize) && - left.is_ptr() && right.is_bytes() => { - // Cast to i128 is fine as we checked the kind to be ptr-sized - self.ptr_int_arithmetic( - bin_op, - left.to_ptr()?, - right.to_bytes()? as i128, - left_kind == isize, - ).map(Some) - } - Add | BitAnd - if left_kind == right_kind && (left_kind == usize || left_kind == isize) && - left.is_bytes() && right.is_ptr() => { - // This is a commutative operation, just swap the operands - self.ptr_int_arithmetic( - bin_op, - right.to_ptr()?, - left.to_bytes()? as i128, - left_kind == isize, - ).map(Some) - } - _ => Ok(None), - } - } - - fn ptr_int_arithmetic( - &self, - bin_op: mir::BinOp, - left: MemoryPointer, - right: i128, - signed: bool, - ) -> EvalResult<'tcx, (PrimVal, bool)> { - use rustc::mir::BinOp::*; - - fn map_to_primval((res, over): (MemoryPointer, bool)) -> (PrimVal, bool) { - (PrimVal::Ptr(res), over) - } - - Ok(match bin_op { - Sub => - // The only way this can overflow is by underflowing, so signdeness of the right operands does not matter - map_to_primval(left.overflowing_signed_offset(-right, self)), - Add if signed => - map_to_primval(left.overflowing_signed_offset(right, self)), - Add if !signed => - map_to_primval(left.overflowing_offset(right as u64, self)), - - BitAnd if !signed => { - let base_mask : u64 = !(self.memory.get(left.alloc_id)?.align - 1); - let right = right as u64; - if right & base_mask == base_mask { - // Case 1: The base address bits are all preserved, i.e., right is all-1 there - (PrimVal::Ptr(MemoryPointer::new(left.alloc_id, left.offset & right)), false) - } else if right & base_mask == 0 { - // Case 2: The base address bits are all taken away, i.e., right is all-0 there - (PrimVal::from_u128((left.offset & right) as u128), false) - } else { - return err!(ReadPointerAsBytes); - } - } - - _ => { - let msg = format!("unimplemented binary op on pointer {:?}: {:?}, {:?} ({})", bin_op, left, right, if signed { "signed" } else { "unsigned" }); - return err!(Unimplemented(msg)); - } - }) - } -} diff --git a/miri/tls.rs b/miri/tls.rs deleted file mode 100644 index e592478f6f9e..000000000000 --- a/miri/tls.rs +++ /dev/null @@ -1,142 +0,0 @@ -use rustc::{ty, mir}; - -use super::{TlsKey, TlsEntry, EvalResult, EvalErrorKind, Pointer, Memory, Evaluator, Lvalue, - StackPopCleanup, EvalContext}; - -pub trait MemoryExt<'tcx> { - fn create_tls_key(&mut self, dtor: Option>) -> TlsKey; - fn delete_tls_key(&mut self, key: TlsKey) -> EvalResult<'tcx>; - fn load_tls(&mut self, key: TlsKey) -> EvalResult<'tcx, Pointer>; - fn store_tls(&mut self, key: TlsKey, new_data: Pointer) -> EvalResult<'tcx>; - fn fetch_tls_dtor( - &mut self, - key: Option, - ) -> EvalResult<'tcx, Option<(ty::Instance<'tcx>, Pointer, TlsKey)>>; -} - -pub trait EvalContextExt<'tcx> { - fn run_tls_dtors(&mut self) -> EvalResult<'tcx>; -} - -impl<'a, 'tcx: 'a> MemoryExt<'tcx> for Memory<'a, 'tcx, Evaluator> { - fn create_tls_key(&mut self, dtor: Option>) -> TlsKey { - let new_key = self.data.next_thread_local; - self.data.next_thread_local += 1; - self.data.thread_local.insert( - new_key, - TlsEntry { - data: Pointer::null(), - dtor, - }, - ); - trace!("New TLS key allocated: {} with dtor {:?}", new_key, dtor); - return new_key; - } - - fn delete_tls_key(&mut self, key: TlsKey) -> EvalResult<'tcx> { - return match self.data.thread_local.remove(&key) { - Some(_) => { - trace!("TLS key {} removed", key); - Ok(()) - } - None => err!(TlsOutOfBounds), - }; - } - - fn load_tls(&mut self, key: TlsKey) -> EvalResult<'tcx, Pointer> { - return match self.data.thread_local.get(&key) { - Some(&TlsEntry { data, .. }) => { - trace!("TLS key {} loaded: {:?}", key, data); - Ok(data) - } - None => err!(TlsOutOfBounds), - }; - } - - fn store_tls(&mut self, key: TlsKey, new_data: Pointer) -> EvalResult<'tcx> { - return match self.data.thread_local.get_mut(&key) { - Some(&mut TlsEntry { ref mut data, .. }) => { - trace!("TLS key {} stored: {:?}", key, new_data); - *data = new_data; - Ok(()) - } - None => err!(TlsOutOfBounds), - }; - } - - /// Returns a dtor, its argument and its index, if one is supposed to run - /// - /// An optional destructor function may be associated with each key value. - /// At thread exit, if a key value has a non-NULL destructor pointer, - /// and the thread has a non-NULL value associated with that key, - /// the value of the key is set to NULL, and then the function pointed - /// to is called with the previously associated value as its sole argument. - /// The order of destructor calls is unspecified if more than one destructor - /// exists for a thread when it exits. - /// - /// If, after all the destructors have been called for all non-NULL values - /// with associated destructors, there are still some non-NULL values with - /// associated destructors, then the process is repeated. - /// If, after at least {PTHREAD_DESTRUCTOR_ITERATIONS} iterations of destructor - /// calls for outstanding non-NULL values, there are still some non-NULL values - /// with associated destructors, implementations may stop calling destructors, - /// or they may continue calling destructors until no non-NULL values with - /// associated destructors exist, even though this might result in an infinite loop. - fn fetch_tls_dtor( - &mut self, - key: Option, - ) -> EvalResult<'tcx, Option<(ty::Instance<'tcx>, Pointer, TlsKey)>> { - use std::collections::Bound::*; - let start = match key { - Some(key) => Excluded(key), - None => Unbounded, - }; - for (&key, &mut TlsEntry { ref mut data, dtor }) in - self.data.thread_local.range_mut((start, Unbounded)) - { - if !data.is_null()? { - if let Some(dtor) = dtor { - let ret = Some((dtor, *data, key)); - *data = Pointer::null(); - return Ok(ret); - } - } - } - return Ok(None); - } -} - -impl<'a, 'tcx: 'a> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, Evaluator> { - fn run_tls_dtors(&mut self) -> EvalResult<'tcx> { - let mut dtor = self.memory.fetch_tls_dtor(None)?; - // FIXME: replace loop by some structure that works with stepping - while let Some((instance, ptr, key)) = dtor { - trace!("Running TLS dtor {:?} on {:?}", instance, ptr); - // TODO: Potentially, this has to support all the other possible instances? - // See eval_fn_call in interpret/terminator/mod.rs - let mir = self.load_mir(instance.def)?; - self.push_stack_frame( - instance, - mir.span, - mir, - Lvalue::undef(), - StackPopCleanup::None, - )?; - let arg_local = self.frame().mir.args_iter().next().ok_or( - EvalErrorKind::AbiViolation("TLS dtor does not take enough arguments.".to_owned()), - )?; - let dest = self.eval_lvalue(&mir::Lvalue::Local(arg_local))?; - let ty = self.tcx.mk_mut_ptr(self.tcx.types.u8); - self.write_ptr(dest, ptr, ty)?; - - // step until out of stackframes - while self.step()? {} - - dtor = match self.memory.fetch_tls_dtor(Some(key))? { - dtor @ Some(_) => dtor, - None => self.memory.fetch_tls_dtor(None)?, - }; - } - Ok(()) - } -} diff --git a/rustc_tests/Cargo.lock b/rustc_tests/Cargo.lock deleted file mode 100644 index a1e273a96bdb..000000000000 --- a/rustc_tests/Cargo.lock +++ /dev/null @@ -1,217 +0,0 @@ -[root] -name = "rustc_tests" -version = "0.1.0" -dependencies = [ - "miri 0.1.0", -] - -[[package]] -name = "aho-corasick" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "byteorder" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "env_logger" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "gcc" -version = "0.3.53" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lazy_static" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.30" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "log_settings" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "memchr" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miri" -version = "0.1.0" -dependencies = [ - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_miri 0.1.0", -] - -[[package]] -name = "regex" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-demangle" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_miri" -version = "0.1.0" -dependencies = [ - "backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" -"checksum backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99f2ce94e22b8e664d95c57fff45b98a966c2252b60691d0b7aeeccd88d70983" -"checksum backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c" -"checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -"checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" -"checksum gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)" = "e8310f7e9c890398b0e80e301c4f474e9918d2b27fca8f48486ca775fa9ffc5a" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" -"checksum libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)" = "2370ca07ec338939e356443dac2296f581453c35fe1e3a3ed06023c49435f915" -"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" -"checksum log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d382732ea0fbc09790c4899db3255bdea0fc78b54bf234bd18a63bb603915b6" -"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" -"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b" -"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db" -"checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e" -"checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/rustc_tests/Cargo.toml b/rustc_tests/Cargo.toml deleted file mode 100644 index 736f0629768f..000000000000 --- a/rustc_tests/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "rustc_tests" -version = "0.1.0" -authors = ["Oliver Schneider "] - -[dependencies] -miri = { path = ".." } diff --git a/rustc_tests/src/main.rs b/rustc_tests/src/main.rs deleted file mode 100644 index 819721c1cd0f..000000000000 --- a/rustc_tests/src/main.rs +++ /dev/null @@ -1,292 +0,0 @@ -#![feature(rustc_private, i128_type)] -extern crate miri; -extern crate getopts; -extern crate rustc; -extern crate rustc_driver; -extern crate rustc_errors; -extern crate syntax; - -use std::path::{PathBuf, Path}; -use std::io::Write; -use std::sync::{Mutex, Arc}; -use std::io; - - -use rustc::session::Session; -use rustc::middle::cstore::CrateStore; -use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls}; -use rustc_driver::driver::{CompileState, CompileController}; -use rustc::session::config::{self, Input, ErrorOutputType}; -use rustc::hir::{self, itemlikevisit}; -use rustc::ty::TyCtxt; -use syntax::ast; - -struct MiriCompilerCalls { - default: RustcDefaultCalls, - /// whether we are building for the host - host_target: bool, -} - -impl<'a> CompilerCalls<'a> for MiriCompilerCalls { - fn early_callback( - &mut self, - matches: &getopts::Matches, - sopts: &config::Options, - cfg: &ast::CrateConfig, - descriptions: &rustc_errors::registry::Registry, - output: ErrorOutputType - ) -> Compilation { - self.default.early_callback(matches, sopts, cfg, descriptions, output) - } - fn no_input( - &mut self, - matches: &getopts::Matches, - sopts: &config::Options, - cfg: &ast::CrateConfig, - odir: &Option, - ofile: &Option, - descriptions: &rustc_errors::registry::Registry - ) -> Option<(Input, Option)> { - self.default.no_input(matches, sopts, cfg, odir, ofile, descriptions) - } - fn late_callback( - &mut self, - matches: &getopts::Matches, - sess: &Session, - cstore: &CrateStore, - input: &Input, - odir: &Option, - ofile: &Option - ) -> Compilation { - self.default.late_callback(matches, sess, cstore, input, odir, ofile) - } - fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> CompileController<'a> { - let mut control = self.default.build_controller(sess, matches); - control.after_hir_lowering.callback = Box::new(after_hir_lowering); - control.after_analysis.callback = Box::new(after_analysis); - if !self.host_target { - // only fully compile targets on the host - control.after_analysis.stop = Compilation::Stop; - } - control - } -} - -fn after_hir_lowering(state: &mut CompileState) { - let attr = (String::from("miri"), syntax::feature_gate::AttributeType::Whitelisted); - state.session.plugin_attributes.borrow_mut().push(attr); -} - -fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) { - state.session.abort_if_errors(); - - let tcx = state.tcx.unwrap(); - let limits = Default::default(); - - if std::env::args().any(|arg| arg == "--test") { - struct Visitor<'a, 'tcx: 'a>(miri::ResourceLimits, TyCtxt<'a, 'tcx, 'tcx>, &'a CompileState<'a, 'tcx>); - impl<'a, 'tcx: 'a, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'a, 'tcx> { - fn visit_item(&mut self, i: &'hir hir::Item) { - if let hir::Item_::ItemFn(_, _, _, _, _, body_id) = i.node { - if i.attrs.iter().any(|attr| attr.name().map_or(false, |n| n == "test")) { - let did = self.1.hir.body_owner_def_id(body_id); - println!("running test: {}", self.1.hir.def_path(did).to_string(self.1)); - miri::eval_main(self.1, did, None, self.0); - self.2.session.abort_if_errors(); - } - } - } - fn visit_trait_item(&mut self, _trait_item: &'hir hir::TraitItem) {} - fn visit_impl_item(&mut self, _impl_item: &'hir hir::ImplItem) {} - } - state.hir_crate.unwrap().visit_all_item_likes(&mut Visitor(limits, tcx, state)); - } else if let Some((entry_node_id, _)) = *state.session.entry_fn.borrow() { - let entry_def_id = tcx.hir.local_def_id(entry_node_id); - let start_wrapper = tcx.lang_items().start_fn().and_then(|start_fn| - if tcx.is_mir_available(start_fn) { Some(start_fn) } else { None }); - miri::eval_main(tcx, entry_def_id, start_wrapper, limits); - - state.session.abort_if_errors(); - } else { - println!("no main function found, assuming auxiliary build"); - } -} - -fn main() { - let path = option_env!("MIRI_RUSTC_TEST") - .map(String::from) - .unwrap_or_else(|| { - std::env::var("MIRI_RUSTC_TEST") - .expect("need to set MIRI_RUSTC_TEST to path of rustc tests") - }); - - let mut mir_not_found = Vec::new(); - let mut crate_not_found = Vec::new(); - let mut success = 0; - let mut failed = Vec::new(); - let mut c_abi_fns = Vec::new(); - let mut abi = Vec::new(); - let mut unsupported = Vec::new(); - let mut unimplemented_intrinsic = Vec::new(); - let mut limits = Vec::new(); - let mut files: Vec<_> = std::fs::read_dir(path).unwrap().collect(); - while let Some(file) = files.pop() { - let file = file.unwrap(); - let path = file.path(); - if file.metadata().unwrap().is_dir() { - if !path.to_str().unwrap().ends_with("auxiliary") { - // add subdirs recursively - files.extend(std::fs::read_dir(path).unwrap()); - } - continue; - } - if !file.metadata().unwrap().is_file() || !path.to_str().unwrap().ends_with(".rs") { - continue; - } - let stderr = std::io::stderr(); - write!(stderr.lock(), "test [miri-pass] {} ... ", path.display()).unwrap(); - let mut host_target = false; - let mut args: Vec = std::env::args().filter(|arg| { - if arg == "--miri_host_target" { - host_target = true; - false // remove the flag, rustc doesn't know it - } else { - true - } - }).collect(); - // file to process - args.push(path.display().to_string()); - - let sysroot_flag = String::from("--sysroot"); - if !args.contains(&sysroot_flag) { - args.push(sysroot_flag); - args.push(Path::new(&std::env::var("HOME").unwrap()).join(".xargo").join("HOST").display().to_string()); - } - - args.push("-Zmir-opt-level=3".to_owned()); - // for auxilary builds in unit tests - args.push("-Zalways-encode-mir".to_owned()); - - // A threadsafe buffer for writing. - #[derive(Default, Clone)] - struct BufWriter(Arc>>); - - impl Write for BufWriter { - fn write(&mut self, buf: &[u8]) -> io::Result { - self.0.lock().unwrap().write(buf) - } - fn flush(&mut self) -> io::Result<()> { - self.0.lock().unwrap().flush() - } - } - let buf = BufWriter::default(); - let output = buf.clone(); - let result = std::panic::catch_unwind(|| { - rustc_driver::run_compiler(&args, &mut MiriCompilerCalls { - default: RustcDefaultCalls, - host_target, - }, None, Some(Box::new(buf))); - }); - - match result { - Ok(()) => { - success += 1; - writeln!(stderr.lock(), "ok").unwrap() - }, - Err(_) => { - let output = output.0.lock().unwrap(); - let output_err = std::str::from_utf8(&output).unwrap(); - if let Some(text) = output_err.splitn(2, "no mir for `").nth(1) { - let end = text.find('`').unwrap(); - mir_not_found.push(text[..end].to_string()); - writeln!(stderr.lock(), "NO MIR FOR `{}`", &text[..end]).unwrap(); - } else if let Some(text) = output_err.splitn(2, "can't find crate for `").nth(1) { - let end = text.find('`').unwrap(); - crate_not_found.push(text[..end].to_string()); - writeln!(stderr.lock(), "CAN'T FIND CRATE FOR `{}`", &text[..end]).unwrap(); - } else { - for text in output_err.split("error: ").skip(1) { - let end = text.find('\n').unwrap_or(text.len()); - let c_abi = "can't call C ABI function: "; - let unimplemented_intrinsic_s = "unimplemented intrinsic: "; - let unsupported_s = "miri does not support "; - let abi_s = "can't handle function with "; - let limit_s = "reached the configured maximum "; - if text.starts_with(c_abi) { - c_abi_fns.push(text[c_abi.len()..end].to_string()); - } else if text.starts_with(unimplemented_intrinsic_s) { - unimplemented_intrinsic.push(text[unimplemented_intrinsic_s.len()..end].to_string()); - } else if text.starts_with(unsupported_s) { - unsupported.push(text[unsupported_s.len()..end].to_string()); - } else if text.starts_with(abi_s) { - abi.push(text[abi_s.len()..end].to_string()); - } else if text.starts_with(limit_s) { - limits.push(text[limit_s.len()..end].to_string()); - } else if text.find("aborting").is_none() { - failed.push(text[..end].to_string()); - } - } - writeln!(stderr.lock(), "stderr: \n {}", output_err).unwrap(); - } - } - } - } - let stderr = std::io::stderr(); - let mut stderr = stderr.lock(); - writeln!(stderr, "{} success, {} no mir, {} crate not found, {} failed, \ - {} C fn, {} ABI, {} unsupported, {} intrinsic", - success, mir_not_found.len(), crate_not_found.len(), failed.len(), - c_abi_fns.len(), abi.len(), unsupported.len(), unimplemented_intrinsic.len()).unwrap(); - writeln!(stderr, "# The \"other reasons\" errors").unwrap(); - writeln!(stderr, "(sorted, deduplicated)").unwrap(); - print_vec(&mut stderr, failed); - - writeln!(stderr, "# can't call C ABI function").unwrap(); - print_vec(&mut stderr, c_abi_fns); - - writeln!(stderr, "# unsupported ABI").unwrap(); - print_vec(&mut stderr, abi); - - writeln!(stderr, "# unsupported").unwrap(); - print_vec(&mut stderr, unsupported); - - writeln!(stderr, "# unimplemented intrinsics").unwrap(); - print_vec(&mut stderr, unimplemented_intrinsic); - - writeln!(stderr, "# mir not found").unwrap(); - print_vec(&mut stderr, mir_not_found); - - writeln!(stderr, "# crate not found").unwrap(); - print_vec(&mut stderr, crate_not_found); -} - -fn print_vec(stderr: &mut W, v: Vec) { - writeln!(stderr, "```").unwrap(); - for (n, s) in vec_to_hist(v).into_iter().rev() { - writeln!(stderr, "{:4} {}", n, s).unwrap(); - } - writeln!(stderr, "```").unwrap(); -} - -fn vec_to_hist(mut v: Vec) -> Vec<(usize, T)> { - v.sort(); - let mut v = v.into_iter(); - let mut result = Vec::new(); - let mut current = v.next(); - 'outer: while let Some(current_val) = current { - let mut n = 1; - for next in &mut v { - if next == current_val { - n += 1; - } else { - result.push((n, current_val)); - current = Some(next); - continue 'outer; - } - } - result.push((n, current_val)); - break; - } - result.sort(); - result -} diff --git a/src/librustc_mir/Cargo.toml b/src/librustc_mir/Cargo.toml deleted file mode 100644 index c72de828c8d2..000000000000 --- a/src/librustc_mir/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -authors = ["Scott Olson "] -description = "An experimental interpreter for Rust MIR." -license = "MIT/Apache-2.0" -name = "rustc_miri" -repository = "https://github.com/solson/miri" -version = "0.1.0" -workspace = "../.." - -[lib] -path = "lib.rs" - -[dependencies] -byteorder = { version = "1.1", features = ["i128"]} -log = "0.3.6" -log_settings = "0.1.1" -lazy_static = "0.2.8" -regex = "0.2.2" -backtrace = "0.3.3" diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs deleted file mode 100644 index c640932e50e2..000000000000 --- a/src/librustc_mir/lib.rs +++ /dev/null @@ -1,26 +0,0 @@ -#![feature( - i128_type, - rustc_private, - conservative_impl_trait, - never_type, - catch_expr, -)] - -// From rustc. -#[macro_use] -extern crate log; -extern crate log_settings; -#[macro_use] -extern crate rustc; -extern crate rustc_const_math; -extern crate rustc_data_structures; -extern crate syntax; - -// From crates.io. -extern crate byteorder; -#[macro_use] -extern crate lazy_static; -extern crate regex; -extern crate backtrace; - -pub mod interpret; diff --git a/tests/compile-fail-fullmir/undefined_byte_read.rs b/tests/compile-fail-fullmir/undefined_byte_read.rs deleted file mode 100644 index 99404b7d5f3f..000000000000 --- a/tests/compile-fail-fullmir/undefined_byte_read.rs +++ /dev/null @@ -1,9 +0,0 @@ -// This should fail even without validation -// compile-flags: -Zmir-emit-validate=0 - -fn main() { - let v: Vec = Vec::with_capacity(10); - let undef = unsafe { *v.get_unchecked(5) }; - let x = undef + 1; //~ ERROR: attempted to read undefined bytes - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/alignment.rs b/tests/compile-fail/alignment.rs deleted file mode 100644 index 4faaa359df62..000000000000 --- a/tests/compile-fail/alignment.rs +++ /dev/null @@ -1,11 +0,0 @@ -fn main() { - // miri always gives allocations the worst possible alignment, so a `u8` array is guaranteed - // to be at the virtual location 1 (so one byte offset from the ultimate alignemnt location 0) - let mut x = [0u8; 20]; - let x_ptr: *mut u8 = &mut x[0]; - let y_ptr = x_ptr as *mut u64; - unsafe { - *y_ptr = 42; //~ ERROR tried to access memory with alignment 1, but alignment - } - panic!("unreachable in miri"); -} diff --git a/tests/compile-fail/assume.rs b/tests/compile-fail/assume.rs deleted file mode 100644 index 69758a5d7fe8..000000000000 --- a/tests/compile-fail/assume.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![feature(core_intrinsics)] - -fn main() { - let x = 5; - unsafe { - std::intrinsics::assume(x < 10); - std::intrinsics::assume(x > 1); - std::intrinsics::assume(x > 42); //~ ERROR: `assume` argument was false - } -} diff --git a/tests/compile-fail/bitop-beyond-alignment.rs b/tests/compile-fail/bitop-beyond-alignment.rs deleted file mode 100644 index a30c054ab5d0..000000000000 --- a/tests/compile-fail/bitop-beyond-alignment.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(dead_code)] - -use std::mem; - -enum Tag { - Tag2(A) -} - -struct Rec { - c8: u8, - t: Tag -} - -fn mk_rec() -> Rec { - return Rec { c8:0, t:Tag::Tag2(0) }; -} - -fn is_u64_aligned(u: &Tag) -> bool { - let p: usize = unsafe { mem::transmute(u) }; - let u64_align = std::mem::align_of::(); - return (p & (u64_align + 1)) == 0; //~ ERROR a raw memory access tried to access part of a pointer value as raw bytes -} - -pub fn main() { - let x = mk_rec(); - assert!(is_u64_aligned(&x.t)); -} diff --git a/tests/compile-fail/cast_box_int_to_fn_ptr.rs b/tests/compile-fail/cast_box_int_to_fn_ptr.rs deleted file mode 100644 index 912b1bd7d91f..000000000000 --- a/tests/compile-fail/cast_box_int_to_fn_ptr.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Validation makes this fail in the wrong place -// compile-flags: -Zmir-emit-validate=0 - -fn main() { - let b = Box::new(42); - let g = unsafe { - std::mem::transmute::<&usize, &fn(i32)>(&b) - }; - - (*g)(42) //~ ERROR a memory access tried to interpret some bytes as a pointer -} diff --git a/tests/compile-fail/cast_fn_ptr.rs b/tests/compile-fail/cast_fn_ptr.rs deleted file mode 100644 index 7509ae6ed77c..000000000000 --- a/tests/compile-fail/cast_fn_ptr.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn main() { - fn f() {} - - let g = unsafe { - std::mem::transmute::(f) - }; - - g(42) //~ ERROR tried to call a function with sig fn() through a function pointer of type fn(i32) -} diff --git a/tests/compile-fail/cast_fn_ptr2.rs b/tests/compile-fail/cast_fn_ptr2.rs deleted file mode 100644 index 5d902e1f9aaa..000000000000 --- a/tests/compile-fail/cast_fn_ptr2.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn main() { - fn f(_ : (i32,i32)) {} - - let g = unsafe { - std::mem::transmute::(f) - }; - - g(42) //~ ERROR tried to call a function with sig fn((i32, i32)) through a function pointer of type fn(i32) -} diff --git a/tests/compile-fail/cast_fn_ptr_unsafe.rs b/tests/compile-fail/cast_fn_ptr_unsafe.rs deleted file mode 100644 index 568681da3c5d..000000000000 --- a/tests/compile-fail/cast_fn_ptr_unsafe.rs +++ /dev/null @@ -1,10 +0,0 @@ -// just making sure that fn -> unsafe fn casts are handled by rustc so miri doesn't have to -fn main() { - fn f() {} - - let g = f as fn() as unsafe fn(i32); //~ERROR: non-primitive cast: `fn()` as `unsafe fn(i32)` - - unsafe { - g(42); - } -} diff --git a/tests/compile-fail/cast_fn_ptr_unsafe2.rs b/tests/compile-fail/cast_fn_ptr_unsafe2.rs deleted file mode 100644 index 314365939fe8..000000000000 --- a/tests/compile-fail/cast_fn_ptr_unsafe2.rs +++ /dev/null @@ -1,10 +0,0 @@ -// just making sure that fn -> unsafe fn casts are handled by rustc so miri doesn't have to -fn main() { - fn f() {} - - let g = f as fn() as fn(i32) as unsafe fn(i32); //~ERROR: non-primitive cast: `fn()` as `fn(i32)` - - unsafe { - g(42); - } -} diff --git a/tests/compile-fail/cast_int_to_fn_ptr.rs b/tests/compile-fail/cast_int_to_fn_ptr.rs deleted file mode 100644 index 23f85dbaf3ec..000000000000 --- a/tests/compile-fail/cast_int_to_fn_ptr.rs +++ /dev/null @@ -1,10 +0,0 @@ -// Validation makes this fail in the wrong place -// compile-flags: -Zmir-emit-validate=0 - -fn main() { - let g = unsafe { - std::mem::transmute::(42) - }; - - g(42) //~ ERROR a memory access tried to interpret some bytes as a pointer -} diff --git a/tests/compile-fail/copy_nonoverlapping.rs b/tests/compile-fail/copy_nonoverlapping.rs deleted file mode 100644 index f4acbadfd549..000000000000 --- a/tests/compile-fail/copy_nonoverlapping.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(core_intrinsics)] - -use std::intrinsics::*; - -//error-pattern: copy_nonoverlapping called on overlapping ranges - -fn main() { - let mut data = [0u8; 16]; - unsafe { - let a = &data[0] as *const _; - let b = &mut data[1] as *mut _; - std::ptr::copy_nonoverlapping(a, b, 2); - } -} diff --git a/tests/compile-fail/ctlz_nonzero.rs b/tests/compile-fail/ctlz_nonzero.rs deleted file mode 100644 index 704c4d4b7d46..000000000000 --- a/tests/compile-fail/ctlz_nonzero.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![feature(intrinsics)] - -mod rusti { - extern "rust-intrinsic" { - pub fn ctlz_nonzero(x: T) -> T; - } -} - -pub fn main() { - unsafe { - use rusti::*; - - ctlz_nonzero(0u8); //~ ERROR: ctlz_nonzero called on 0 - } -} diff --git a/tests/compile-fail/cttz_nonzero.rs b/tests/compile-fail/cttz_nonzero.rs deleted file mode 100644 index eda25c661521..000000000000 --- a/tests/compile-fail/cttz_nonzero.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![feature(intrinsics)] - -mod rusti { - extern "rust-intrinsic" { - pub fn cttz_nonzero(x: T) -> T; - } -} - -pub fn main() { - unsafe { - use rusti::*; - - cttz_nonzero(0u8); //~ ERROR: cttz_nonzero called on 0 - } -} diff --git a/tests/compile-fail/dangling_pointer_deref.rs b/tests/compile-fail/dangling_pointer_deref.rs deleted file mode 100644 index 0ede7c96f004..000000000000 --- a/tests/compile-fail/dangling_pointer_deref.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() { - let p = { - let b = Box::new(42); - &*b as *const i32 - }; - let x = unsafe { *p }; //~ ERROR: dangling pointer was dereferenced - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/deallocate-bad-alignment.rs b/tests/compile-fail/deallocate-bad-alignment.rs deleted file mode 100644 index c1ae7477c81a..000000000000 --- a/tests/compile-fail/deallocate-bad-alignment.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -// error-pattern: tried to deallocate or reallocate using incorrect alignment or size - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap(); - Heap.dealloc(x, Layout::from_size_align_unchecked(1, 2)); - } -} diff --git a/tests/compile-fail/deallocate-bad-size.rs b/tests/compile-fail/deallocate-bad-size.rs deleted file mode 100644 index 5577f10736d2..000000000000 --- a/tests/compile-fail/deallocate-bad-size.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -// error-pattern: tried to deallocate or reallocate using incorrect alignment or size - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap(); - Heap.dealloc(x, Layout::from_size_align_unchecked(2, 1)); - } -} diff --git a/tests/compile-fail/deallocate-twice.rs b/tests/compile-fail/deallocate-twice.rs deleted file mode 100644 index e11df0eb4147..000000000000 --- a/tests/compile-fail/deallocate-twice.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -// error-pattern: tried to deallocate dangling pointer - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap(); - Heap.dealloc(x, Layout::from_size_align_unchecked(1, 1)); - Heap.dealloc(x, Layout::from_size_align_unchecked(1, 1)); - } -} diff --git a/tests/compile-fail/deref_fn_ptr.rs b/tests/compile-fail/deref_fn_ptr.rs deleted file mode 100644 index c1eaf7eaa61d..000000000000 --- a/tests/compile-fail/deref_fn_ptr.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn f() {} - -fn main() { - let x: i32 = unsafe { - *std::mem::transmute::(f) //~ ERROR: tried to dereference a function pointer - }; - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/div-by-zero-2.rs b/tests/compile-fail/div-by-zero-2.rs deleted file mode 100644 index 3e869ad4a507..000000000000 --- a/tests/compile-fail/div-by-zero-2.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(const_err)] - -fn main() { - let _n = 1 / 0; //~ ERROR: DivisionByZero -} diff --git a/tests/compile-fail/div-by-zero.rs b/tests/compile-fail/div-by-zero.rs deleted file mode 100644 index 4ac6214d88ab..000000000000 --- a/tests/compile-fail/div-by-zero.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(core_intrinsics)] - -use std::intrinsics::*; - -//error-pattern: Division by 0 in unchecked_div - -fn main() { - unsafe { - let _n = unchecked_div(1i64, 0); - } -} diff --git a/tests/compile-fail/execute_memory.rs b/tests/compile-fail/execute_memory.rs deleted file mode 100644 index 87d975e1f9d4..000000000000 --- a/tests/compile-fail/execute_memory.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Validation makes this fail in the wrong place -// compile-flags: -Zmir-emit-validate=0 - -#![feature(box_syntax)] - -fn main() { - let x = box 42; - unsafe { - let f = std::mem::transmute::, fn()>(x); - f() //~ ERROR: tried to treat a memory pointer as a function pointer - } -} diff --git a/tests/compile-fail/fn_ptr_offset.rs b/tests/compile-fail/fn_ptr_offset.rs deleted file mode 100644 index 45e32142a8c4..000000000000 --- a/tests/compile-fail/fn_ptr_offset.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Validation makes this fail in the wrong place -// compile-flags: -Zmir-emit-validate=0 - -use std::mem; - -fn f() {} - -fn main() { - let x : fn() = f; - let y : *mut u8 = unsafe { mem::transmute(x) }; - let y = y.wrapping_offset(1); - let x : fn() = unsafe { mem::transmute(y) }; - x(); //~ ERROR: tried to use a function pointer after offsetting it -} diff --git a/tests/compile-fail/invalid_bool.rs b/tests/compile-fail/invalid_bool.rs deleted file mode 100644 index c30c9b439a46..000000000000 --- a/tests/compile-fail/invalid_bool.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let b = unsafe { std::mem::transmute::(2) }; //~ ERROR: invalid boolean value read - if b { unreachable!() } else { unreachable!() } -} diff --git a/tests/compile-fail/invalid_enum_discriminant.rs b/tests/compile-fail/invalid_enum_discriminant.rs deleted file mode 100644 index 9ce6d44ca460..000000000000 --- a/tests/compile-fail/invalid_enum_discriminant.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Validation makes this fail in the wrong place -// compile-flags: -Zmir-emit-validate=0 - -#[repr(C)] -pub enum Foo { - A, B, C, D -} - -fn main() { - let f = unsafe { std::mem::transmute::(42) }; - match f { - Foo::A => {}, //~ ERROR invalid enum discriminant value read - Foo::B => {}, - Foo::C => {}, - Foo::D => {}, - } -} diff --git a/tests/compile-fail/match_char.rs b/tests/compile-fail/match_char.rs deleted file mode 100644 index 4fee6e692bad..000000000000 --- a/tests/compile-fail/match_char.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() { - assert!(std::char::from_u32(-1_i32 as u32).is_none()); - match unsafe { std::mem::transmute::(-1) } { //~ERROR tried to interpret an invalid 32-bit value as a char: 4294967295 - 'a' => {}, - 'b' => {}, - _ => {}, - } -} diff --git a/tests/compile-fail/memleak.rs b/tests/compile-fail/memleak.rs deleted file mode 100644 index 71b4e2f442f3..000000000000 --- a/tests/compile-fail/memleak.rs +++ /dev/null @@ -1,5 +0,0 @@ -//error-pattern: the evaluated program leaked memory - -fn main() { - std::mem::forget(Box::new(42)); -} diff --git a/tests/compile-fail/memleak_rc.rs b/tests/compile-fail/memleak_rc.rs deleted file mode 100644 index b2bc6722afb0..000000000000 --- a/tests/compile-fail/memleak_rc.rs +++ /dev/null @@ -1,12 +0,0 @@ -//error-pattern: the evaluated program leaked memory - -use std::rc::Rc; -use std::cell::RefCell; - -struct Dummy(Rc>>); - -fn main() { - let x = Dummy(Rc::new(RefCell::new(None))); - let y = Dummy(x.0.clone()); - *x.0.borrow_mut() = Some(y); -} diff --git a/tests/compile-fail/modifying_constants.rs b/tests/compile-fail/modifying_constants.rs deleted file mode 100644 index cb2e7217d579..000000000000 --- a/tests/compile-fail/modifying_constants.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - let x = &1; // the `&1` is promoted to a constant, but it used to be that only the pointer is marked static, not the pointee - let y = unsafe { &mut *(x as *const i32 as *mut i32) }; - *y = 42; //~ ERROR tried to modify constant memory - assert_eq!(*x, 42); -} diff --git a/tests/compile-fail/never_say_never.rs b/tests/compile-fail/never_say_never.rs deleted file mode 100644 index 6aa4e281818c..000000000000 --- a/tests/compile-fail/never_say_never.rs +++ /dev/null @@ -1,15 +0,0 @@ -// This should fail even without validation -// compile-flags: -Zmir-emit-validate=0 - -#![feature(never_type)] -#![allow(unreachable_code)] - -fn main() { - let y = &5; - let x: ! = unsafe { - *(y as *const _ as *const !) //~ ERROR tried to access a dead local variable - }; - f(x) -} - -fn f(x: !) -> ! { x } diff --git a/tests/compile-fail/never_transmute_humans.rs b/tests/compile-fail/never_transmute_humans.rs deleted file mode 100644 index 7390596cf7fa..000000000000 --- a/tests/compile-fail/never_transmute_humans.rs +++ /dev/null @@ -1,17 +0,0 @@ -// This should fail even without validation -// compile-flags: -Zmir-emit-validate=0 - -#![feature(never_type)] -#![allow(unreachable_code)] -#![allow(unused_variables)] - -struct Human; - -fn main() { - let x: ! = unsafe { - std::mem::transmute::(Human) //~ ERROR entered unreachable code - }; - f(x) -} - -fn f(x: !) -> ! { x } diff --git a/tests/compile-fail/never_transmute_void.rs b/tests/compile-fail/never_transmute_void.rs deleted file mode 100644 index 0b0897644409..000000000000 --- a/tests/compile-fail/never_transmute_void.rs +++ /dev/null @@ -1,19 +0,0 @@ -// This should fail even without validation -// compile-flags: -Zmir-emit-validate=0 - -#![feature(never_type)] -#![allow(unreachable_code)] -#![allow(unused_variables)] - -enum Void {} - -fn f(v: Void) -> ! { - match v {} //~ ERROR entered unreachable code -} - -fn main() { - let v: Void = unsafe { - std::mem::transmute::<(), Void>(()) - }; - f(v); -} diff --git a/tests/compile-fail/null_pointer_deref.rs b/tests/compile-fail/null_pointer_deref.rs deleted file mode 100644 index 5a26856eba08..000000000000 --- a/tests/compile-fail/null_pointer_deref.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR: invalid use of NULL pointer - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/oom.rs b/tests/compile-fail/oom.rs deleted file mode 100644 index d4aebb912ee1..000000000000 --- a/tests/compile-fail/oom.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![feature(custom_attribute, attr_literals)] -#![miri(memory_size=4095)] - -fn main() { - let _x = [42; 1024]; - //~^ERROR tried to allocate 4096 more bytes, but only -} diff --git a/tests/compile-fail/oom2.rs b/tests/compile-fail/oom2.rs deleted file mode 100644 index 6c973bcf4016..000000000000 --- a/tests/compile-fail/oom2.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Validation forces more allocation; disable it. -// compile-flags: -Zmir-emit-validate=0 -#![feature(box_syntax, custom_attribute, attr_literals)] -#![miri(memory_size=1024)] - -// On 64bit platforms, the allocator needs 32 bytes allocated to pass a return value, so that's the error we see. -// On 32bit platforms, it's just 16 bytes. -// error-pattern: tried to allocate - -fn main() { - loop { - ::std::mem::forget(box 42); - } -} diff --git a/tests/compile-fail/out_of_bounds_ptr_1.rs b/tests/compile-fail/out_of_bounds_ptr_1.rs deleted file mode 100644 index 8dce7e578626..000000000000 --- a/tests/compile-fail/out_of_bounds_ptr_1.rs +++ /dev/null @@ -1,8 +0,0 @@ -// error-pattern: pointer computed at offset 5, outside bounds of allocation -fn main() { - let v = [0i8; 4]; - let x = &v as *const i8; - // The error is inside another function, so we cannot match it by line - let x = unsafe { x.offset(5) }; - panic!("this should never print: {:?}", x); -} diff --git a/tests/compile-fail/out_of_bounds_ptr_2.rs b/tests/compile-fail/out_of_bounds_ptr_2.rs deleted file mode 100644 index f7546494574b..000000000000 --- a/tests/compile-fail/out_of_bounds_ptr_2.rs +++ /dev/null @@ -1,7 +0,0 @@ -// error-pattern: overflowing math -fn main() { - let v = [0i8; 4]; - let x = &v as *const i8; - let x = unsafe { x.offset(-1) }; - panic!("this should never print: {:?}", x); -} diff --git a/tests/compile-fail/out_of_bounds_read.rs b/tests/compile-fail/out_of_bounds_read.rs deleted file mode 100644 index 8c56b14bdf22..000000000000 --- a/tests/compile-fail/out_of_bounds_read.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - let v: Vec = vec![1, 2]; - let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR: which has size 2 - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/out_of_bounds_read2.rs b/tests/compile-fail/out_of_bounds_read2.rs deleted file mode 100644 index d29b22ffb2a6..000000000000 --- a/tests/compile-fail/out_of_bounds_read2.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - let v: Vec = vec![1, 2]; - let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR: memory access at offset 6, outside bounds of allocation - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/overflowing-lsh-neg.rs b/tests/compile-fail/overflowing-lsh-neg.rs deleted file mode 100644 index 3a889be741ef..000000000000 --- a/tests/compile-fail/overflowing-lsh-neg.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(exceeding_bitshifts)] -#![allow(const_err)] - -fn main() { - let _n = 2i64 << -1; //~ Overflow(Shl) -} diff --git a/tests/compile-fail/overflowing-rsh-2.rs b/tests/compile-fail/overflowing-rsh-2.rs deleted file mode 100644 index ac09a1740c43..000000000000 --- a/tests/compile-fail/overflowing-rsh-2.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(exceeding_bitshifts, const_err)] - -fn main() { - // Make sure we catch overflows that would be hidden by first casting the RHS to u32 - let _n = 1i64 >> (u32::max_value() as i64 + 1); //~ Overflow(Shr) -} diff --git a/tests/compile-fail/overflowing-rsh.rs b/tests/compile-fail/overflowing-rsh.rs deleted file mode 100644 index a7ac9d1d5039..000000000000 --- a/tests/compile-fail/overflowing-rsh.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(exceeding_bitshifts)] - -fn main() { - let _n = 1i64 >> 64; //~ Overflow(Shr) -} diff --git a/tests/compile-fail/overflowing-unchecked-rsh.rs b/tests/compile-fail/overflowing-unchecked-rsh.rs deleted file mode 100644 index b8291e1300ed..000000000000 --- a/tests/compile-fail/overflowing-unchecked-rsh.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(core_intrinsics)] - -use std::intrinsics::*; - -//error-pattern: Overflowing shift by 64 in unchecked_shr - -fn main() { - unsafe { - let _n = unchecked_shr(1i64, 64); - } -} diff --git a/tests/compile-fail/overwriting_part_of_relocation_makes_the_rest_undefined.rs b/tests/compile-fail/overwriting_part_of_relocation_makes_the_rest_undefined.rs deleted file mode 100644 index 50f51d0ba9ca..000000000000 --- a/tests/compile-fail/overwriting_part_of_relocation_makes_the_rest_undefined.rs +++ /dev/null @@ -1,11 +0,0 @@ -fn main() { - let mut p = &42; - unsafe { - let ptr: *mut _ = &mut p; - *(ptr as *mut u8) = 123; // if we ever support 8 bit pointers, this is gonna cause - // "attempted to interpret some raw bytes as a pointer address" instead of - // "attempted to read undefined bytes" - } - let x = *p; //~ ERROR: attempted to read undefined bytes - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/panic.rs b/tests/compile-fail/panic.rs deleted file mode 100644 index 80149eeffaa6..000000000000 --- a/tests/compile-fail/panic.rs +++ /dev/null @@ -1,7 +0,0 @@ -// FIXME: Something in panic handling fails validation with full-MIR -// compile-flags: -Zmir-emit-validate=0 -//error-pattern: the evaluated program panicked - -fn main() { - assert_eq!(5, 6); -} diff --git a/tests/compile-fail/pointer_byte_read_1.rs b/tests/compile-fail/pointer_byte_read_1.rs deleted file mode 100644 index 342eb28a970f..000000000000 --- a/tests/compile-fail/pointer_byte_read_1.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let x = 13; - let y = &x; - let z = &y as *const &i32 as *const usize; - let ptr_bytes = unsafe { *z }; // the actual deref is fine, because we read the entire pointer at once - let _ = ptr_bytes % 432; //~ ERROR: tried to access part of a pointer value as raw bytes -} diff --git a/tests/compile-fail/pointer_byte_read_2.rs b/tests/compile-fail/pointer_byte_read_2.rs deleted file mode 100644 index b0f619332e00..000000000000 --- a/tests/compile-fail/pointer_byte_read_2.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let x = 13; - let y = &x; - let z = &y as *const &i32 as *const u8; - // the deref fails, because we are reading only a part of the pointer - let _ = unsafe { *z }; //~ ERROR: tried to access part of a pointer value as raw bytes -} diff --git a/tests/compile-fail/pointers_to_different_allocations_are_unorderable.rs b/tests/compile-fail/pointers_to_different_allocations_are_unorderable.rs deleted file mode 100644 index 245b7527c55b..000000000000 --- a/tests/compile-fail/pointers_to_different_allocations_are_unorderable.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let x: *const u8 = &1; - let y: *const u8 = &2; - if x < y { //~ ERROR: attempted to do invalid arithmetic on pointers - unreachable!() - } -} diff --git a/tests/compile-fail/ptr_bitops.rs b/tests/compile-fail/ptr_bitops.rs deleted file mode 100644 index 78fd8e912b5e..000000000000 --- a/tests/compile-fail/ptr_bitops.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let bytes = [0i8, 1, 2, 3, 4, 5, 6, 7, 8, 9]; - let one = bytes.as_ptr().wrapping_offset(1); - let three = bytes.as_ptr().wrapping_offset(3); - let res = (one as usize) | (three as usize); //~ ERROR a raw memory access tried to access part of a pointer value as raw bytes - println!("{}", res); -} diff --git a/tests/compile-fail/ptr_int_cast.rs b/tests/compile-fail/ptr_int_cast.rs deleted file mode 100644 index 396c71ebb03d..000000000000 --- a/tests/compile-fail/ptr_int_cast.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() { - let x = &1; - // Casting down to u8 and back up to a pointer loses too much precision; this must not work. - let x = x as *const i32; - let x = x as u8; //~ ERROR: a raw memory access tried to access part of a pointer value as raw bytes - let x = x as *const i32; - let _ = unsafe { *x }; -} diff --git a/tests/compile-fail/ptr_offset_overflow.rs b/tests/compile-fail/ptr_offset_overflow.rs deleted file mode 100644 index 578468c3399b..000000000000 --- a/tests/compile-fail/ptr_offset_overflow.rs +++ /dev/null @@ -1,6 +0,0 @@ -//error-pattern: overflowing math -fn main() { - let v = [1i8, 2]; - let x = &v[1] as *const i8; - let _ = unsafe { x.offset(isize::min_value()) }; -} diff --git a/tests/compile-fail/reading_half_a_pointer.rs b/tests/compile-fail/reading_half_a_pointer.rs deleted file mode 100644 index cc41b52f3337..000000000000 --- a/tests/compile-fail/reading_half_a_pointer.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![allow(dead_code)] - -// We use packed structs to get around alignment restrictions -#[repr(packed)] -struct Data { - pad: u8, - ptr: &'static i32, -} - -// But we need to gurantee some alignment -struct Wrapper { - align: u64, - data: Data, -} - -static G : i32 = 0; - -fn main() { - let mut w = Wrapper { align: 0, data: Data { pad: 0, ptr: &G } }; - - // Get a pointer to the beginning of the Data struct (one u8 byte, then the pointer bytes). - // Thanks to the wrapper, we know this is aligned-enough to perform a load at ptr size. - // We load at pointer type, so having a relocation is okay -- but here, the relocation - // starts 1 byte to the right, so using it would actually be wrong! - let d_alias = &mut w.data as *mut _ as *mut *const u8; - unsafe { - let _x = *d_alias; //~ ERROR: tried to access part of a pointer value as raw bytes - } -} diff --git a/tests/compile-fail/reallocate-bad-alignment-2.rs b/tests/compile-fail/reallocate-bad-alignment-2.rs deleted file mode 100644 index cd6214440ff2..000000000000 --- a/tests/compile-fail/reallocate-bad-alignment-2.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -// error-pattern: tried to deallocate or reallocate using incorrect alignment or size - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap(); - // Try realloc with a too big alignment. - let _y = Heap.realloc(x, Layout::from_size_align_unchecked(1, 2), Layout::from_size_align_unchecked(1, 1)).unwrap(); - } -} diff --git a/tests/compile-fail/reallocate-bad-alignment.rs b/tests/compile-fail/reallocate-bad-alignment.rs deleted file mode 100644 index da5fe1d81909..000000000000 --- a/tests/compile-fail/reallocate-bad-alignment.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -// error-pattern: tried to deallocate or reallocate using incorrect alignment or size - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 2)).unwrap(); - // Try realloc with a too small alignment. - let _y = Heap.realloc(x, Layout::from_size_align_unchecked(1, 1), Layout::from_size_align_unchecked(1, 2)).unwrap(); - } -} diff --git a/tests/compile-fail/reallocate-bad-size.rs b/tests/compile-fail/reallocate-bad-size.rs deleted file mode 100644 index 953178742c46..000000000000 --- a/tests/compile-fail/reallocate-bad-size.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -// error-pattern: tried to deallocate or reallocate using incorrect alignment or size - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap(); - let _y = Heap.realloc(x, Layout::from_size_align_unchecked(2, 1), Layout::from_size_align_unchecked(1, 1)).unwrap(); - } -} diff --git a/tests/compile-fail/reallocate-change-alloc.rs b/tests/compile-fail/reallocate-change-alloc.rs deleted file mode 100644 index 290c966a2bc8..000000000000 --- a/tests/compile-fail/reallocate-change-alloc.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap(); - let _y = Heap.realloc(x, Layout::from_size_align_unchecked(1, 1), Layout::from_size_align_unchecked(1, 1)).unwrap(); - let _z = *x; //~ ERROR: dangling pointer was dereferenced - } -} diff --git a/tests/compile-fail/reallocate-dangling.rs b/tests/compile-fail/reallocate-dangling.rs deleted file mode 100644 index 6225879a5a2a..000000000000 --- a/tests/compile-fail/reallocate-dangling.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![feature(alloc, allocator_api)] - -extern crate alloc; - -use alloc::heap::Heap; -use alloc::allocator::*; - -// error-pattern: dangling pointer was dereferenced - -fn main() { - unsafe { - let x = Heap.alloc(Layout::from_size_align_unchecked(1, 1)).unwrap(); - Heap.dealloc(x, Layout::from_size_align_unchecked(1, 1)); - Heap.realloc(x, Layout::from_size_align_unchecked(1, 1), Layout::from_size_align_unchecked(1, 1)); - } -} diff --git a/tests/compile-fail/reference_to_packed.rs b/tests/compile-fail/reference_to_packed.rs deleted file mode 100644 index cc927f879504..000000000000 --- a/tests/compile-fail/reference_to_packed.rs +++ /dev/null @@ -1,19 +0,0 @@ -// This should fail even without validation -// compile-flags: -Zmir-emit-validate=0 - -#![allow(dead_code, unused_variables)] - -#[repr(packed)] -struct Foo { - x: i32, - y: i32, -} - -fn main() { - let foo = Foo { - x: 42, - y: 99, - }; - let p = &foo.x; - let i = *p; //~ ERROR tried to access memory with alignment 1, but alignment 4 is required -} diff --git a/tests/compile-fail/repeat.rs b/tests/compile-fail/repeat.rs deleted file mode 100644 index abe89e233e7c..000000000000 --- a/tests/compile-fail/repeat.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - let data: [u8; std::usize::MAX] = [42; std::usize::MAX]; - //~^ ERROR: rustc layout computation failed: SizeOverflow([u8; - assert_eq!(data.len(), 1024); -} diff --git a/tests/compile-fail/repeat2.rs b/tests/compile-fail/repeat2.rs deleted file mode 100644 index d489342b8599..000000000000 --- a/tests/compile-fail/repeat2.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - let data: [u8; 1024*1024*1024] = [42; 1024*1024*1024]; - //~^ ERROR: reached the configured maximum execution time - assert_eq!(data.len(), 1024*1024*1024); -} diff --git a/tests/compile-fail/stack_free.rs b/tests/compile-fail/stack_free.rs deleted file mode 100644 index 96006c884e58..000000000000 --- a/tests/compile-fail/stack_free.rs +++ /dev/null @@ -1,7 +0,0 @@ -// error-pattern: tried to deallocate Stack memory but gave Machine(Rust) as the kind - -fn main() { - let x = 42; - let bad_box = unsafe { std::mem::transmute::<&i32, Box>(&x) }; - drop(bad_box); -} diff --git a/tests/compile-fail/stack_limit.rs b/tests/compile-fail/stack_limit.rs deleted file mode 100644 index c6aaf80e6ac0..000000000000 --- a/tests/compile-fail/stack_limit.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![feature(custom_attribute, attr_literals)] -#![miri(stack_limit=16)] - -//error-pattern: reached the configured maximum number of stack frames - -fn bar() { - foo(); -} - -fn foo() { - cake(); -} - -fn cake() { - bar(); -} - -fn main() { - bar(); -} diff --git a/tests/compile-fail/static_memory_modification.rs b/tests/compile-fail/static_memory_modification.rs deleted file mode 100644 index 11961becb246..000000000000 --- a/tests/compile-fail/static_memory_modification.rs +++ /dev/null @@ -1,9 +0,0 @@ -static X: usize = 5; - -#[allow(mutable_transmutes)] -fn main() { - unsafe { - *std::mem::transmute::<&usize, &mut usize>(&X) = 6; //~ ERROR: tried to modify constant memory - assert_eq!(X, 6); - } -} diff --git a/tests/compile-fail/static_memory_modification2.rs b/tests/compile-fail/static_memory_modification2.rs deleted file mode 100644 index f030a9c281de..000000000000 --- a/tests/compile-fail/static_memory_modification2.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Validation detects that we are casting & to &mut and so it changes why we fail -// compile-flags: -Zmir-emit-validate=0 - -use std::mem::transmute; - -#[allow(mutable_transmutes)] -fn main() { - unsafe { - let s = "this is a test"; - transmute::<&[u8], &mut [u8]>(s.as_bytes())[4] = 42; //~ ERROR: tried to modify constant memory - } -} diff --git a/tests/compile-fail/static_memory_modification3.rs b/tests/compile-fail/static_memory_modification3.rs deleted file mode 100644 index 743fbe60efff..000000000000 --- a/tests/compile-fail/static_memory_modification3.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::mem::transmute; - -#[allow(mutable_transmutes)] -fn main() { - unsafe { - let bs = b"this is a test"; - transmute::<&[u8], &mut [u8]>(bs)[4] = 42; //~ ERROR: tried to modify constant memory - } -} diff --git a/tests/compile-fail/timeout.rs b/tests/compile-fail/timeout.rs deleted file mode 100644 index edd4c3186691..000000000000 --- a/tests/compile-fail/timeout.rs +++ /dev/null @@ -1,9 +0,0 @@ -//error-pattern: reached the configured maximum execution time -#![feature(custom_attribute, attr_literals)] -#![miri(step_limit=1000)] - -fn main() { - for i in 0..1000000 { - assert!(i < 1000); - } -} diff --git a/tests/compile-fail/transmute-pair-undef.rs b/tests/compile-fail/transmute-pair-undef.rs deleted file mode 100644 index acc6098af7ee..000000000000 --- a/tests/compile-fail/transmute-pair-undef.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![feature(core_intrinsics)] - -use std::mem; - -fn main() { - let x: Option> = unsafe { - let z = std::intrinsics::add_with_overflow(0usize, 0usize); - std::mem::transmute::<(usize, bool), Option>>(z) - }; - let y = &x; - // Now read this bytewise. There should be (ptr_size+1) def bytes followed by (ptr_size-1) undef bytes (the padding after the bool) in there. - let z : *const u8 = y as *const _ as *const _; - let first_undef = mem::size_of::() as isize + 1; - for i in 0..first_undef { - let byte = unsafe { *z.offset(i) }; - assert_eq!(byte, 0); - } - let v = unsafe { *z.offset(first_undef) }; - if v == 0 {} //~ ERROR attempted to read undefined bytes -} diff --git a/tests/compile-fail/transmute_fat.rs b/tests/compile-fail/transmute_fat.rs deleted file mode 100644 index 7d5d95a1dc6d..000000000000 --- a/tests/compile-fail/transmute_fat.rs +++ /dev/null @@ -1,15 +0,0 @@ -// This should fail even without validation -// compile-flags: -Zmir-emit-validate=0 -#![feature(i128_type)] - -fn main() { - #[cfg(target_pointer_width="64")] - let bad = unsafe { - std::mem::transmute::<&[u8], u128>(&[1u8]) - }; - #[cfg(target_pointer_width="32")] - let bad = unsafe { - std::mem::transmute::<&[u8], u64>(&[1u8]) - }; - bad + 1; //~ ERROR a raw memory access tried to access part of a pointer value as raw bytes -} diff --git a/tests/compile-fail/transmute_fat2.rs b/tests/compile-fail/transmute_fat2.rs deleted file mode 100644 index 028ed613eee7..000000000000 --- a/tests/compile-fail/transmute_fat2.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![feature(i128_type)] - -fn main() { - #[cfg(target_pointer_width="64")] - let bad = unsafe { - std::mem::transmute::(42) - }; - #[cfg(target_pointer_width="32")] - let bad = unsafe { - std::mem::transmute::(42) - }; - bad[0]; //~ ERROR index out of bounds: the len is 0 but the index is 0 -} diff --git a/tests/compile-fail/unaligned_ptr_cast.rs b/tests/compile-fail/unaligned_ptr_cast.rs deleted file mode 100644 index 8ad1b323250c..000000000000 --- a/tests/compile-fail/unaligned_ptr_cast.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - let x = &2u16; - let x = x as *const _ as *const u32; - // This must fail because alignment is violated - let _x = unsafe { *x }; //~ ERROR: tried to access memory with alignment 2, but alignment 4 is required -} diff --git a/tests/compile-fail/unaligned_ptr_cast2.rs b/tests/compile-fail/unaligned_ptr_cast2.rs deleted file mode 100644 index 15fb7dd31368..000000000000 --- a/tests/compile-fail/unaligned_ptr_cast2.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let x = &2u16; - let x = x as *const _ as *const *const u8; - // This must fail because alignment is violated. Test specifically for loading pointers, which have special code - // in miri's memory. - let _x = unsafe { *x }; //~ ERROR: tried to access memory with alignment 2, but alignment -} diff --git a/tests/compile-fail/unaligned_ptr_cast_zst.rs b/tests/compile-fail/unaligned_ptr_cast_zst.rs deleted file mode 100644 index fc603840684e..000000000000 --- a/tests/compile-fail/unaligned_ptr_cast_zst.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - let x = &2u16; - let x = x as *const _ as *const [u32; 0]; - // This must fail because alignment is violated. Test specifically for loading ZST. - let _x = unsafe { *x }; //~ ERROR: tried to access memory with alignment 2, but alignment 4 is required -} diff --git a/tests/compile-fail/validation_aliasing_mut1.rs b/tests/compile-fail/validation_aliasing_mut1.rs deleted file mode 100644 index 86aa57447fe6..000000000000 --- a/tests/compile-fail/validation_aliasing_mut1.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - pub fn safe(x: &mut i32, y: &mut i32) {} //~ ERROR: in conflict with lock WriteLock -} - -fn main() { - let x = &mut 0 as *mut _; - unsafe { safe::safe(&mut *x, &mut *x) }; -} diff --git a/tests/compile-fail/validation_aliasing_mut2.rs b/tests/compile-fail/validation_aliasing_mut2.rs deleted file mode 100644 index ed7497e5e546..000000000000 --- a/tests/compile-fail/validation_aliasing_mut2.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - pub fn safe(x: &i32, y: &mut i32) {} //~ ERROR: in conflict with lock ReadLock -} - -fn main() { - let x = &mut 0 as *mut _; - unsafe { safe::safe(&*x, &mut *x) }; -} diff --git a/tests/compile-fail/validation_aliasing_mut3.rs b/tests/compile-fail/validation_aliasing_mut3.rs deleted file mode 100644 index 69fbbc167ca0..000000000000 --- a/tests/compile-fail/validation_aliasing_mut3.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - pub fn safe(x: &mut i32, y: &i32) {} //~ ERROR: in conflict with lock WriteLock -} - -fn main() { - let x = &mut 0 as *mut _; - unsafe { safe::safe(&mut *x, &*x) }; -} diff --git a/tests/compile-fail/validation_aliasing_mut4.rs b/tests/compile-fail/validation_aliasing_mut4.rs deleted file mode 100644 index 3dac55aeaac9..000000000000 --- a/tests/compile-fail/validation_aliasing_mut4.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - use std::cell::Cell; - - // Make sure &mut UnsafeCell also has a lock to it - pub fn safe(x: &mut Cell, y: &i32) {} //~ ERROR: in conflict with lock WriteLock -} - -fn main() { - let x = &mut 0 as *mut _; - unsafe { safe::safe(&mut *(x as *mut _), &*x) }; -} diff --git a/tests/compile-fail/validation_buggy_as_mut_slice.rs b/tests/compile-fail/validation_buggy_as_mut_slice.rs deleted file mode 100644 index 98eca8d3607f..000000000000 --- a/tests/compile-fail/validation_buggy_as_mut_slice.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![allow(unused_variables)] - -// For some reason, the error location is different when using fullmir -// error-pattern: in conflict with lock WriteLock - -mod safe { - use std::slice::from_raw_parts_mut; - - pub fn as_mut_slice(self_: &Vec) -> &mut [T] { - unsafe { - from_raw_parts_mut(self_.as_ptr() as *mut T, self_.len()) - } - } -} - -fn main() { - let v = vec![0,1,2]; - let v1_ = safe::as_mut_slice(&v); - let v2_ = safe::as_mut_slice(&v); -} diff --git a/tests/compile-fail/validation_buggy_split_at_mut.rs b/tests/compile-fail/validation_buggy_split_at_mut.rs deleted file mode 100644 index 9e67b2a4ab18..000000000000 --- a/tests/compile-fail/validation_buggy_split_at_mut.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - use std::slice::from_raw_parts_mut; - - pub fn split_at_mut(self_: &mut [T], mid: usize) -> (&mut [T], &mut [T]) { - let len = self_.len(); - let ptr = self_.as_mut_ptr(); - - unsafe { - assert!(mid <= len); - - (from_raw_parts_mut(ptr, len - mid), // BUG: should be "mid" instead of "len - mid" - from_raw_parts_mut(ptr.offset(mid as isize), len - mid)) - } - } -} - -fn main() { - let mut array = [1,2,3,4]; - let _x = safe::split_at_mut(&mut array, 0); //~ ERROR: in conflict with lock WriteLock -} diff --git a/tests/compile-fail/validation_illegal_write.rs b/tests/compile-fail/validation_illegal_write.rs deleted file mode 100644 index 1432f4cc9f17..000000000000 --- a/tests/compile-fail/validation_illegal_write.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - pub(crate) fn safe(x: &u32) { - let x : &mut u32 = unsafe { &mut *(x as *const _ as *mut _) }; - *x = 42; //~ ERROR: in conflict with lock ReadLock - } -} - -fn main() { - let target = &mut 42; - let target_ref = ⌖ - // do a reborrow, but we keep the lock - safe::safe(&*target); -} diff --git a/tests/compile-fail/validation_lock_confusion.rs b/tests/compile-fail/validation_lock_confusion.rs deleted file mode 100644 index b352346114d7..000000000000 --- a/tests/compile-fail/validation_lock_confusion.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Make sure validation can handle many overlapping shared borrows for different parts of a data structure -#![allow(unused_variables)] -use std::cell::RefCell; - -fn evil(x: *mut i32) { - unsafe { *x = 0; } //~ ERROR: in conflict with lock WriteLock -} - -fn test(r: &mut RefCell) { - let x = &*r; // releasing write lock, first suspension recorded - let mut x_ref = x.borrow_mut(); - let x_inner : &mut i32 = &mut *x_ref; // new inner write lock, with same lifetime as outer lock - { - let x_inner_shr = &*x_inner; // releasing inner write lock, recording suspension - let y = &*r; // second suspension for the outer write lock - let x_inner_shr2 = &*x_inner; // 2nd suspension for inner write lock - } - // If the two locks are mixed up, here we should have a write lock, but we do not. - evil(x_inner as *mut _); -} - -fn main() { - test(&mut RefCell::new(0)); -} diff --git a/tests/compile-fail/validation_pointer_smuggling.rs b/tests/compile-fail/validation_pointer_smuggling.rs deleted file mode 100644 index 3320d2a89d35..000000000000 --- a/tests/compile-fail/validation_pointer_smuggling.rs +++ /dev/null @@ -1,20 +0,0 @@ -#![allow(unused_variables)] - -static mut PTR: *mut u8 = 0 as *mut _; - -fn fun1(x: &mut u8) { - unsafe { - PTR = x; - } -} - -fn fun2() { - // Now we use a pointer we are not allowed to use - let _x = unsafe { *PTR }; //~ ERROR: in conflict with lock WriteLock -} - -fn main() { - let mut val = 0; - fun1(&mut val); - fun2(); -} diff --git a/tests/compile-fail/validation_recover1.rs b/tests/compile-fail/validation_recover1.rs deleted file mode 100644 index 55c38a694c55..000000000000 --- a/tests/compile-fail/validation_recover1.rs +++ /dev/null @@ -1,16 +0,0 @@ -#![allow(unused_variables)] - -#[repr(u32)] -enum Bool { True } - -mod safe { - pub(crate) fn safe(x: &mut super::Bool) { - let x = x as *mut _ as *mut u32; - unsafe { *x = 44; } // out-of-bounds enum discriminant - } -} - -fn main() { - let mut x = Bool::True; - safe::safe(&mut x); //~ ERROR: invalid enum discriminant -} diff --git a/tests/compile-fail/validation_recover2.rs b/tests/compile-fail/validation_recover2.rs deleted file mode 100644 index 756be9fde6fc..000000000000 --- a/tests/compile-fail/validation_recover2.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - // This makes a ref that was passed to us via &mut alias with things it should not alias with - pub(crate) fn safe(x: &mut &u32, target: &mut u32) { - unsafe { *x = &mut *(target as *mut _); } - } -} - -fn main() { - let target = &mut 42; - let mut target_alias = &42; // initial dummy value - safe::safe(&mut target_alias, target); //~ ERROR: in conflict with lock ReadLock -} diff --git a/tests/compile-fail/validation_recover3.rs b/tests/compile-fail/validation_recover3.rs deleted file mode 100644 index afe6fe7c0bb9..000000000000 --- a/tests/compile-fail/validation_recover3.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![allow(unused_variables)] - -mod safe { - pub(crate) fn safe(x: *mut u32) { - unsafe { *x = 42; } //~ ERROR: in conflict with lock WriteLock - } -} - -fn main() { - let target = &mut 42u32; - let target2 = target as *mut _; - drop(&mut *target); // reborrow - // Now make sure we still got the lock - safe::safe(target2); -} diff --git a/tests/compile-fail/validation_undef.rs b/tests/compile-fail/validation_undef.rs deleted file mode 100644 index b889b1ea5317..000000000000 --- a/tests/compile-fail/validation_undef.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![allow(unused_variables)] -// error-pattern: attempted to read undefined bytes - -mod safe { - use std::mem; - - pub(crate) fn make_float() -> f32 { - unsafe { mem::uninitialized() } - } -} - -fn main() { - let _x = safe::make_float(); -} diff --git a/tests/compile-fail/wild_pointer_deref.rs b/tests/compile-fail/wild_pointer_deref.rs deleted file mode 100644 index 57da8dfc01b2..000000000000 --- a/tests/compile-fail/wild_pointer_deref.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - let p = 44 as *const i32; - let x = unsafe { *p }; //~ ERROR: a memory access tried to interpret some bytes as a pointer - panic!("this should never print: {}", x); -} diff --git a/tests/compile-fail/zst.rs b/tests/compile-fail/zst.rs deleted file mode 100644 index 343982404794..000000000000 --- a/tests/compile-fail/zst.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let x = &() as *const () as *const i32; - let _ = unsafe { *x }; //~ ERROR: tried to access memory with alignment 1, but alignment 4 is required -} diff --git a/tests/compiletest.rs b/tests/compiletest.rs deleted file mode 100644 index b1ea3fc8b0d4..000000000000 --- a/tests/compiletest.rs +++ /dev/null @@ -1,213 +0,0 @@ -#![feature(slice_concat_ext)] - -extern crate compiletest_rs as compiletest; - -use std::slice::SliceConcatExt; -use std::path::{PathBuf, Path}; -use std::io::Write; -use std::env; - -macro_rules! eprintln { - ($($arg:tt)*) => { - let stderr = std::io::stderr(); - writeln!(stderr.lock(), $($arg)*).unwrap(); - } -} - -fn miri_path() -> PathBuf { - if rustc_test_suite().is_some() { - PathBuf::from(option_env!("MIRI_PATH").unwrap()) - } else { - PathBuf::from(concat!("target/", env!("PROFILE"), "/miri")) - } -} - -fn rustc_test_suite() -> Option { - option_env!("RUSTC_TEST_SUITE").map(PathBuf::from) -} - -fn rustc_lib_path() -> PathBuf { - option_env!("RUSTC_LIB_PATH").unwrap().into() -} - -fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: bool) { - eprintln!( - "## Running compile-fail tests in {} against miri for target {}", - path, - target - ); - let mut config = compiletest::Config::default().tempdir(); - config.mode = "compile-fail".parse().expect("Invalid mode"); - config.rustc_path = miri_path(); - let mut flags = Vec::new(); - if rustc_test_suite().is_some() { - config.run_lib_path = rustc_lib_path(); - config.compile_lib_path = rustc_lib_path(); - } - // if we are building as part of the rustc test suite, we already have fullmir for everything - if fullmir && rustc_test_suite().is_none() { - if host != target { - // skip fullmir on nonhost - return; - } - let sysroot = std::env::home_dir().unwrap() - .join(".xargo") - .join("HOST"); - config.target_rustcflags = Some(format!("--sysroot {}", sysroot.to_str().unwrap())); - config.src_base = PathBuf::from(path.to_string()); - } else { - config.target_rustcflags = Some(format!("--sysroot {}", sysroot.to_str().unwrap())); - config.src_base = PathBuf::from(path.to_string()); - } - flags.push("-Zmir-emit-validate=1".to_owned()); - config.target_rustcflags = Some(flags.join(" ")); - config.target = target.to_owned(); - compiletest::run_tests(&config); -} - -fn run_pass(path: &str) { - eprintln!("## Running run-pass tests in {} against rustc", path); - let mut config = compiletest::Config::default().tempdir(); - config.mode = "run-pass".parse().expect("Invalid mode"); - config.src_base = PathBuf::from(path); - if let Some(rustc_path) = rustc_test_suite() { - config.rustc_path = rustc_path; - config.run_lib_path = rustc_lib_path(); - config.compile_lib_path = rustc_lib_path(); - config.target_rustcflags = Some(format!("-Dwarnings --sysroot {}", get_sysroot().display())); - } else { - config.target_rustcflags = Some("-Dwarnings".to_owned()); - } - config.host_rustcflags = Some("-Dwarnings".to_string()); - compiletest::run_tests(&config); -} - -fn miri_pass(path: &str, target: &str, host: &str, fullmir: bool, opt: bool) { - let opt_str = if opt { " with optimizations" } else { "" }; - eprintln!( - "## Running run-pass tests in {} against miri for target {}{}", - path, - target, - opt_str - ); - let mut config = compiletest::Config::default().tempdir(); - config.mode = "ui".parse().expect("Invalid mode"); - config.src_base = PathBuf::from(path); - config.target = target.to_owned(); - config.host = host.to_owned(); - config.rustc_path = miri_path(); - if rustc_test_suite().is_some() { - config.run_lib_path = rustc_lib_path(); - config.compile_lib_path = rustc_lib_path(); - } - let mut flags = Vec::new(); - // Control miri logging. This is okay despite concurrent test execution as all tests - // will set this env var to the same value. - env::set_var("MIRI_LOG", "warn"); - // if we are building as part of the rustc test suite, we already have fullmir for everything - if fullmir && rustc_test_suite().is_none() { - if host != target { - // skip fullmir on nonhost - return; - } - let sysroot = std::env::home_dir().unwrap() - .join(".xargo") - .join("HOST"); - - flags.push(format!("--sysroot {}", sysroot.to_str().unwrap())); - } - if opt { - flags.push("-Zmir-opt-level=3".to_owned()); - } else { - flags.push("-Zmir-opt-level=0".to_owned()); - // For now, only validate without optimizations. Inlining breaks validation. - flags.push("-Zmir-emit-validate=1".to_owned()); - } - config.target_rustcflags = Some(flags.join(" ")); - compiletest::run_tests(&config); -} - -fn is_target_dir>(path: P) -> bool { - let mut path = path.into(); - path.push("lib"); - path.metadata().map(|m| m.is_dir()).unwrap_or(false) -} - -fn for_all_targets(sysroot: &Path, mut f: F) { - let target_dir = sysroot.join("lib").join("rustlib"); - for entry in std::fs::read_dir(target_dir).expect("invalid sysroot") { - let entry = entry.unwrap(); - if !is_target_dir(entry.path()) { - continue; - } - let target = entry.file_name().into_string().unwrap(); - f(target); - } -} - -fn get_sysroot() -> PathBuf { - let sysroot = std::env::var("MIRI_SYSROOT").unwrap_or_else(|_| { - let sysroot = std::process::Command::new("rustc") - .arg("--print") - .arg("sysroot") - .output() - .expect("rustc not found") - .stdout; - String::from_utf8(sysroot).expect("sysroot is not utf8") - }); - PathBuf::from(sysroot.trim()) -} - -fn get_host() -> String { - let rustc = rustc_test_suite().unwrap_or(PathBuf::from("rustc")); - println!("using rustc at {}", rustc.display()); - let host = std::process::Command::new(rustc) - .arg("-vV") - .output() - .expect("rustc not found for -vV") - .stdout; - let host = std::str::from_utf8(&host).expect("sysroot is not utf8"); - let host = host.split("\nhost: ").nth(1).expect( - "no host: part in rustc -vV", - ); - let host = host.split('\n').next().expect("no \n after host"); - String::from(host) -} - -fn run_pass_miri(opt: bool) { - let sysroot = get_sysroot(); - let host = get_host(); - - for_all_targets(&sysroot, |target| { - miri_pass("tests/run-pass", &target, &host, false, opt); - }); - miri_pass("tests/run-pass-fullmir", &host, &host, true, opt); -} - -#[test] -fn run_pass_miri_noopt() { - run_pass_miri(false); -} - -#[test] -#[ignore] // FIXME: Disabled for now, as the optimizer is pretty broken and crashes... -fn run_pass_miri_opt() { - run_pass_miri(true); -} - -#[test] -fn run_pass_rustc() { - run_pass("tests/run-pass"); - run_pass("tests/run-pass-fullmir"); -} - -#[test] -fn compile_fail_miri() { - let sysroot = get_sysroot(); - let host = get_host(); - - for_all_targets(&sysroot, |target| { - compile_fail(&sysroot, "tests/compile-fail", &target, &host, false); - }); - compile_fail(&sysroot, "tests/compile-fail-fullmir", &host, &host, true); -} diff --git a/tests/run-pass-fullmir/catch.rs b/tests/run-pass-fullmir/catch.rs deleted file mode 100644 index 490f17d4cf4f..000000000000 --- a/tests/run-pass-fullmir/catch.rs +++ /dev/null @@ -1,8 +0,0 @@ -//ignore-msvc -use std::panic::{catch_unwind, AssertUnwindSafe}; - -fn main() { - let mut i = 3; - let _ = catch_unwind(AssertUnwindSafe(|| {i -= 2;} )); - println!("{}", i); -} diff --git a/tests/run-pass-fullmir/catch.stdout b/tests/run-pass-fullmir/catch.stdout deleted file mode 100644 index d00491fd7e5b..000000000000 --- a/tests/run-pass-fullmir/catch.stdout +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/tests/run-pass-fullmir/foreign-fn-linkname.rs b/tests/run-pass-fullmir/foreign-fn-linkname.rs deleted file mode 100644 index 20cb713590c9..000000000000 --- a/tests/run-pass-fullmir/foreign-fn-linkname.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc -#![feature(libc)] - -extern crate libc; -use std::ffi::CString; - -mod mlibc { - use libc::{c_char, size_t}; - - extern { - #[link_name = "strlen"] - pub fn my_strlen(str: *const c_char) -> size_t; - } -} - -fn strlen(str: String) -> usize { - // C string is terminated with a zero - let s = CString::new(str).unwrap(); - unsafe { - mlibc::my_strlen(s.as_ptr()) as usize - } -} - -pub fn main() { - let len = strlen("Rust".to_string()); - assert_eq!(len, 4); -} diff --git a/tests/run-pass-fullmir/format.rs b/tests/run-pass-fullmir/format.rs deleted file mode 100644 index a14d7054e729..000000000000 --- a/tests/run-pass-fullmir/format.rs +++ /dev/null @@ -1,4 +0,0 @@ -//ignore-msvc -fn main() { - println!("Hello {}", 13); -} diff --git a/tests/run-pass-fullmir/format.stdout b/tests/run-pass-fullmir/format.stdout deleted file mode 100644 index e193b8ae89f8..000000000000 --- a/tests/run-pass-fullmir/format.stdout +++ /dev/null @@ -1 +0,0 @@ -Hello 13 diff --git a/tests/run-pass-fullmir/from_utf8.rs b/tests/run-pass-fullmir/from_utf8.rs deleted file mode 100644 index c5d4abcfdaef..000000000000 --- a/tests/run-pass-fullmir/from_utf8.rs +++ /dev/null @@ -1,4 +0,0 @@ -//ignore-msvc -fn main() { - let _ = ::std::str::from_utf8(b"a"); -} diff --git a/tests/run-pass-fullmir/hashmap.rs b/tests/run-pass-fullmir/hashmap.rs deleted file mode 100644 index 99f05e25985e..000000000000 --- a/tests/run-pass-fullmir/hashmap.rs +++ /dev/null @@ -1,26 +0,0 @@ -//ignore-msvc -use std::collections::{self, HashMap}; -use std::hash::BuildHasherDefault; - -fn main() { - let mut map : HashMap> = Default::default(); - map.insert(0, 0); - assert_eq!(map.values().fold(0, |x, y| x+y), 0); - - let table_base = map.get(&0).unwrap() as *const _; - - let num = 22; // large enough to trigger a resize - for i in 1..num { - map.insert(i, i); - } - assert!(table_base != map.get(&0).unwrap() as *const _); // make sure relocation happened - assert_eq!(map.values().fold(0, |x, y| x+y), num*(num-1)/2); // check the right things are in the table now - - // Inserting again replaces the existing entries - for i in 0..num { - map.insert(i, num-1-i); - } - assert_eq!(map.values().fold(0, |x, y| x+y), num*(num-1)/2); - - // TODO: Test Entry API -} diff --git a/tests/run-pass-fullmir/heap.rs b/tests/run-pass-fullmir/heap.rs deleted file mode 100644 index 917d51d0e4b6..000000000000 --- a/tests/run-pass-fullmir/heap.rs +++ /dev/null @@ -1,35 +0,0 @@ -//ignore-msvc -#![feature(box_syntax)] - -fn make_box() -> Box<(i16, i16)> { - Box::new((1, 2)) -} - -fn make_box_syntax() -> Box<(i16, i16)> { - box (1, 2) -} - -fn allocate_reallocate() { - let mut s = String::new(); - - // 6 byte heap alloc (__rust_allocate) - s.push_str("foobar"); - assert_eq!(s.len(), 6); - assert_eq!(s.capacity(), 6); - - // heap size doubled to 12 (__rust_reallocate) - s.push_str("baz"); - assert_eq!(s.len(), 9); - assert_eq!(s.capacity(), 12); - - // heap size reduced to 9 (__rust_reallocate) - s.shrink_to_fit(); - assert_eq!(s.len(), 9); - assert_eq!(s.capacity(), 9); -} - -fn main() { - assert_eq!(*make_box(), (1, 2)); - assert_eq!(*make_box_syntax(), (1, 2)); - allocate_reallocate(); -} diff --git a/tests/run-pass-fullmir/hello.rs b/tests/run-pass-fullmir/hello.rs deleted file mode 100644 index 986efcaf9005..000000000000 --- a/tests/run-pass-fullmir/hello.rs +++ /dev/null @@ -1,4 +0,0 @@ -//ignore-msvc -fn main() { - println!("Hello, world!"); -} diff --git a/tests/run-pass-fullmir/hello.stdout b/tests/run-pass-fullmir/hello.stdout deleted file mode 100644 index af5626b4a114..000000000000 --- a/tests/run-pass-fullmir/hello.stdout +++ /dev/null @@ -1 +0,0 @@ -Hello, world! diff --git a/tests/run-pass-fullmir/integer-ops.rs b/tests/run-pass-fullmir/integer-ops.rs deleted file mode 100644 index 97c694fd5674..000000000000 --- a/tests/run-pass-fullmir/integer-ops.rs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// FIXME: remove -Zmir-opt-level once https://github.com/rust-lang/rust/issues/43359 is fixed -// compile-flags: -Zmir-opt-level=0 - -//ignore-msvc -use std::i32; - -pub fn main() { - // This tests that do (not) do sign extension properly when loading integers - assert_eq!(u32::max_value() as i64, 4294967295); - assert_eq!(i32::min_value() as i64, -2147483648); - - assert_eq!(i8::min_value(), -128); - - assert_eq!(i8::max_value(), 127); - - assert_eq!(i32::from_str_radix("A", 16), Ok(10)); - - let n = -0b1000_0000i8; - assert_eq!(n.count_ones(), 1); - - let n = -0b1000_0000i8; - assert_eq!(n.count_zeros(), 7); - - let n = -1i16; - assert_eq!(n.leading_zeros(), 0); - - let n = -4i8; - assert_eq!(n.trailing_zeros(), 2); - - let n = 0x0123456789ABCDEFi64; - let m = -0x76543210FEDCBA99i64; - assert_eq!(n.rotate_left(32), m); - - let n = 0x0123456789ABCDEFi64; - let m = -0xFEDCBA987654322i64; - assert_eq!(n.rotate_right(4), m); - - let n = 0x0123456789ABCDEFi64; - let m = -0x1032547698BADCFFi64; - assert_eq!(n.swap_bytes(), m); - - let n = 0x0123456789ABCDEFi64; - if cfg!(target_endian = "big") { - assert_eq!(i64::from_be(n), n) - } else { - assert_eq!(i64::from_be(n), n.swap_bytes()) - } - - let n = 0x0123456789ABCDEFi64; - if cfg!(target_endian = "little") { - assert_eq!(i64::from_le(n), n) - } else { - assert_eq!(i64::from_le(n), n.swap_bytes()) - } - - let n = 0x0123456789ABCDEFi64; - if cfg!(target_endian = "big") { - assert_eq!(n.to_be(), n) - } else { - assert_eq!(n.to_be(), n.swap_bytes()) - } - - let n = 0x0123456789ABCDEFi64; - if cfg!(target_endian = "little") { - assert_eq!(n.to_le(), n) - } else { - assert_eq!(n.to_le(), n.swap_bytes()) - } - - assert_eq!(7i16.checked_add(32760), Some(32767)); - assert_eq!(8i16.checked_add(32760), None); - - assert_eq!((-127i8).checked_sub(1), Some(-128)); - assert_eq!((-128i8).checked_sub(1), None); - - assert_eq!(6i8.checked_mul(21), Some(126)); - assert_eq!(6i8.checked_mul(22), None); - - assert_eq!((-127i8).checked_div(-1), Some(127)); - assert_eq!((-128i8).checked_div(-1), None); - assert_eq!((1i8).checked_div(0), None); - - assert_eq!(5i32.checked_rem(2), Some(1)); - assert_eq!(5i32.checked_rem(0), None); - assert_eq!(i32::MIN.checked_rem(-1), None); - - assert_eq!(5i32.checked_neg(), Some(-5)); - assert_eq!(i32::MIN.checked_neg(), None); - - assert_eq!(0x10i32.checked_shl(4), Some(0x100)); - assert_eq!(0x10i32.checked_shl(33), None); - - assert_eq!(0x10i32.checked_shr(4), Some(0x1)); - assert_eq!(0x10i32.checked_shr(33), None); - - assert_eq!((-5i32).checked_abs(), Some(5)); - assert_eq!(i32::MIN.checked_abs(), None); - - assert_eq!(100i8.saturating_add(1), 101); - assert_eq!(100i8.saturating_add(127), 127); - - assert_eq!(100i8.saturating_sub(127), -27); - assert_eq!((-100i8).saturating_sub(127), -128); - - assert_eq!(100i32.saturating_mul(127), 12700); - assert_eq!((1i32 << 23).saturating_mul(1 << 23), i32::MAX); - assert_eq!((-1i32 << 23).saturating_mul(1 << 23), i32::MIN); - - assert_eq!(100i8.wrapping_add(27), 127); - assert_eq!(100i8.wrapping_add(127), -29); - - assert_eq!(0i8.wrapping_sub(127), -127); - assert_eq!((-2i8).wrapping_sub(127), 127); - - assert_eq!(10i8.wrapping_mul(12), 120); - assert_eq!(11i8.wrapping_mul(12), -124); - - assert_eq!(100u8.wrapping_div(10), 10); - assert_eq!((-128i8).wrapping_div(-1), -128); - - assert_eq!(100i8.wrapping_rem(10), 0); - assert_eq!((-128i8).wrapping_rem(-1), 0); - - assert_eq!(100i8.wrapping_neg(), -100); - assert_eq!((-128i8).wrapping_neg(), -128); - - assert_eq!((-1i8).wrapping_shl(7), -128); - assert_eq!((-1i8).wrapping_shl(8), -1); - - assert_eq!((-128i8).wrapping_shr(7), -1); - assert_eq!((-128i8).wrapping_shr(8), -128); - - assert_eq!(100i8.wrapping_abs(), 100); - assert_eq!((-100i8).wrapping_abs(), 100); - assert_eq!((-128i8).wrapping_abs(), -128); - assert_eq!((-128i8).wrapping_abs() as u8, 128); - - assert_eq!(5i32.overflowing_add(2), (7, false)); - assert_eq!(i32::MAX.overflowing_add(1), (i32::MIN, true)); - - assert_eq!(5i32.overflowing_sub(2), (3, false)); - assert_eq!(i32::MIN.overflowing_sub(1), (i32::MAX, true)); - - assert_eq!(5i32.overflowing_mul(2), (10, false)); - assert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true)); - - assert_eq!(5i32.overflowing_div(2), (2, false)); - assert_eq!(i32::MIN.overflowing_div(-1), (i32::MIN, true)); - - assert_eq!(5i32.overflowing_rem(2), (1, false)); - assert_eq!(i32::MIN.overflowing_rem(-1), (0, true)); - - assert_eq!(2i32.overflowing_neg(), (-2, false)); - assert_eq!(i32::MIN.overflowing_neg(), (i32::MIN, true)); - - assert_eq!(0x10i32.overflowing_shl(4), (0x100, false)); - assert_eq!(0x10i32.overflowing_shl(36), (0x100, true)); - - assert_eq!(0x10i32.overflowing_shr(4), (0x1, false)); - assert_eq!(0x10i32.overflowing_shr(36), (0x1, true)); - - assert_eq!(10i8.overflowing_abs(), (10,false)); - assert_eq!((-10i8).overflowing_abs(), (10,false)); - assert_eq!((-128i8).overflowing_abs(), (-128,true)); -} diff --git a/tests/run-pass-fullmir/issue-15080.rs b/tests/run-pass-fullmir/issue-15080.rs deleted file mode 100644 index 4a84f2bc5d62..000000000000 --- a/tests/run-pass-fullmir/issue-15080.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc - -#![feature(slice_patterns)] - -fn main() { - let mut x: &[_] = &[1, 2, 3, 4]; - - let mut result = vec!(); - loop { - x = match *x { - [1, n, 3, ref rest..] => { - result.push(n); - rest - } - [n, ref rest..] => { - result.push(n); - rest - } - [] => - break - } - } - assert_eq!(result, [2, 4]); -} diff --git a/tests/run-pass-fullmir/issue-3794.rs b/tests/run-pass-fullmir/issue-3794.rs deleted file mode 100644 index 8d55af58eeca..000000000000 --- a/tests/run-pass-fullmir/issue-3794.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc -#![feature(box_syntax)] - -trait T { - fn print(&self); -} - -#[derive(Debug)] -struct S { - s: isize, -} - -impl T for S { - fn print(&self) { - println!("{:?}", self); - } -} - -fn print_t(t: &T) { - t.print(); -} - -fn print_s(s: &S) { - s.print(); -} - -pub fn main() { - let s: Box = box S { s: 5 }; - print_s(&*s); - let t: Box = s as Box; - print_t(&*t); -} diff --git a/tests/run-pass-fullmir/issue-3794.stdout b/tests/run-pass-fullmir/issue-3794.stdout deleted file mode 100644 index e4afe6fa55f1..000000000000 --- a/tests/run-pass-fullmir/issue-3794.stdout +++ /dev/null @@ -1,2 +0,0 @@ -S { s: 5 } -S { s: 5 } diff --git a/tests/run-pass-fullmir/loop-break-value.rs b/tests/run-pass-fullmir/loop-break-value.rs deleted file mode 100644 index 8a0ea113c5d6..000000000000 --- a/tests/run-pass-fullmir/loop-break-value.rs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc - -#![feature(never_type)] -#![allow(unreachable_code)] - -#[allow(unused)] -fn never_returns() { - loop { - break loop {}; - } -} - -pub fn main() { - let value = 'outer: loop { - if 1 == 1 { - break 13; - } else { - let _never: ! = loop { - break loop { - break 'outer panic!(); - } - }; - } - }; - assert_eq!(value, 13); - - let x = [1, 3u32, 5]; - let y = [17]; - let z = []; - let coerced: &[_] = loop { - match 2 { - 1 => break &x, - 2 => break &y, - 3 => break &z, - _ => (), - } - }; - assert_eq!(coerced, &[17u32]); - - let trait_unified = loop { - break if true { - break Default::default() - } else { - break [13, 14] - }; - }; - assert_eq!(trait_unified, [0, 0]); - - let trait_unified_2 = loop { - if false { - break [String::from("Hello")] - } else { - break Default::default() - }; - }; - assert_eq!(trait_unified_2, [""]); - - let trait_unified_3 = loop { - break if false { - break [String::from("Hello")] - } else { - ["Yes".into()] - }; - }; - assert_eq!(trait_unified_3, ["Yes"]); - - let regular_break = loop { - if true { - break; - } else { - break break Default::default(); - } - }; - assert_eq!(regular_break, ()); - - let regular_break_2 = loop { - if true { - break Default::default(); - } else { - break; - } - }; - assert_eq!(regular_break_2, ()); - - let regular_break_3 = loop { - break if true { - Default::default() - } else { - break; - } - }; - assert_eq!(regular_break_3, ()); - - let regular_break_4 = loop { - break (); - break; - }; - assert_eq!(regular_break_4, ()); - - let regular_break_5 = loop { - break; - break (); - }; - assert_eq!(regular_break_5, ()); - - let nested_break_value = 'outer2: loop { - let _a: u32 = 'inner: loop { - if true { - break 'outer2 "hello"; - } else { - break 'inner 17; - } - }; - panic!(); - }; - assert_eq!(nested_break_value, "hello"); - - let break_from_while_cond = loop { - 'inner_loop: while break 'inner_loop { - panic!(); - } - break 123; - }; - assert_eq!(break_from_while_cond, 123); - - let break_from_while_to_outer = 'outer_loop: loop { - while break 'outer_loop 567 { - panic!("from_inner"); - } - panic!("from outer"); - }; - assert_eq!(break_from_while_to_outer, 567); -} diff --git a/tests/run-pass-fullmir/move-arg-2-unique.rs b/tests/run-pass-fullmir/move-arg-2-unique.rs deleted file mode 100644 index f3c656623765..000000000000 --- a/tests/run-pass-fullmir/move-arg-2-unique.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc - -#![allow(unused_features, unused_variables)] -#![feature(box_syntax)] - -fn test(foo: Box> ) { assert_eq!((*foo)[0], 10); } - -pub fn main() { - let x = box vec![10]; - // Test forgetting a local by move-in - test(x); -} diff --git a/tests/run-pass-fullmir/regions-mock-trans.rs b/tests/run-pass-fullmir/regions-mock-trans.rs deleted file mode 100644 index cef62e47a56c..000000000000 --- a/tests/run-pass-fullmir/regions-mock-trans.rs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// FIXME: We handle uninitialzied storage here, which currently makes validation fail. -// compile-flags: -Zmir-emit-validate=0 - -//ignore-msvc - -#![feature(libc)] - -#![allow(dead_code)] - -extern crate libc; -use std::mem; - -struct Arena(()); - -struct Bcx<'a> { - fcx: &'a Fcx<'a> -} - -struct Fcx<'a> { - arena: &'a Arena, - ccx: &'a Ccx -} - -struct Ccx { - x: isize -} - -fn alloc<'a>(_bcx : &'a Arena) -> &'a Bcx<'a> { - unsafe { - mem::transmute(libc::malloc(mem::size_of::>() - as libc::size_t)) - } -} - -fn h<'a>(bcx : &'a Bcx<'a>) -> &'a Bcx<'a> { - return alloc(bcx.fcx.arena); -} - -fn g(fcx : &Fcx) { - let bcx = Bcx { fcx: fcx }; - let bcx2 = h(&bcx); - unsafe { - libc::free(mem::transmute(bcx2)); - } -} - -fn f(ccx : &Ccx) { - let a = Arena(()); - let fcx = Fcx { arena: &a, ccx: ccx }; - return g(&fcx); -} - -pub fn main() { - let ccx = Ccx { x: 0 }; - f(&ccx); -} diff --git a/tests/run-pass-fullmir/u128.rs b/tests/run-pass-fullmir/u128.rs deleted file mode 100644 index 5b2efdd20517..000000000000 --- a/tests/run-pass-fullmir/u128.rs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc - -#![feature(i128_type)] - -fn b(t: T) -> T { t } - -fn main() { - let x: u128 = 0xFFFF_FFFF_FFFF_FFFF__FFFF_FFFF_FFFF_FFFF; - assert_eq!(0, !x); - assert_eq!(0, !x); - let y: u128 = 0xFFFF_FFFF_FFFF_FFFF__FFFF_FFFF_FFFF_FFFE; - assert_eq!(!1, y); - assert_eq!(x, y | 1); - assert_eq!(0xFAFF_0000_FF8F_0000__FFFF_0000_FFFF_FFFE, - y & - 0xFAFF_0000_FF8F_0000__FFFF_0000_FFFF_FFFF); - let z: u128 = 0xABCD_EF; - assert_eq!(z * z, 0x734C_C2F2_A521); - assert_eq!(z * z * z * z, 0x33EE_0E2A_54E2_59DA_A0E7_8E41); - assert_eq!(z + z + z + z, 0x2AF3_7BC); - let k: u128 = 0x1234_5678_9ABC_DEFF_EDCB_A987_6543_210; - assert_eq!(k + k, 0x2468_ACF1_3579_BDFF_DB97_530E_CA86_420); - assert_eq!(0, k - k); - assert_eq!(0x1234_5678_9ABC_DEFF_EDCB_A987_5A86_421, k - z); - assert_eq!(0x1000_0000_0000_0000_0000_0000_0000_000, - k - 0x234_5678_9ABC_DEFF_EDCB_A987_6543_210); - assert_eq!(0x6EF5_DE4C_D3BC_2AAA_3BB4_CC5D_D6EE_8, k / 42); - assert_eq!(0, k % 42); - assert_eq!(15, z % 42); - assert_eq!(0x169D_A8020_CEC18, k % 0x3ACB_FE49_FF24_AC); - assert_eq!(0x91A2_B3C4_D5E6_F7, k >> 65); - assert_eq!(0xFDB9_7530_ECA8_6420_0000_0000_0000_0000, k << 65); - assert!(k > z); - assert!(y > k); - assert!(y < x); - assert_eq!(x as u64, !0); - assert_eq!(z as u64, 0xABCD_EF); - assert_eq!(k as u64, 0xFEDC_BA98_7654_3210); - assert_eq!(k as i128, 0x1234_5678_9ABC_DEFF_EDCB_A987_6543_210); - assert_eq!((z as f64) as u128, z); - assert_eq!((z as f32) as u128, z); - assert_eq!((z as f64 * 16.0) as u128, z * 16); - assert_eq!((z as f32 * 16.0) as u128, z * 16); - let l :u128 = 432 << 100; - assert_eq!((l as f32) as u128, l); - assert_eq!((l as f64) as u128, l); - // formatting - let j: u128 = 1 << 67; - assert_eq!("147573952589676412928", format!("{}", j)); - assert_eq!("80000000000000000", format!("{:x}", j)); - assert_eq!("20000000000000000000000", format!("{:o}", j)); - assert_eq!("10000000000000000000000000000000000000000000000000000000000000000000", - format!("{:b}", j)); - assert_eq!("340282366920938463463374607431768211455", - format!("{}", u128::max_value())); - assert_eq!("147573952589676412928", format!("{:?}", j)); - // common traits - assert_eq!(x, b(x.clone())); - // overflow checks - assert_eq!((z).checked_mul(z), Some(0x734C_C2F2_A521)); - assert_eq!((k).checked_mul(k), None); - let l: u128 = b(u128::max_value() - 10); - let o: u128 = b(17); - assert_eq!(l.checked_add(b(11)), None); - assert_eq!(l.checked_sub(l), Some(0)); - assert_eq!(o.checked_sub(b(18)), None); - assert_eq!(b(1u128).checked_shl(b(127)), Some(1 << 127)); - assert_eq!(o.checked_shl(b(128)), None); -} diff --git a/tests/run-pass-fullmir/unsized-tuple-impls.rs b/tests/run-pass-fullmir/unsized-tuple-impls.rs deleted file mode 100644 index 828e5c26927e..000000000000 --- a/tests/run-pass-fullmir/unsized-tuple-impls.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc - -#![feature(unsized_tuple_coercion)] -use std::mem; - -fn main() { - let x : &(i32, i32, [i32]) = &(0, 1, [2, 3]); - let y : &(i32, i32, [i32]) = &(0, 1, [2, 3, 4]); - let mut a = [y, x]; - a.sort(); - assert_eq!(a, [x, y]); - - assert_eq!(&format!("{:?}", a), "[(0, 1, [2, 3]), (0, 1, [2, 3, 4])]"); - assert_eq!(mem::size_of_val(x), 16); -} diff --git a/tests/run-pass-fullmir/vecs.rs b/tests/run-pass-fullmir/vecs.rs deleted file mode 100644 index 9a8912a6b988..000000000000 --- a/tests/run-pass-fullmir/vecs.rs +++ /dev/null @@ -1,52 +0,0 @@ -//ignore-msvc - -fn make_vec() -> Vec { - let mut v = Vec::with_capacity(4); - v.push(1); - v.push(2); - v -} - -fn make_vec_macro() -> Vec { - vec![1, 2] -} - -fn make_vec_macro_repeat() -> Vec { - vec![42; 5] -} - -fn make_vec_macro_repeat_zeroed() -> Vec { - vec![0; 7] -} - -fn vec_into_iter() -> u8 { - vec![1, 2, 3, 4] - .into_iter() - .map(|x| x * x) - .fold(0, |x, y| x + y) -} - -fn vec_into_iter_zst() -> usize { - vec![[0u64; 0], [0u64; 0]] - .into_iter() - .map(|x| x.len()) - .sum() -} - -fn vec_reallocate() -> Vec { - let mut v = vec![1, 2]; - v.push(3); - v.push(4); - v.push(5); - v -} - -fn main() { - assert_eq!(vec_reallocate().len(), 5); - assert_eq!(vec_into_iter(), 30); - assert_eq!(vec_into_iter_zst(), 0); - assert_eq!(make_vec().capacity(), 4); - assert_eq!(make_vec_macro(), [1, 2]); - assert_eq!(make_vec_macro_repeat(), [42; 5]); - assert_eq!(make_vec_macro_repeat_zeroed(), [0; 7]); -} diff --git a/tests/run-pass/arrays.rs b/tests/run-pass/arrays.rs deleted file mode 100644 index 469dde3091eb..000000000000 --- a/tests/run-pass/arrays.rs +++ /dev/null @@ -1,45 +0,0 @@ -fn empty_array() -> [u16; 0] { - [] -} - -fn mini_array() -> [u16; 1] { - [42] -} - -fn big_array() -> [u16; 5] { - [5, 4, 3, 2, 1] -} - -fn array_array() -> [[u8; 2]; 3] { - [[5, 4], [3, 2], [1, 0]] -} - -fn index_unsafe() -> i32 { - let a = [0, 10, 20, 30]; - unsafe { *a.get_unchecked(2) } -} - -fn index() -> i32 { - let a = [0, 10, 20, 30]; - a[2] -} - -fn array_repeat() -> [u8; 8] { - [42; 8] -} - -fn slice_index() -> u8 { - let arr: &[_] = &[101, 102, 103, 104, 105, 106]; - arr[5] -} - -fn main() { - assert_eq!(empty_array(), []); - assert_eq!(index_unsafe(), 20); - assert_eq!(index(), 20); - assert_eq!(slice_index(), 106); - assert_eq!(big_array(), [5, 4, 3, 2, 1]); - assert_eq!(array_array(), [[5, 4], [3, 2], [1, 0]]); - assert_eq!(array_repeat(), [42; 8]); - assert_eq!(mini_array(), [42]); -} diff --git a/tests/run-pass/associated-const.rs b/tests/run-pass/associated-const.rs deleted file mode 100644 index fe5da49f807d..000000000000 --- a/tests/run-pass/associated-const.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -trait Foo { - const ID: i32; -} - -impl Foo for i32 { - const ID: i32 = 1; -} - -fn main() { - assert_eq!(1, ::ID); -} diff --git a/tests/run-pass/assume_bug.rs b/tests/run-pass/assume_bug.rs deleted file mode 100644 index e14f875c022e..000000000000 --- a/tests/run-pass/assume_bug.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - vec![()].into_iter(); -} diff --git a/tests/run-pass/atomic-access-bool.rs b/tests/run-pass/atomic-access-bool.rs deleted file mode 100644 index ada584705401..000000000000 --- a/tests/run-pass/atomic-access-bool.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT}; -use std::sync::atomic::Ordering::*; - -static mut ATOMIC: AtomicBool = ATOMIC_BOOL_INIT; - -fn main() { - unsafe { - assert_eq!(*ATOMIC.get_mut(), false); - ATOMIC.store(true, SeqCst); - assert_eq!(*ATOMIC.get_mut(), true); - ATOMIC.fetch_or(false, SeqCst); - assert_eq!(*ATOMIC.get_mut(), true); - ATOMIC.fetch_and(false, SeqCst); - assert_eq!(*ATOMIC.get_mut(), false); - ATOMIC.fetch_nand(true, SeqCst); - assert_eq!(*ATOMIC.get_mut(), true); - ATOMIC.fetch_xor(true, SeqCst); - assert_eq!(*ATOMIC.get_mut(), false); - } -} diff --git a/tests/run-pass/atomic-compare_exchange.rs b/tests/run-pass/atomic-compare_exchange.rs deleted file mode 100644 index 61e9a9658896..000000000000 --- a/tests/run-pass/atomic-compare_exchange.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT}; -use std::sync::atomic::Ordering::*; - -static ATOMIC: AtomicIsize = ATOMIC_ISIZE_INIT; - -fn main() { - // Make sure trans can emit all the intrinsics correctly - ATOMIC.compare_exchange(0, 1, Relaxed, Relaxed).ok(); - ATOMIC.compare_exchange(0, 1, Acquire, Relaxed).ok(); - ATOMIC.compare_exchange(0, 1, Release, Relaxed).ok(); - ATOMIC.compare_exchange(0, 1, AcqRel, Relaxed).ok(); - ATOMIC.compare_exchange(0, 1, SeqCst, Relaxed).ok(); - ATOMIC.compare_exchange(0, 1, Acquire, Acquire).ok(); - ATOMIC.compare_exchange(0, 1, AcqRel, Acquire).ok(); - ATOMIC.compare_exchange(0, 1, SeqCst, Acquire).ok(); - ATOMIC.compare_exchange(0, 1, SeqCst, SeqCst).ok(); - ATOMIC.compare_exchange_weak(0, 1, Relaxed, Relaxed).ok(); - ATOMIC.compare_exchange_weak(0, 1, Acquire, Relaxed).ok(); - ATOMIC.compare_exchange_weak(0, 1, Release, Relaxed).ok(); - ATOMIC.compare_exchange_weak(0, 1, AcqRel, Relaxed).ok(); - ATOMIC.compare_exchange_weak(0, 1, SeqCst, Relaxed).ok(); - ATOMIC.compare_exchange_weak(0, 1, Acquire, Acquire).ok(); - ATOMIC.compare_exchange_weak(0, 1, AcqRel, Acquire).ok(); - ATOMIC.compare_exchange_weak(0, 1, SeqCst, Acquire).ok(); - ATOMIC.compare_exchange_weak(0, 1, SeqCst, SeqCst).ok(); -} diff --git a/tests/run-pass/aux_test.rs b/tests/run-pass/aux_test.rs deleted file mode 100644 index beed82e05802..000000000000 --- a/tests/run-pass/aux_test.rs +++ /dev/null @@ -1,9 +0,0 @@ -// aux-build:dep.rs - -// ignore-cross-compile - -extern crate dep; - -fn main() { - dep::foo(); -} diff --git a/tests/run-pass/auxiliary/dep.rs b/tests/run-pass/auxiliary/dep.rs deleted file mode 100644 index b76b4321d62a..000000000000 --- a/tests/run-pass/auxiliary/dep.rs +++ /dev/null @@ -1 +0,0 @@ -pub fn foo() {} diff --git a/tests/run-pass/bad_substs.rs b/tests/run-pass/bad_substs.rs deleted file mode 100644 index d8da2de5d6df..000000000000 --- a/tests/run-pass/bad_substs.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let f: fn(i32) -> Option = Some::; - f(42); -} diff --git a/tests/run-pass/binops.rs b/tests/run-pass/binops.rs deleted file mode 100644 index a03b96fa499f..000000000000 --- a/tests/run-pass/binops.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Binop corner cases - -fn test_nil() { - assert_eq!((), ()); - assert!((!(() != ()))); - assert!((!(() < ()))); - assert!((() <= ())); - assert!((!(() > ()))); - assert!((() >= ())); -} - -fn test_bool() { - assert!((!(true < false))); - assert!((!(true <= false))); - assert!((true > false)); - assert!((true >= false)); - - assert!((false < true)); - assert!((false <= true)); - assert!((!(false > true))); - assert!((!(false >= true))); - - // Bools support bitwise binops - assert_eq!(false & false, false); - assert_eq!(true & false, false); - assert_eq!(true & true, true); - assert_eq!(false | false, false); - assert_eq!(true | false, true); - assert_eq!(true | true, true); - assert_eq!(false ^ false, false); - assert_eq!(true ^ false, true); - assert_eq!(true ^ true, false); -} - -fn test_ptr() { - unsafe { - let p1: *const u8 = ::std::mem::transmute(0_usize); - let p2: *const u8 = ::std::mem::transmute(0_usize); - let p3: *const u8 = ::std::mem::transmute(1_usize); - - assert_eq!(p1, p2); - assert!(p1 != p3); - assert!(p1 < p3); - assert!(p1 <= p3); - assert!(p3 > p1); - assert!(p3 >= p3); - assert!(p1 <= p2); - assert!(p1 >= p2); - } -} - -#[derive(PartialEq, Debug)] -struct P { - x: isize, - y: isize, -} - -fn p(x: isize, y: isize) -> P { - P { - x: x, - y: y - } -} - -fn test_class() { - let q = p(1, 2); - let mut r = p(1, 2); - - assert_eq!(q, r); - r.y = 17; - assert!((r.y != q.y)); - assert_eq!(r.y, 17); - assert!((q != r)); -} - -pub fn main() { - test_nil(); - test_bool(); - test_ptr(); - test_class(); -} diff --git a/tests/run-pass/bools.rs b/tests/run-pass/bools.rs deleted file mode 100644 index 103d7eac27cd..000000000000 --- a/tests/run-pass/bools.rs +++ /dev/null @@ -1,28 +0,0 @@ -fn boolean() -> bool { - true -} - -fn if_false() -> i64 { - let c = false; - if c { 1 } else { 0 } -} - -fn if_true() -> i64 { - let c = true; - if c { 1 } else { 0 } -} - -fn match_bool() -> i16 { - let b = true; - match b { - true => 1, - _ => 0, - } -} - -fn main() { - assert!(boolean()); - assert_eq!(if_false(), 0); - assert_eq!(if_true(), 1); - assert_eq!(match_bool(), 1); -} diff --git a/tests/run-pass/box_box_trait.rs b/tests/run-pass/box_box_trait.rs deleted file mode 100644 index 57eef52d573b..000000000000 --- a/tests/run-pass/box_box_trait.rs +++ /dev/null @@ -1,29 +0,0 @@ -#![feature(box_syntax)] - -struct DroppableStruct; - -static mut DROPPED: bool = false; - -impl Drop for DroppableStruct { - fn drop(&mut self) { - unsafe { DROPPED = true; } - } -} - -trait MyTrait { fn dummy(&self) { } } -impl MyTrait for Box {} - -struct Whatever { w: Box } -impl Whatever { - fn new(w: Box) -> Whatever { - Whatever { w: w } - } -} - -fn main() { - { - let f: Box<_> = box DroppableStruct; - let _a = Whatever::new(box f as Box); - } - assert!(unsafe { DROPPED }); -} diff --git a/tests/run-pass/btreemap.rs b/tests/run-pass/btreemap.rs deleted file mode 100644 index 0fd28d6f1e8d..000000000000 --- a/tests/run-pass/btreemap.rs +++ /dev/null @@ -1,17 +0,0 @@ -// mir validation can't cope with `mem::uninitialized()`, so this test fails with validation & full-MIR. -// compile-flags: -Zmir-emit-validate=0 - -#[derive(PartialEq, Eq, PartialOrd, Ord)] -pub enum Foo { - A(&'static str), - _B, - _C, -} - -pub fn main() { - let mut b = std::collections::BTreeSet::new(); - b.insert(Foo::A("\'")); - b.insert(Foo::A("/=")); - b.insert(Foo::A("#")); - b.insert(Foo::A("0o")); -} diff --git a/tests/run-pass/c_enums.rs b/tests/run-pass/c_enums.rs deleted file mode 100644 index 11897b73eb2a..000000000000 --- a/tests/run-pass/c_enums.rs +++ /dev/null @@ -1,32 +0,0 @@ -enum Foo { - Bar = 42, - Baz, - Quux = 100, -} - -enum Signed { - Bar = -42, - Baz, - Quux = 100, -} - -fn foo() -> [u8; 3] { - [Foo::Bar as u8, Foo::Baz as u8, Foo::Quux as u8] -} - -fn signed() -> [i8; 3] { - [Signed::Bar as i8, Signed::Baz as i8, Signed::Quux as i8] -} - -fn unsafe_match() -> bool { - match unsafe { std::mem::transmute::(43) } { - Foo::Baz => true, - _ => false, - } -} - -fn main() { - assert_eq!(foo(), [42, 43, 100]); - assert_eq!(signed(), [-42, -41, 100]); - assert!(unsafe_match()); -} diff --git a/tests/run-pass/call_drop_on_array_elements.rs b/tests/run-pass/call_drop_on_array_elements.rs deleted file mode 100644 index c9b59f635e14..000000000000 --- a/tests/run-pass/call_drop_on_array_elements.rs +++ /dev/null @@ -1,22 +0,0 @@ -struct Bar(u16); // ZSTs are tested separately - -static mut DROP_COUNT: usize = 0; - -impl Drop for Bar { - fn drop(&mut self) { - assert_eq!(self.0 as usize, unsafe { DROP_COUNT }); // tests whether we are called at a valid address - unsafe { DROP_COUNT += 1; } - } -} - -fn main() { - let b = [Bar(0), Bar(1), Bar(2), Bar(3)]; - assert_eq!(unsafe { DROP_COUNT }, 0); - drop(b); - assert_eq!(unsafe { DROP_COUNT }, 4); - - // check empty case - let b : [Bar; 0] = []; - drop(b); - assert_eq!(unsafe { DROP_COUNT }, 4); -} diff --git a/tests/run-pass/call_drop_on_fat_ptr_array_elements.rs b/tests/run-pass/call_drop_on_fat_ptr_array_elements.rs deleted file mode 100644 index a1ab5c45e358..000000000000 --- a/tests/run-pass/call_drop_on_fat_ptr_array_elements.rs +++ /dev/null @@ -1,20 +0,0 @@ -trait Foo {} - -struct Bar; - -impl Foo for Bar {} - -static mut DROP_COUNT: usize = 0; - -impl Drop for Bar { - fn drop(&mut self) { - unsafe { DROP_COUNT += 1; } - } -} - -fn main() { - let b: [Box; 4] = [Box::new(Bar), Box::new(Bar), Box::new(Bar), Box::new(Bar)]; - assert_eq!(unsafe { DROP_COUNT }, 0); - drop(b); - assert_eq!(unsafe { DROP_COUNT }, 4); -} diff --git a/tests/run-pass/call_drop_on_zst_array_elements.rs b/tests/run-pass/call_drop_on_zst_array_elements.rs deleted file mode 100644 index 1887130fdd8a..000000000000 --- a/tests/run-pass/call_drop_on_zst_array_elements.rs +++ /dev/null @@ -1,21 +0,0 @@ -struct Bar; - -static mut DROP_COUNT: usize = 0; - -impl Drop for Bar { - fn drop(&mut self) { - unsafe { DROP_COUNT += 1; } - } -} - -fn main() { - let b = [Bar, Bar, Bar, Bar]; - assert_eq!(unsafe { DROP_COUNT }, 0); - drop(b); - assert_eq!(unsafe { DROP_COUNT }, 4); - - // check empty case - let b : [Bar; 0] = []; - drop(b); - assert_eq!(unsafe { DROP_COUNT }, 4); -} diff --git a/tests/run-pass/call_drop_through_owned_slice.rs b/tests/run-pass/call_drop_through_owned_slice.rs deleted file mode 100644 index 3ec6be65ed8b..000000000000 --- a/tests/run-pass/call_drop_through_owned_slice.rs +++ /dev/null @@ -1,16 +0,0 @@ -struct Bar; - -static mut DROP_COUNT: usize = 0; - -impl Drop for Bar { - fn drop(&mut self) { - unsafe { DROP_COUNT += 1; } - } -} - -fn main() { - let b: Box<[Bar]> = vec![Bar, Bar, Bar, Bar].into_boxed_slice(); - assert_eq!(unsafe { DROP_COUNT }, 0); - drop(b); - assert_eq!(unsafe { DROP_COUNT }, 4); -} diff --git a/tests/run-pass/call_drop_through_trait_object.rs b/tests/run-pass/call_drop_through_trait_object.rs deleted file mode 100644 index 9b6acf0b1474..000000000000 --- a/tests/run-pass/call_drop_through_trait_object.rs +++ /dev/null @@ -1,20 +0,0 @@ -trait Foo {} - -struct Bar; - -static mut DROP_CALLED: bool = false; - -impl Drop for Bar { - fn drop(&mut self) { - unsafe { DROP_CALLED = true; } - } -} - -impl Foo for Bar {} - -fn main() { - let b: Box = Box::new(Bar); - assert!(unsafe { !DROP_CALLED }); - drop(b); - assert!(unsafe { DROP_CALLED }); -} diff --git a/tests/run-pass/call_drop_through_trait_object_rc.rs b/tests/run-pass/call_drop_through_trait_object_rc.rs deleted file mode 100644 index ce56ca6a1caf..000000000000 --- a/tests/run-pass/call_drop_through_trait_object_rc.rs +++ /dev/null @@ -1,22 +0,0 @@ -trait Foo {} - -struct Bar; - -static mut DROP_CALLED: bool = false; - -impl Drop for Bar { - fn drop(&mut self) { - unsafe { DROP_CALLED = true; } - } -} - -impl Foo for Bar {} - -use std::rc::Rc; - -fn main() { - let b: Rc = Rc::new(Bar); - assert!(unsafe { !DROP_CALLED }); - drop(b); - assert!(unsafe { DROP_CALLED }); -} diff --git a/tests/run-pass/calls.rs b/tests/run-pass/calls.rs deleted file mode 100644 index c4ba4a9b701f..000000000000 --- a/tests/run-pass/calls.rs +++ /dev/null @@ -1,45 +0,0 @@ -#![feature(const_fn)] - -fn call() -> i32 { - fn increment(x: i32) -> i32 { - x + 1 - } - increment(1) -} - -fn factorial_recursive() -> i64 { - fn fact(n: i64) -> i64 { - if n == 0 { - 1 - } else { - n * fact(n - 1) - } - } - fact(10) -} - -fn call_generic() -> (i16, bool) { - fn id(t: T) -> T { t } - (id(42), id(true)) -} - -// Test calling a very simple function from the standard library. -fn cross_crate_fn_call() -> i64 { - if 1i32.is_positive() { 1 } else { 0 } -} - -const fn foo(i: i64) -> i64 { *&i + 1 } - -fn const_fn_call() -> i64 { - let x = 5 + foo(5); - assert_eq!(x, 11); - x -} - -fn main() { - assert_eq!(call(), 2); - assert_eq!(factorial_recursive(), 3628800); - assert_eq!(call_generic(), (42, true)); - assert_eq!(cross_crate_fn_call(), 1); - assert_eq!(const_fn_call(), 11); -} diff --git a/tests/run-pass/cast-rfc0401-vtable-kinds.rs b/tests/run-pass/cast-rfc0401-vtable-kinds.rs deleted file mode 100644 index afbd4760a3c9..000000000000 --- a/tests/run-pass/cast-rfc0401-vtable-kinds.rs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -// FIXME: remove the next line when https://github.com/rust-lang/rust/issues/43358 is resolved -// compile-flags: -Zmir-opt-level=0 - -// Check that you can cast between different pointers to trait objects -// whose vtable have the same kind (both lengths, or both trait pointers). - -trait Foo { - fn foo(&self, _: T) -> u32 { 42 } -} - -trait Bar { - fn bar(&self) { println!("Bar!"); } -} - -impl Foo for () {} -impl Foo for u32 { fn foo(&self, _: u32) -> u32 { self+43 } } -impl Bar for () {} - -unsafe fn round_trip_and_call<'a>(t: *const (Foo+'a)) -> u32 { - let foo_e : *const Foo = t as *const _; - let r_1 = foo_e as *mut Foo; - - (&*r_1).foo(0) -} - -#[repr(C)] -struct FooS(T); -#[repr(C)] -struct BarS(T); - -fn foo_to_bar(u: *const FooS) -> *const BarS { - u as *const BarS -} - -fn main() { - let x = 4u32; - let y : &Foo = &x; - let fl = unsafe { round_trip_and_call(y as *const Foo) }; - assert_eq!(fl, (43+4)); - - let s = FooS([0,1,2]); - let u: &FooS<[u32]> = &s; - let u: *const FooS<[u32]> = u; - let bar_ref : *const BarS<[u32]> = foo_to_bar(u); - let z : &BarS<[u32]> = unsafe{&*bar_ref}; - assert_eq!(&z.0, &[0,1,2]); - // If validation fails here, that's likely because an immutable suspension is recovered mutably. -} diff --git a/tests/run-pass/cast_fn_ptr.rs b/tests/run-pass/cast_fn_ptr.rs deleted file mode 100644 index 109e8dfc2a02..000000000000 --- a/tests/run-pass/cast_fn_ptr.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn main() { - fn f(_: *const u8) {} - - let g = unsafe { - std::mem::transmute::(f) - }; - - g(&42 as *const _); -} diff --git a/tests/run-pass/cast_fn_ptr_unsafe.rs b/tests/run-pass/cast_fn_ptr_unsafe.rs deleted file mode 100644 index 0cabb369bfdd..000000000000 --- a/tests/run-pass/cast_fn_ptr_unsafe.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() { - fn f() {} - - let g = f as fn() as unsafe fn(); - unsafe { - g(); - } -} diff --git a/tests/run-pass/char.rs b/tests/run-pass/char.rs deleted file mode 100644 index 505c09b0ad88..000000000000 --- a/tests/run-pass/char.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn main() { - let c = 'x'; - assert_eq!(c, 'x'); - assert!('a' < 'z'); - assert!('1' < '9'); - assert_eq!(std::char::from_u32('x' as u32).unwrap(), 'x'); - // FIXME: - // assert_eq!(std::char::from_u32('x' as u32), Some('x')); -} diff --git a/tests/run-pass/closure-drop.rs b/tests/run-pass/closure-drop.rs deleted file mode 100644 index f1bdafaeb135..000000000000 --- a/tests/run-pass/closure-drop.rs +++ /dev/null @@ -1,25 +0,0 @@ -struct Foo<'a>(&'a mut bool); - -impl<'a> Drop for Foo<'a> { - fn drop(&mut self) { - *self.0 = true; - } -} - -fn f(t: T) { - t() -} - -fn main() { - let mut ran_drop = false; - { - let x = Foo(&mut ran_drop); - // this closure never by val uses its captures - // so it's basically a fn(&self) - // the shim used to not drop the `x` - let x = move || { let _ = x; }; - f(x); - } - assert!(ran_drop); -} - diff --git a/tests/run-pass/closure-field-ty.rs b/tests/run-pass/closure-field-ty.rs deleted file mode 100644 index 0d27728d2232..000000000000 --- a/tests/run-pass/closure-field-ty.rs +++ /dev/null @@ -1,10 +0,0 @@ -// miri issue #304 -fn main() { - let mut y = 0; - { - let mut box_maybe_closure = Box::new(None); - *box_maybe_closure = Some(|| { y += 1; }); - (box_maybe_closure.unwrap())(); - } - assert_eq!(y, 1); -} diff --git a/tests/run-pass/closures.rs b/tests/run-pass/closures.rs deleted file mode 100644 index 9b379051eb77..000000000000 --- a/tests/run-pass/closures.rs +++ /dev/null @@ -1,48 +0,0 @@ -fn simple() -> i32 { - let y = 10; - let f = |x| x + y; - f(2) -} - -fn crazy_closure() -> (i32, i32, i32) { - fn inner(t: T) -> (i32, T, T) { - struct NonCopy; - let x = NonCopy; - - let a = 2; - let b = 40; - let f = move |y, z, asdf| { - drop(x); - (a + b + y + z, asdf, t) - }; - f(a, b, t) - } - - inner(10) -} - -fn closure_arg_adjustment_problem() -> i64 { - fn once(f: F) { f(2); } - let mut y = 1; - { - let f = |x| y += x; - once(f); - } - y -} - -fn fn_once_closure_with_multiple_args() -> i64 { - fn once i64>(f: F) -> i64 { f(2, 3) } - let y = 1; - { - let f = |x, z| x + y + z; - once(f) - } -} - -fn main() { - assert_eq!(simple(), 12); - assert_eq!(crazy_closure(), (84, 10, 10)); - assert_eq!(closure_arg_adjustment_problem(), 3); - assert_eq!(fn_once_closure_with_multiple_args(), 6); -} diff --git a/tests/run-pass/const-vec-of-fns.rs b/tests/run-pass/const-vec-of-fns.rs deleted file mode 100644 index 0338a766e262..000000000000 --- a/tests/run-pass/const-vec-of-fns.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// pretty-expanded FIXME #23616 - -/*! - * Try to double-check that static fns have the right size (with or - * without dummy env ptr, as appropriate) by iterating a size-2 array. - * If the static size differs from the runtime size, the second element - * should be read as a null or otherwise wrong pointer and crash. - */ - -fn f() { } -static mut CLOSURES: &'static mut [fn()] = &mut [f as fn(), f as fn()]; - -pub fn main() { - unsafe { - for closure in &mut *CLOSURES { - (*closure)() - } - } -} diff --git a/tests/run-pass/constants.rs b/tests/run-pass/constants.rs deleted file mode 100644 index 718c85260142..000000000000 --- a/tests/run-pass/constants.rs +++ /dev/null @@ -1,9 +0,0 @@ -const A: usize = *&5; - -fn foo() -> usize { - A -} - -fn main() { - assert_eq!(foo(), A); -} diff --git a/tests/run-pass/deriving-associated-types.rs b/tests/run-pass/deriving-associated-types.rs deleted file mode 100644 index b67ef85acf62..000000000000 --- a/tests/run-pass/deriving-associated-types.rs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -pub trait DeclaredTrait { - type Type; -} - -impl DeclaredTrait for i32 { - type Type = i32; -} - -pub trait WhereTrait { - type Type; -} - -impl WhereTrait for i32 { - type Type = i32; -} - -// Make sure we don't add a bound that just shares a name with an associated -// type. -pub mod module { - pub type Type = i32; -} - -#[derive(PartialEq, Debug)] -struct PrivateStruct(T); - -#[derive(PartialEq, Debug)] -struct TupleStruct( - module::Type, - Option, - A, - PrivateStruct, - B, - B::Type, - Option, - ::Type, - Option<::Type>, - C, - C::Type, - Option, - ::Type, - Option<::Type>, - ::Type, -) where C: WhereTrait; - -#[derive(PartialEq, Debug)] -pub struct Struct where C: WhereTrait { - m1: module::Type, - m2: Option, - a1: A, - a2: PrivateStruct, - b: B, - b1: B::Type, - b2: Option, - b3: ::Type, - b4: Option<::Type>, - c: C, - c1: C::Type, - c2: Option, - c3: ::Type, - c4: Option<::Type>, - d: ::Type, -} - -#[derive(PartialEq, Debug)] -enum Enum where C: WhereTrait { - Unit, - Seq( - module::Type, - Option, - A, - PrivateStruct, - B, - B::Type, - Option, - ::Type, - Option<::Type>, - C, - C::Type, - Option, - ::Type, - Option<::Type>, - ::Type, - ), - Map { - m1: module::Type, - m2: Option, - a1: A, - a2: PrivateStruct, - b: B, - b1: B::Type, - b2: Option, - b3: ::Type, - b4: Option<::Type>, - c: C, - c1: C::Type, - c2: Option, - c3: ::Type, - c4: Option<::Type>, - d: ::Type, - }, -} - -fn main() { - - let e: Enum< - i32, - i32, - i32, - > = Enum::Seq( - 0, - None, - 0, - PrivateStruct(0), - 0, - 0, - None, - 0, - None, - 0, - 0, - None, - 0, - None, - 0, - ); - assert_eq!(e, e); - - let e: Enum< - i32, - i32, - i32, - > = Enum::Map { - m1: 0, - m2: None, - a1: 0, - a2: PrivateStruct(0), - b: 0, - b1: 0, - b2: None, - b3: 0, - b4: None, - c: 0, - c1: 0, - c2: None, - c3: 0, - c4: None, - d: 0, - }; - assert_eq!(e, e); - let e: TupleStruct< - i32, - i32, - i32, - > = TupleStruct( - 0, - None, - 0, - PrivateStruct(0), - 0, - 0, - None, - 0, - None, - 0, - 0, - None, - 0, - None, - 0, - ); - assert_eq!(e, e); - - let e: Struct< - i32, - i32, - i32, - > = Struct { - m1: 0, - m2: None, - a1: 0, - a2: PrivateStruct(0), - b: 0, - b1: 0, - b2: None, - b3: 0, - b4: None, - c: 0, - c1: 0, - c2: None, - c3: 0, - c4: None, - d: 0, - }; - assert_eq!(e, e); - - let e = Enum::Unit::; - assert_eq!(e, e); -} diff --git a/tests/run-pass/drop_empty_slice.rs b/tests/run-pass/drop_empty_slice.rs deleted file mode 100644 index b21c8a612c57..000000000000 --- a/tests/run-pass/drop_empty_slice.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![feature(box_syntax)] - -fn main() { - // With the nested Vec, this is calling Offset(Unique::empty(), 0) on drop. - let args : Vec> = Vec::new(); - let _ = box args; -} diff --git a/tests/run-pass/dst-field-align.rs b/tests/run-pass/dst-field-align.rs deleted file mode 100644 index 5631b65ed9d8..000000000000 --- a/tests/run-pass/dst-field-align.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(dead_code)] - -struct Foo { - a: u16, - b: T -} - -trait Bar { - fn get(&self) -> usize; -} - -impl Bar for usize { - fn get(&self) -> usize { *self } -} - -struct Baz { - a: T -} - -struct HasDrop { - ptr: Box, - data: T -} - -fn main() { - // Test that zero-offset works properly - let b : Baz = Baz { a: 7 }; - assert_eq!(b.a.get(), 7); - let b : &Baz = &b; - assert_eq!(b.a.get(), 7); - - // Test that the field is aligned properly - let f : Foo = Foo { a: 0, b: 11 }; - assert_eq!(f.b.get(), 11); - let ptr1 : *const u8 = &f.b as *const _ as *const u8; - - let f : &Foo = &f; - let ptr2 : *const u8 = &f.b as *const _ as *const u8; - assert_eq!(f.b.get(), 11); - - // The pointers should be the same - assert_eq!(ptr1, ptr2); - - // Test that nested DSTs work properly - let f : Foo> = Foo { a: 0, b: Foo { a: 1, b: 17 }}; - assert_eq!(f.b.b.get(), 17); - let f : &Foo> = &f; - assert_eq!(f.b.b.get(), 17); - - // Test that get the pointer via destructuring works - - let f : Foo = Foo { a: 0, b: 11 }; - let f : &Foo = &f; - let &Foo { a: _, b: ref bar } = f; - assert_eq!(bar.get(), 11); - - // Make sure that drop flags don't screw things up - - let d : HasDrop> = HasDrop { - ptr: Box::new(0), - data: Baz { a: [1,2,3,4] } - }; - assert_eq!([1,2,3,4], d.data.a); - - let d : &HasDrop> = &d; - assert_eq!(&[1,2,3,4], &d.data.a); -} diff --git a/tests/run-pass/dst-irrefutable-bind.rs b/tests/run-pass/dst-irrefutable-bind.rs deleted file mode 100644 index 9f8067f372ae..000000000000 --- a/tests/run-pass/dst-irrefutable-bind.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -struct Test(T); - -fn main() { - let x = Test([1,2,3]); - let x : &Test<[i32]> = &x; - - let & ref _y = x; - - // Make sure binding to a fat pointer behind a reference - // still works - let slice = &[1,2,3]; - let x = Test(&slice); - let Test(&_slice) = x; -} diff --git a/tests/run-pass/dst-raw.rs b/tests/run-pass/dst-raw.rs deleted file mode 100644 index 3a74626b0299..000000000000 --- a/tests/run-pass/dst-raw.rs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Test DST raw pointers - - -trait Trait { - fn foo(&self) -> isize; -} - -struct A { - f: isize -} -impl Trait for A { - fn foo(&self) -> isize { - self.f - } -} - -struct Foo { - f: T -} - -pub fn main() { - // raw trait object - let x = A { f: 42 }; - let z: *const Trait = &x; - let r = unsafe { - (&*z).foo() - }; - assert_eq!(r, 42); - - // raw DST struct - let p = Foo {f: A { f: 42 }}; - let o: *const Foo = &p; - let r = unsafe { - (&*o).f.foo() - }; - assert_eq!(r, 42); - - // raw slice - let a: *const [_] = &[1, 2, 3]; - unsafe { - let b = (*a)[2]; - assert_eq!(b, 3); - let len = (*a).len(); - assert_eq!(len, 3); - } - - // raw slice with explicit cast - let a = &[1, 2, 3] as *const [i32]; - unsafe { - let b = (*a)[2]; - assert_eq!(b, 3); - let len = (*a).len(); - assert_eq!(len, 3); - } - - // raw DST struct with slice - let c: *const Foo<[_]> = &Foo {f: [1, 2, 3]}; - unsafe { - let b = (&*c).f[0]; - assert_eq!(b, 1); - let len = (&*c).f.len(); - assert_eq!(len, 3); - } - - // all of the above with *mut - let mut x = A { f: 42 }; - let z: *mut Trait = &mut x; - let r = unsafe { - (&*z).foo() - }; - assert_eq!(r, 42); - - let mut p = Foo {f: A { f: 42 }}; - let o: *mut Foo = &mut p; - let r = unsafe { - (&*o).f.foo() - }; - assert_eq!(r, 42); - - let a: *mut [_] = &mut [1, 2, 3]; - unsafe { - let b = (*a)[2]; - assert_eq!(b, 3); - let len = (*a).len(); - assert_eq!(len, 3); - } - - let a = &mut [1, 2, 3] as *mut [i32]; - unsafe { - let b = (*a)[2]; - assert_eq!(b, 3); - let len = (*a).len(); - assert_eq!(len, 3); - } - - let c: *mut Foo<[_]> = &mut Foo {f: [1, 2, 3]}; - unsafe { - let b = (&*c).f[0]; - assert_eq!(b, 1); - let len = (&*c).f.len(); - assert_eq!(len, 3); - } -} diff --git a/tests/run-pass/dst-struct-sole.rs b/tests/run-pass/dst-struct-sole.rs deleted file mode 100644 index 58d7b35a5275..000000000000 --- a/tests/run-pass/dst-struct-sole.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// As dst-struct.rs, but the unsized field is the only field in the struct. - - -struct Fat { - ptr: T -} - -// x is a fat pointer -fn foo(x: &Fat<[isize]>) { - let y = &x.ptr; - assert_eq!(x.ptr.len(), 3); - assert_eq!(y[0], 1); - assert_eq!(x.ptr[1], 2); -} - -fn foo2(x: &Fat<[T]>) { - let y = &x.ptr; - let bar = Bar; - assert_eq!(x.ptr.len(), 3); - assert_eq!(y[0].to_bar(), bar); - assert_eq!(x.ptr[1].to_bar(), bar); -} - -#[derive(Copy, Clone, PartialEq, Eq, Debug)] -struct Bar; - -trait ToBar { - fn to_bar(&self) -> Bar; -} - -impl ToBar for Bar { - fn to_bar(&self) -> Bar { - *self - } -} - -pub fn main() { - // With a vec of ints. - let f1 = Fat { ptr: [1, 2, 3] }; - foo(&f1); - let f2 = &f1; - foo(f2); - let f3: &Fat<[isize]> = f2; - foo(f3); - let f4: &Fat<[isize]> = &f1; - foo(f4); - let f5: &Fat<[isize]> = &Fat { ptr: [1, 2, 3] }; - foo(f5); - - // With a vec of Bars. - let bar = Bar; - let f1 = Fat { ptr: [bar, bar, bar] }; - foo2(&f1); - let f2 = &f1; - foo2(f2); - let f3: &Fat<[Bar]> = f2; - foo2(f3); - let f4: &Fat<[Bar]> = &f1; - foo2(f4); - let f5: &Fat<[Bar]> = &Fat { ptr: [bar, bar, bar] }; - foo2(f5); - - // Assignment. - let f5: &mut Fat<[isize]> = &mut Fat { ptr: [1, 2, 3] }; - f5.ptr[1] = 34; - assert_eq!(f5.ptr[0], 1); - assert_eq!(f5.ptr[1], 34); - assert_eq!(f5.ptr[2], 3); - - // Zero size vec. - let f5: &Fat<[isize]> = &Fat { ptr: [] }; - assert!(f5.ptr.is_empty()); - let f5: &Fat<[Bar]> = &Fat { ptr: [] }; - assert!(f5.ptr.is_empty()); -} diff --git a/tests/run-pass/dst-struct.rs b/tests/run-pass/dst-struct.rs deleted file mode 100644 index 932b571eccdb..000000000000 --- a/tests/run-pass/dst-struct.rs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -#![allow(unused_features)] -#![feature(box_syntax)] - -struct Fat { - f1: isize, - f2: &'static str, - ptr: T -} - -// x is a fat pointer -fn foo(x: &Fat<[isize]>) { - let y = &x.ptr; - assert_eq!(x.ptr.len(), 3); - assert_eq!(y[0], 1); - assert_eq!(x.ptr[1], 2); - assert_eq!(x.f1, 5); - assert_eq!(x.f2, "some str"); -} - -fn foo2(x: &Fat<[T]>) { - let y = &x.ptr; - let bar = Bar; - assert_eq!(x.ptr.len(), 3); - assert_eq!(y[0].to_bar(), bar); - assert_eq!(x.ptr[1].to_bar(), bar); - assert_eq!(x.f1, 5); - assert_eq!(x.f2, "some str"); -} - -fn foo3(x: &Fat>) { - let y = &x.ptr.ptr; - assert_eq!(x.f1, 5); - assert_eq!(x.f2, "some str"); - assert_eq!(x.ptr.f1, 8); - assert_eq!(x.ptr.f2, "deep str"); - assert_eq!(x.ptr.ptr.len(), 3); - assert_eq!(y[0], 1); - assert_eq!(x.ptr.ptr[1], 2); -} - - -#[derive(Copy, Clone, PartialEq, Eq, Debug)] -struct Bar; - -trait ToBar { - fn to_bar(&self) -> Bar; -} - -impl ToBar for Bar { - fn to_bar(&self) -> Bar { - *self - } -} - -pub fn main() { - // With a vec of ints. - let f1 = Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] }; - foo(&f1); - let f2 = &f1; - foo(f2); - let f3: &Fat<[isize]> = f2; - foo(f3); - let f4: &Fat<[isize]> = &f1; - foo(f4); - let f5: &Fat<[isize]> = &Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] }; - foo(f5); - - // With a vec of Bars. - let bar = Bar; - let f1 = Fat { f1: 5, f2: "some str", ptr: [bar, bar, bar] }; - foo2(&f1); - let f2 = &f1; - foo2(f2); - let f3: &Fat<[Bar]> = f2; - foo2(f3); - let f4: &Fat<[Bar]> = &f1; - foo2(f4); - let f5: &Fat<[Bar]> = &Fat { f1: 5, f2: "some str", ptr: [bar, bar, bar] }; - foo2(f5); - - // Assignment. - let f5: &mut Fat<[isize]> = &mut Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] }; - f5.ptr[1] = 34; - assert_eq!(f5.ptr[0], 1); - assert_eq!(f5.ptr[1], 34); - assert_eq!(f5.ptr[2], 3); - - // Zero size vec. - let f5: &Fat<[isize]> = &Fat { f1: 5, f2: "some str", ptr: [] }; - assert!(f5.ptr.is_empty()); - let f5: &Fat<[Bar]> = &Fat { f1: 5, f2: "some str", ptr: [] }; - assert!(f5.ptr.is_empty()); - - // Deeply nested. - let f1 = Fat { f1: 5, f2: "some str", ptr: Fat { f1: 8, f2: "deep str", ptr: [1, 2, 3]} }; - foo3(&f1); - let f2 = &f1; - foo3(f2); - let f3: &Fat> = f2; - foo3(f3); - let f4: &Fat> = &f1; - foo3(f4); - let f5: &Fat> = - &Fat { f1: 5, f2: "some str", ptr: Fat { f1: 8, f2: "deep str", ptr: [1, 2, 3]} }; - foo3(f5); - - // Box. - let f1 = Box::new([1, 2, 3]); - assert_eq!((*f1)[1], 2); - let f2: Box<[isize]> = f1; - assert_eq!((*f2)[1], 2); - - // Nested Box. - let f1 : Box> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] }; - foo(&*f1); - let f2 : Box> = f1; - foo(&*f2); - - // FIXME (#22405): Replace `Box::new` with `box` here when/if possible. - let f3 : Box> = - Box::>::new(Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] }); - foo(&*f3); -} diff --git a/tests/run-pass/enum-nullable-const-null-with-fields.rs b/tests/run-pass/enum-nullable-const-null-with-fields.rs deleted file mode 100644 index 1342c4e104de..000000000000 --- a/tests/run-pass/enum-nullable-const-null-with-fields.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -use std::result::Result; -use std::result::Result::Ok; - -static C: Result<(), Box> = Ok(()); - -// This is because of yet another bad assertion (ICE) about the null side of a nullable enum. -// So we won't actually compile if the bug is present, but we check the value in main anyway. - -pub fn main() { - assert!(C.is_ok()); -} diff --git a/tests/run-pass/enums.rs b/tests/run-pass/enums.rs deleted file mode 100644 index 1f27292904f4..000000000000 --- a/tests/run-pass/enums.rs +++ /dev/null @@ -1,34 +0,0 @@ -enum MyEnum { - MyEmptyVariant, - MyNewtypeVariant(i32), - MyTupleVariant(i32, i32), - MyStructVariant { - my_first_field: i32, - my_second_field: i32, - } -} - -fn test(me: MyEnum) { - match me { - MyEnum::MyEmptyVariant => {}, - MyEnum::MyNewtypeVariant(ref val) => assert_eq!(val, &42), - MyEnum::MyTupleVariant(ref a, ref b) => { - assert_eq!(a, &43); - assert_eq!(b, &44); - }, - MyEnum::MyStructVariant { ref my_first_field, ref my_second_field } => { - assert_eq!(my_first_field, &45); - assert_eq!(my_second_field, &46); - }, - } -} - -fn main() { - test(MyEnum::MyEmptyVariant); - test(MyEnum::MyNewtypeVariant(42)); - test(MyEnum::MyTupleVariant(43, 44)); - test(MyEnum::MyStructVariant{ - my_first_field: 45, - my_second_field: 46, - }); -} diff --git a/tests/run-pass/float_fast_math.rs b/tests/run-pass/float_fast_math.rs deleted file mode 100644 index c1b4b55bd372..000000000000 --- a/tests/run-pass/float_fast_math.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(core_intrinsics)] - -use std::intrinsics::{fadd_fast, fsub_fast, fmul_fast, fdiv_fast, frem_fast}; - -#[inline(never)] -pub fn test_operations(a: f64, b: f64) { - // make sure they all map to the correct operation - unsafe { - assert_eq!(fadd_fast(a, b), a + b); - assert_eq!(fsub_fast(a, b), a - b); - assert_eq!(fmul_fast(a, b), a * b); - assert_eq!(fdiv_fast(a, b), a / b); - assert_eq!(frem_fast(a, b), a % b); - } -} - -fn main() { - test_operations(1., 2.); - test_operations(10., 5.); -} diff --git a/tests/run-pass/floats.rs b/tests/run-pass/floats.rs deleted file mode 100644 index 9c4d0594d1c9..000000000000 --- a/tests/run-pass/floats.rs +++ /dev/null @@ -1,11 +0,0 @@ - -fn main() { - assert_eq!(6.0_f32*6.0_f32, 36.0_f32); - assert_eq!(6.0_f64*6.0_f64, 36.0_f64); - assert_eq!(-{5.0_f32}, -5.0_f32); - assert!((5.0_f32/0.0).is_infinite()); - assert!((-5.0_f32).sqrt().is_nan()); - let x: u64 = unsafe { std::mem::transmute(42.0_f64) }; - let y: f64 = unsafe { std::mem::transmute(x) }; - assert_eq!(y, 42.0_f64); -} diff --git a/tests/run-pass/fn_item_as_closure_trait_object.rs b/tests/run-pass/fn_item_as_closure_trait_object.rs deleted file mode 100644 index 799f97a4f6fd..000000000000 --- a/tests/run-pass/fn_item_as_closure_trait_object.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn foo() {} - -fn main() { - let f: &Fn() = &foo; - f(); -} diff --git a/tests/run-pass/fn_item_with_args_as_closure_trait_object.rs b/tests/run-pass/fn_item_with_args_as_closure_trait_object.rs deleted file mode 100644 index 79ece75c773b..000000000000 --- a/tests/run-pass/fn_item_with_args_as_closure_trait_object.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn foo(i: i32) { - assert_eq!(i, 42); -} - -fn main() { - let f: &Fn(i32) = &foo; - f(42); -} diff --git a/tests/run-pass/fn_item_with_multiple_args_as_closure_trait_object.rs b/tests/run-pass/fn_item_with_multiple_args_as_closure_trait_object.rs deleted file mode 100644 index f4b5b449aa58..000000000000 --- a/tests/run-pass/fn_item_with_multiple_args_as_closure_trait_object.rs +++ /dev/null @@ -1,18 +0,0 @@ -fn foo(i: i32, j: i32) { - assert_eq!(i, 42); - assert_eq!(j, 55); -} - -fn bar(i: i32, j: i32, k: f32) { - assert_eq!(i, 42); - assert_eq!(j, 55); - assert_eq!(k, 3.14159) -} - - -fn main() { - let f: &Fn(i32, i32) = &foo; - f(42, 55); - let f: &Fn(i32, i32, f32) = &bar; - f(42, 55, 3.14159); -} diff --git a/tests/run-pass/fn_ptr_as_closure_trait_object.rs b/tests/run-pass/fn_ptr_as_closure_trait_object.rs deleted file mode 100644 index 24ae1f35bb60..000000000000 --- a/tests/run-pass/fn_ptr_as_closure_trait_object.rs +++ /dev/null @@ -1,15 +0,0 @@ -fn foo() {} -fn bar(u: u32) { assert_eq!(u, 42); } -fn baa(u: u32, f: f32) { - assert_eq!(u, 42); - assert_eq!(f, 3.141); -} - -fn main() { - let f: &Fn() = &(foo as fn()); - f(); - let f: &Fn(u32) = &(bar as fn(u32)); - f(42); - let f: &Fn(u32, f32) = &(baa as fn(u32, f32)); - f(42, 3.141); -} diff --git a/tests/run-pass/function_pointers.rs b/tests/run-pass/function_pointers.rs deleted file mode 100644 index 4f597d4a2e94..000000000000 --- a/tests/run-pass/function_pointers.rs +++ /dev/null @@ -1,46 +0,0 @@ -fn f() -> i32 { - 42 -} - -fn g(i: i32) -> i32 { - i*42 -} - -fn h(i: i32, j: i32) -> i32 { - j * i * 7 -} - -fn return_fn_ptr() -> fn() -> i32 { - f -} - -fn call_fn_ptr() -> i32 { - return_fn_ptr()() -} - -fn indirect i32>(f: F) -> i32 { f() } -fn indirect_mut i32>(mut f: F) -> i32 { f() } -fn indirect_once i32>(f: F) -> i32 { f() } - -fn indirect2 i32>(f: F) -> i32 { f(10) } -fn indirect_mut2 i32>(mut f: F) -> i32 { f(10) } -fn indirect_once2 i32>(f: F) -> i32 { f(10) } - -fn indirect3 i32>(f: F) -> i32 { f(10, 3) } -fn indirect_mut3 i32>(mut f: F) -> i32 { f(10, 3) } -fn indirect_once3 i32>(f: F) -> i32 { f(10, 3) } - -fn main() { - assert_eq!(call_fn_ptr(), 42); - assert_eq!(indirect(f), 42); - assert_eq!(indirect_mut(f), 42); - assert_eq!(indirect_once(f), 42); - assert_eq!(indirect2(g), 420); - assert_eq!(indirect_mut2(g), 420); - assert_eq!(indirect_once2(g), 420); - assert_eq!(indirect3(h), 210); - assert_eq!(indirect_mut3(h), 210); - assert_eq!(indirect_once3(h), 210); - assert!(return_fn_ptr() == f); - assert!(return_fn_ptr() as unsafe fn() -> i32 == f as fn() -> i32 as unsafe fn() -> i32); -} diff --git a/tests/run-pass/generator_control_flow.rs b/tests/run-pass/generator_control_flow.rs deleted file mode 100644 index f15c7db9c203..000000000000 --- a/tests/run-pass/generator_control_flow.rs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(generators, generator_trait)] - -use std::ops::{GeneratorState, Generator}; - -fn finish(mut amt: usize, mut t: T) -> T::Return - where T: Generator -{ - loop { - match t.resume() { - GeneratorState::Yielded(()) => amt -= 1, - GeneratorState::Complete(ret) => { - assert_eq!(amt, 0); - return ret - } - } - } - -} - -fn main() { - finish(1, || yield); - finish(3, || { - let mut x = 0; - yield; - x += 1; - yield; - x += 1; - yield; - assert_eq!(x, 2); - }); - finish(8, || { - for _ in 0..8 { - yield; - } - }); - finish(1, || { - if true { - yield; - } else { - } - }); - finish(1, || { - if false { - } else { - yield; - } - }); - finish(2, || { - if { yield; false } { - yield; - panic!() - } - yield - }); -} diff --git a/tests/run-pass/intrinsics-integer.rs b/tests/run-pass/intrinsics-integer.rs deleted file mode 100644 index 4896f02da20b..000000000000 --- a/tests/run-pass/intrinsics-integer.rs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(intrinsics)] - -mod rusti { - extern "rust-intrinsic" { - pub fn ctpop(x: T) -> T; - pub fn ctlz(x: T) -> T; - pub fn ctlz_nonzero(x: T) -> T; - pub fn cttz(x: T) -> T; - pub fn cttz_nonzero(x: T) -> T; - pub fn bswap(x: T) -> T; - } -} - -pub fn main() { - unsafe { - use rusti::*; - - assert_eq!(ctpop(0u8), 0); assert_eq!(ctpop(0i8), 0); - assert_eq!(ctpop(0u16), 0); assert_eq!(ctpop(0i16), 0); - assert_eq!(ctpop(0u32), 0); assert_eq!(ctpop(0i32), 0); - assert_eq!(ctpop(0u64), 0); assert_eq!(ctpop(0i64), 0); - - assert_eq!(ctpop(1u8), 1); assert_eq!(ctpop(1i8), 1); - assert_eq!(ctpop(1u16), 1); assert_eq!(ctpop(1i16), 1); - assert_eq!(ctpop(1u32), 1); assert_eq!(ctpop(1i32), 1); - assert_eq!(ctpop(1u64), 1); assert_eq!(ctpop(1i64), 1); - - assert_eq!(ctpop(10u8), 2); assert_eq!(ctpop(10i8), 2); - assert_eq!(ctpop(10u16), 2); assert_eq!(ctpop(10i16), 2); - assert_eq!(ctpop(10u32), 2); assert_eq!(ctpop(10i32), 2); - assert_eq!(ctpop(10u64), 2); assert_eq!(ctpop(10i64), 2); - - assert_eq!(ctpop(100u8), 3); assert_eq!(ctpop(100i8), 3); - assert_eq!(ctpop(100u16), 3); assert_eq!(ctpop(100i16), 3); - assert_eq!(ctpop(100u32), 3); assert_eq!(ctpop(100i32), 3); - assert_eq!(ctpop(100u64), 3); assert_eq!(ctpop(100i64), 3); - - assert_eq!(ctpop(-1i8 as u8), 8); assert_eq!(ctpop(-1i8), 8); - assert_eq!(ctpop(-1i16 as u16), 16); assert_eq!(ctpop(-1i16), 16); - assert_eq!(ctpop(-1i32 as u32), 32); assert_eq!(ctpop(-1i32), 32); - assert_eq!(ctpop(-1i64 as u64), 64); assert_eq!(ctpop(-1i64), 64); - - assert_eq!(ctlz(0u8), 8); assert_eq!(ctlz(0i8), 8); - assert_eq!(ctlz(0u16), 16); assert_eq!(ctlz(0i16), 16); - assert_eq!(ctlz(0u32), 32); assert_eq!(ctlz(0i32), 32); - assert_eq!(ctlz(0u64), 64); assert_eq!(ctlz(0i64), 64); - - assert_eq!(ctlz(1u8), 7); assert_eq!(ctlz(1i8), 7); - assert_eq!(ctlz(1u16), 15); assert_eq!(ctlz(1i16), 15); - assert_eq!(ctlz(1u32), 31); assert_eq!(ctlz(1i32), 31); - assert_eq!(ctlz(1u64), 63); assert_eq!(ctlz(1i64), 63); - - assert_eq!(ctlz(10u8), 4); assert_eq!(ctlz(10i8), 4); - assert_eq!(ctlz(10u16), 12); assert_eq!(ctlz(10i16), 12); - assert_eq!(ctlz(10u32), 28); assert_eq!(ctlz(10i32), 28); - assert_eq!(ctlz(10u64), 60); assert_eq!(ctlz(10i64), 60); - - assert_eq!(ctlz(100u8), 1); assert_eq!(ctlz(100i8), 1); - assert_eq!(ctlz(100u16), 9); assert_eq!(ctlz(100i16), 9); - assert_eq!(ctlz(100u32), 25); assert_eq!(ctlz(100i32), 25); - assert_eq!(ctlz(100u64), 57); assert_eq!(ctlz(100i64), 57); - - assert_eq!(ctlz_nonzero(1u8), 7); assert_eq!(ctlz_nonzero(1i8), 7); - assert_eq!(ctlz_nonzero(1u16), 15); assert_eq!(ctlz_nonzero(1i16), 15); - assert_eq!(ctlz_nonzero(1u32), 31); assert_eq!(ctlz_nonzero(1i32), 31); - assert_eq!(ctlz_nonzero(1u64), 63); assert_eq!(ctlz_nonzero(1i64), 63); - - assert_eq!(ctlz_nonzero(10u8), 4); assert_eq!(ctlz_nonzero(10i8), 4); - assert_eq!(ctlz_nonzero(10u16), 12); assert_eq!(ctlz_nonzero(10i16), 12); - assert_eq!(ctlz_nonzero(10u32), 28); assert_eq!(ctlz_nonzero(10i32), 28); - assert_eq!(ctlz_nonzero(10u64), 60); assert_eq!(ctlz_nonzero(10i64), 60); - - assert_eq!(ctlz_nonzero(100u8), 1); assert_eq!(ctlz_nonzero(100i8), 1); - assert_eq!(ctlz_nonzero(100u16), 9); assert_eq!(ctlz_nonzero(100i16), 9); - assert_eq!(ctlz_nonzero(100u32), 25); assert_eq!(ctlz_nonzero(100i32), 25); - assert_eq!(ctlz_nonzero(100u64), 57); assert_eq!(ctlz_nonzero(100i64), 57); - - assert_eq!(cttz(-1i8 as u8), 0); assert_eq!(cttz(-1i8), 0); - assert_eq!(cttz(-1i16 as u16), 0); assert_eq!(cttz(-1i16), 0); - assert_eq!(cttz(-1i32 as u32), 0); assert_eq!(cttz(-1i32), 0); - assert_eq!(cttz(-1i64 as u64), 0); assert_eq!(cttz(-1i64), 0); - - assert_eq!(cttz(0u8), 8); assert_eq!(cttz(0i8), 8); - assert_eq!(cttz(0u16), 16); assert_eq!(cttz(0i16), 16); - assert_eq!(cttz(0u32), 32); assert_eq!(cttz(0i32), 32); - assert_eq!(cttz(0u64), 64); assert_eq!(cttz(0i64), 64); - - assert_eq!(cttz(1u8), 0); assert_eq!(cttz(1i8), 0); - assert_eq!(cttz(1u16), 0); assert_eq!(cttz(1i16), 0); - assert_eq!(cttz(1u32), 0); assert_eq!(cttz(1i32), 0); - assert_eq!(cttz(1u64), 0); assert_eq!(cttz(1i64), 0); - - assert_eq!(cttz(10u8), 1); assert_eq!(cttz(10i8), 1); - assert_eq!(cttz(10u16), 1); assert_eq!(cttz(10i16), 1); - assert_eq!(cttz(10u32), 1); assert_eq!(cttz(10i32), 1); - assert_eq!(cttz(10u64), 1); assert_eq!(cttz(10i64), 1); - - assert_eq!(cttz(100u8), 2); assert_eq!(cttz(100i8), 2); - assert_eq!(cttz(100u16), 2); assert_eq!(cttz(100i16), 2); - assert_eq!(cttz(100u32), 2); assert_eq!(cttz(100i32), 2); - assert_eq!(cttz(100u64), 2); assert_eq!(cttz(100i64), 2); - - assert_eq!(cttz_nonzero(-1i8 as u8), 0); assert_eq!(cttz_nonzero(-1i8), 0); - assert_eq!(cttz_nonzero(-1i16 as u16), 0); assert_eq!(cttz_nonzero(-1i16), 0); - assert_eq!(cttz_nonzero(-1i32 as u32), 0); assert_eq!(cttz_nonzero(-1i32), 0); - assert_eq!(cttz_nonzero(-1i64 as u64), 0); assert_eq!(cttz_nonzero(-1i64), 0); - - assert_eq!(cttz_nonzero(1u8), 0); assert_eq!(cttz_nonzero(1i8), 0); - assert_eq!(cttz_nonzero(1u16), 0); assert_eq!(cttz_nonzero(1i16), 0); - assert_eq!(cttz_nonzero(1u32), 0); assert_eq!(cttz_nonzero(1i32), 0); - assert_eq!(cttz_nonzero(1u64), 0); assert_eq!(cttz_nonzero(1i64), 0); - - assert_eq!(cttz_nonzero(10u8), 1); assert_eq!(cttz_nonzero(10i8), 1); - assert_eq!(cttz_nonzero(10u16), 1); assert_eq!(cttz_nonzero(10i16), 1); - assert_eq!(cttz_nonzero(10u32), 1); assert_eq!(cttz_nonzero(10i32), 1); - assert_eq!(cttz_nonzero(10u64), 1); assert_eq!(cttz_nonzero(10i64), 1); - - assert_eq!(cttz_nonzero(100u8), 2); assert_eq!(cttz_nonzero(100i8), 2); - assert_eq!(cttz_nonzero(100u16), 2); assert_eq!(cttz_nonzero(100i16), 2); - assert_eq!(cttz_nonzero(100u32), 2); assert_eq!(cttz_nonzero(100i32), 2); - assert_eq!(cttz_nonzero(100u64), 2); assert_eq!(cttz_nonzero(100i64), 2); - - assert_eq!(bswap(0x0Au8), 0x0A); // no-op - assert_eq!(bswap(0x0Ai8), 0x0A); // no-op - assert_eq!(bswap(0x0A0Bu16), 0x0B0A); - assert_eq!(bswap(0x0A0Bi16), 0x0B0A); - assert_eq!(bswap(0x0ABBCC0Du32), 0x0DCCBB0A); - assert_eq!(bswap(0x0ABBCC0Di32), 0x0DCCBB0A); - assert_eq!(bswap(0x0122334455667708u64), 0x0877665544332201); - assert_eq!(bswap(0x0122334455667708i64), 0x0877665544332201); - } -} diff --git a/tests/run-pass/intrinsics-math.rs b/tests/run-pass/intrinsics-math.rs deleted file mode 100644 index a2c55634749c..000000000000 --- a/tests/run-pass/intrinsics-math.rs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -macro_rules! assert_approx_eq { - ($a:expr, $b:expr) => ({ - let (a, b) = (&$a, &$b); - assert!((*a - *b).abs() < 1.0e-6, - "{} is not approximately equal to {}", *a, *b); - }) -} - -pub fn main() { - use std::f32; - use std::f64; - - assert_approx_eq!(64f32.sqrt(), 8f32); - assert_approx_eq!(64f64.sqrt(), 8f64); - - assert_approx_eq!(25f32.powi(-2), 0.0016f32); - assert_approx_eq!(23.2f64.powi(2), 538.24f64); - - assert_approx_eq!(0f32.sin(), 0f32); - assert_approx_eq!((f64::consts::PI / 2f64).sin(), 1f64); - - assert_approx_eq!(0f32.cos(), 1f32); - assert_approx_eq!((f64::consts::PI * 2f64).cos(), 1f64); - - assert_approx_eq!(25f32.powf(-2f32), 0.0016f32); - assert_approx_eq!(400f64.powf(0.5f64), 20f64); - - assert_approx_eq!((1f32.exp() - f32::consts::E).abs(), 0f32); - assert_approx_eq!(1f64.exp(), f64::consts::E); - - assert_approx_eq!(10f32.exp2(), 1024f32); - assert_approx_eq!(50f64.exp2(), 1125899906842624f64); - - assert_approx_eq!((f32::consts::E.ln() - 1f32).abs(), 0f32); - assert_approx_eq!(1f64.ln(), 0f64); - - assert_approx_eq!(10f32.log10(), 1f32); - assert_approx_eq!(f64::consts::E.log10(), f64::consts::LOG10_E); - - assert_approx_eq!(8f32.log2(), 3f32); - assert_approx_eq!(f64::consts::E.log2(), f64::consts::LOG2_E); - - assert_approx_eq!(1.0f32.mul_add(2.0f32, 5.0f32), 7.0f32); - assert_approx_eq!(0.0f64.mul_add(-2.0f64, f64::consts::E), f64::consts::E); - - assert_approx_eq!((-1.0f32).abs(), 1.0f32); - assert_approx_eq!(34.2f64.abs(), 34.2f64); - - assert_approx_eq!(3.8f32.floor(), 3.0f32); - assert_approx_eq!((-1.1f64).floor(), -2.0f64); - - assert_approx_eq!((-2.3f32).ceil(), -2.0f32); - assert_approx_eq!(3.8f64.ceil(), 4.0f64); - - assert_approx_eq!(0.1f32.trunc(), 0.0f32); - assert_approx_eq!((-0.1f64).trunc(), 0.0f64); -} diff --git a/tests/run-pass/intrinsics.rs b/tests/run-pass/intrinsics.rs deleted file mode 100755 index 3152737a601c..000000000000 --- a/tests/run-pass/intrinsics.rs +++ /dev/null @@ -1,10 +0,0 @@ -use std::mem::{size_of, size_of_val}; - -fn main() { - assert_eq!(size_of::>(), 8); - assert_eq!(size_of_val(&()), 0); - assert_eq!(size_of_val(&42), 4); - assert_eq!(size_of_val(&[] as &[i32]), 0); - assert_eq!(size_of_val(&[1, 2, 3] as &[i32]), 12); - assert_eq!(size_of_val("foobar"), 6); -} diff --git a/tests/run-pass/ints.rs b/tests/run-pass/ints.rs deleted file mode 100644 index 4f23b5ec9c38..000000000000 --- a/tests/run-pass/ints.rs +++ /dev/null @@ -1,58 +0,0 @@ -fn ret() -> i64 { - 1 -} - -fn neg() -> i64 { - -1 -} - -fn add() -> i64 { - 1 + 2 -} - -fn indirect_add() -> i64 { - let x = 1; - let y = 2; - x + y -} - -fn arith() -> i32 { - 3*3 + 4*4 -} - -fn match_int() -> i16 { - let n = 2; - match n { - 0 => 0, - 1 => 10, - 2 => 20, - 3 => 30, - _ => 100, - } -} - -fn match_int_range() -> i64 { - let n = 42; - match n { - 0...9 => 0, - 10...19 => 1, - 20...29 => 2, - 30...39 => 3, - 40...49 => 4, - _ => 5, - } -} - -fn main() { - assert_eq!(ret(), 1); - assert_eq!(neg(), -1); - assert_eq!(add(), 3); - assert_eq!(indirect_add(), 3); - assert_eq!(arith(), 5*5); - assert_eq!(match_int(), 20); - assert_eq!(match_int_range(), 4); - assert_eq!(i64::min_value().overflowing_mul(-1), (i64::min_value(), true)); - assert_eq!(i32::min_value().overflowing_mul(-1), (i32::min_value(), true)); - assert_eq!(i16::min_value().overflowing_mul(-1), (i16::min_value(), true)); - assert_eq!(i8::min_value().overflowing_mul(-1), (i8::min_value(), true)); -} diff --git a/tests/run-pass/issue-15063.rs b/tests/run-pass/issue-15063.rs deleted file mode 100644 index 726aee283e29..000000000000 --- a/tests/run-pass/issue-15063.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(dead_code)] - -enum Two { A, B } -impl Drop for Two { - fn drop(&mut self) { - } -} -fn main() { - let _k = Two::A; -} diff --git a/tests/run-pass/issue-15523-big.rs b/tests/run-pass/issue-15523-big.rs deleted file mode 100644 index 33c81cab3817..000000000000 --- a/tests/run-pass/issue-15523-big.rs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Issue 15523: derive(PartialOrd) should use the provided -// discriminant values for the derived ordering. -// -// This test is checking corner cases that arise when you have -// 64-bit values in the variants. - -#[derive(PartialEq, PartialOrd)] -#[repr(u64)] -enum Eu64 { - Pos2 = 2, - PosMax = !0, - Pos1 = 1, -} - -#[derive(PartialEq, PartialOrd)] -#[repr(i64)] -enum Ei64 { - Pos2 = 2, - Neg1 = -1, - NegMin = 1 << 63, - PosMax = !(1 << 63), - Pos1 = 1, -} - -fn main() { - assert!(Eu64::Pos2 > Eu64::Pos1); - assert!(Eu64::Pos2 < Eu64::PosMax); - assert!(Eu64::Pos1 < Eu64::PosMax); - - - assert!(Ei64::Pos2 > Ei64::Pos1); - assert!(Ei64::Pos2 > Ei64::Neg1); - assert!(Ei64::Pos1 > Ei64::Neg1); - assert!(Ei64::Pos2 > Ei64::NegMin); - assert!(Ei64::Pos1 > Ei64::NegMin); - assert!(Ei64::Pos2 < Ei64::PosMax); - assert!(Ei64::Pos1 < Ei64::PosMax); -} diff --git a/tests/run-pass/issue-17877.rs b/tests/run-pass/issue-17877.rs deleted file mode 100644 index b4b74b9905fb..000000000000 --- a/tests/run-pass/issue-17877.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-msvc - -#![feature(slice_patterns)] - -fn main() { - assert_eq!(match [0u8; 1024] { - _ => 42_usize, - }, 42_usize); - - assert_eq!(match [0u8; 1024] { - [1, _..] => 0_usize, - [0, _..] => 1_usize, - _ => 2_usize - }, 1_usize); -} diff --git a/tests/run-pass/issue-20575.rs b/tests/run-pass/issue-20575.rs deleted file mode 100644 index 7db7e3b28e8e..000000000000 --- a/tests/run-pass/issue-20575.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Test that overloaded calls work with zero arity closures - -// pretty-expanded FIXME #23616 - -fn main() { - let functions: [Box Option<()>>; 1] = [Box::new(|| None)]; - - let _: Option> = functions.iter().map(|f| (*f)()).collect(); -} diff --git a/tests/run-pass/issue-23261.rs b/tests/run-pass/issue-23261.rs deleted file mode 100644 index fc806f5429a4..000000000000 --- a/tests/run-pass/issue-23261.rs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Matching on a DST struct should not trigger an LLVM assertion. - -struct Foo { - a: i32, - inner: T -} - -trait Get { - fn get(&self) -> i32; -} - -impl Get for i32 { - fn get(&self) -> i32 { - *self - } -} - -fn check_val(val: &Foo<[u8]>) { - match *val { - Foo { a, .. } => { - assert_eq!(a, 32); - } - } -} - -fn check_dst_val(val: &Foo<[u8]>) { - match *val { - Foo { ref inner, .. } => { - assert_eq!(inner, [1, 2, 3]); - } - } -} - -fn check_both(val: &Foo<[u8]>) { - match *val { - Foo { a, ref inner } => { - assert_eq!(a, 32); - assert_eq!(inner, [1, 2, 3]); - } - } -} - -fn check_trait_obj(val: &Foo) { - match *val { - Foo { a, ref inner } => { - assert_eq!(a, 32); - assert_eq!(inner.get(), 32); - } - } -} - -fn main() { - let foo: &Foo<[u8]> = &Foo { a: 32, inner: [1, 2, 3] }; - check_val(foo); - check_dst_val(foo); - check_both(foo); - - let foo: &Foo = &Foo { a: 32, inner: 32 }; - check_trait_obj(foo); -} diff --git a/tests/run-pass/issue-26709.rs b/tests/run-pass/issue-26709.rs deleted file mode 100644 index 62626d75865c..000000000000 --- a/tests/run-pass/issue-26709.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -struct Wrapper<'a, T: ?Sized>(&'a mut i32, T); - -impl<'a, T: ?Sized> Drop for Wrapper<'a, T> { - fn drop(&mut self) { - *self.0 = 432; - } -} - -fn main() { - let mut x = 0; - { - let wrapper = Box::new(Wrapper(&mut x, 123)); - let _: Box> = wrapper; - } - assert_eq!(432, x) -} diff --git a/tests/run-pass/issue-27901.rs b/tests/run-pass/issue-27901.rs deleted file mode 100644 index b7a9daaf8abd..000000000000 --- a/tests/run-pass/issue-27901.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -trait Stream { type Item; } -impl<'a> Stream for &'a str { type Item = u8; } -fn f<'s>(s: &'s str) -> (&'s str, <&'s str as Stream>::Item) { - (s, 42) -} - -fn main() { - let fx = f as for<'t> fn(&'t str) -> (&'t str, <&'t str as Stream>::Item); - assert_eq!(fx("hi"), ("hi", 42)); -} diff --git a/tests/run-pass/issue-29746.rs b/tests/run-pass/issue-29746.rs deleted file mode 100644 index 61c601ac6a90..000000000000 --- a/tests/run-pass/issue-29746.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// zip!(a1,a2,a3,a4) is equivalent to: -// a1.zip(a2).zip(a3).zip(a4).map(|(((x1,x2),x3),x4)| (x1,x2,x3,x4)) -macro_rules! zip { - // Entry point - ([$a:expr, $b:expr, $($rest:expr),*]) => { - zip!([$($rest),*], $a.zip($b), (x,y), [x,y]) - }; - - // Intermediate steps to build the zipped expression, the match pattern, and - // and the output tuple of the closure, using macro hygene to repeatedly - // introduce new variables named 'x'. - ([$a:expr, $($rest:expr),*], $zip:expr, $pat:pat, [$($flat:expr),*]) => { - zip!([$($rest),*], $zip.zip($a), ($pat,x), [$($flat),*, x]) - }; - - // Final step - ([], $zip:expr, $pat:pat, [$($flat:expr),+]) => { - $zip.map(|$pat| ($($flat),+)) - }; - - // Comma - ([$a:expr], $zip:expr, $pat:pat, [$($flat:expr),*]) => { - zip!([$a,], $zip, $pat, [$($flat),*]) - }; -} - -fn main() { - let p1 = vec![1i32, 2].into_iter(); - let p2 = vec!["10", "20"].into_iter(); - let p3 = vec![100u16, 200].into_iter(); - let p4 = vec![1000i64, 2000].into_iter(); - - let e = zip!([p1,p2,p3,p4]).collect::>(); - assert_eq!(e[0], (1i32,"10",100u16,1000i64)); -} diff --git a/tests/run-pass/issue-30530.rs b/tests/run-pass/issue-30530.rs deleted file mode 100644 index d5139c908bda..000000000000 --- a/tests/run-pass/issue-30530.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Regression test for Issue #30530: alloca's created for storing -// intermediate scratch values during brace-less match arms need to be -// initialized with their drop-flag set to "dropped" (or else we end -// up running the destructors on garbage data at the end of the -// function). - -pub enum Handler { - Default, - #[allow(dead_code)] - Custom(*mut Box), -} - -fn main() { - take(Handler::Default, Box::new(main)); -} - -#[inline(never)] -pub fn take(h: Handler, f: Box) -> Box { - unsafe { - match h { - Handler::Custom(ptr) => *Box::from_raw(ptr), - Handler::Default => f, - } - } -} diff --git a/tests/run-pass/issue-31267-additional.rs b/tests/run-pass/issue-31267-additional.rs deleted file mode 100644 index 14e38f43c527..000000000000 --- a/tests/run-pass/issue-31267-additional.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(unused_variables)] - -#[derive(Clone, Copy, Debug)] -struct Bar; - -const BAZ: Bar = Bar; - -#[derive(Debug)] -struct Foo([Bar; 1]); - -struct Biz; - -impl Biz { - const BAZ: Foo = Foo([BAZ; 1]); -} - -fn main() { - let foo = Biz::BAZ; -} diff --git a/tests/run-pass/issue-33387.rs b/tests/run-pass/issue-33387.rs deleted file mode 100644 index edbf2b81ce94..000000000000 --- a/tests/run-pass/issue-33387.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::sync::Arc; - -trait Foo {} - -impl Foo for [u8; 2] {} - -fn main() { - let _: Arc = Arc::new([3, 4]); -} diff --git a/tests/run-pass/issue-34571.rs b/tests/run-pass/issue-34571.rs deleted file mode 100644 index 7d8041565765..000000000000 --- a/tests/run-pass/issue-34571.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[repr(u8)] -enum Foo { - Foo(u8), -} - -fn main() { - match Foo::Foo(1) { - _ => () - } -} diff --git a/tests/run-pass/issue-35815.rs b/tests/run-pass/issue-35815.rs deleted file mode 100644 index 216e06c0732c..000000000000 --- a/tests/run-pass/issue-35815.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(dead_code)] - -use std::mem; - -struct Foo { - a: i64, - b: bool, - c: T, -} - -fn main() { - let foo: &Foo = &Foo { a: 1, b: false, c: 2i32 }; - let foo_unsized: &Foo = foo; - assert_eq!(mem::size_of_val(foo), mem::size_of_val(foo_unsized)); -} diff --git a/tests/run-pass/issue-36278-prefix-nesting.rs b/tests/run-pass/issue-36278-prefix-nesting.rs deleted file mode 100644 index 95269d0569de..000000000000 --- a/tests/run-pass/issue-36278-prefix-nesting.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Issue 36278: On an unsized struct with >1 level of nontrivial -// nesting, ensure we are computing dynamic size of prefix correctly. - -use std::mem; - -const SZ: usize = 100; -struct P([u8; SZ], T); - -type Ack = P>; - -fn main() { - let size_of_sized; let size_of_unsized; - let x: Box> = Box::new(P([0; SZ], P([0; SZ], [0; 0]))); - size_of_sized = mem::size_of_val::>(&x); - let y: Box> = x; - size_of_unsized = mem::size_of_val::>(&y); - assert_eq!(size_of_sized, size_of_unsized); -} diff --git a/tests/run-pass/issue-5917.rs b/tests/run-pass/issue-5917.rs deleted file mode 100644 index 69b95f2cd7e1..000000000000 --- a/tests/run-pass/issue-5917.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -struct T (&'static [isize]); -static STATIC : T = T (&[5, 4, 3]); -pub fn main () { - let T(ref v) = STATIC; - assert_eq!(v[0], 5); -} diff --git a/tests/run-pass/issue-miri-184.rs b/tests/run-pass/issue-miri-184.rs deleted file mode 100644 index 24775fe8a2d9..000000000000 --- a/tests/run-pass/issue-miri-184.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub fn main() { - let bytes: [u8; 8] = unsafe { ::std::mem::transmute(0u64) }; - let _: &[u8] = &bytes; -} diff --git a/tests/run-pass/iter_slice.rs b/tests/run-pass/iter_slice.rs deleted file mode 100644 index fd7229c3455e..000000000000 --- a/tests/run-pass/iter_slice.rs +++ /dev/null @@ -1,12 +0,0 @@ -fn main() { - for _ in Vec::::new().iter() { // this iterates over a Unique::empty() - panic!("We should never be here."); - } - - // Iterate over a ZST (uses arith_offset internally) - let mut count = 0; - for _ in &[(), (), ()] { - count += 1; - } - assert_eq!(count, 3); -} diff --git a/tests/run-pass/last-use-in-cap-clause.rs b/tests/run-pass/last-use-in-cap-clause.rs deleted file mode 100644 index de2d815ca54e..000000000000 --- a/tests/run-pass/last-use-in-cap-clause.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Make sure #1399 stays fixed - -#[allow(dead_code)] -struct A { a: Box } - -fn foo() -> Box isize + 'static> { - let k: Box<_> = Box::new(22); - let _u = A {a: k.clone()}; - let result = || 22; - Box::new(result) -} - -pub fn main() { - assert_eq!(foo()(), 22); -} diff --git a/tests/run-pass/loops.rs b/tests/run-pass/loops.rs deleted file mode 100644 index 222287cbe09a..000000000000 --- a/tests/run-pass/loops.rs +++ /dev/null @@ -1,35 +0,0 @@ -fn factorial_loop() -> i64 { - let mut product = 1; - let mut i = 1; - - while i <= 10 { - product *= i; - i += 1; - } - - product -} - -fn index_for_loop() -> usize { - let mut sum = 0; - let a = [0, 10, 20, 30]; - for i in 0..a.len() { - sum += a[i]; - } - sum -} - -fn for_loop() -> usize { - let mut sum = 0; - let a = [0, 10, 20, 30]; - for &n in &a { - sum += n; - } - sum -} - -fn main() { - assert_eq!(factorial_loop(), 3628800); - assert_eq!(index_for_loop(), 60); - assert_eq!(for_loop(), 60); -} diff --git a/tests/run-pass/main_fn.rs b/tests/run-pass/main_fn.rs deleted file mode 100644 index 91d183ee6af7..000000000000 --- a/tests/run-pass/main_fn.rs +++ /dev/null @@ -1,5 +0,0 @@ -#![feature(main)] - -#[main] -fn foo() { -} diff --git a/tests/run-pass/many_shr_bor.rs b/tests/run-pass/many_shr_bor.rs deleted file mode 100644 index 393bafebfe4d..000000000000 --- a/tests/run-pass/many_shr_bor.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Make sure validation can handle many overlapping shared borrows for different parts of a data structure -#![allow(unused_variables)] -use std::cell::RefCell; - -struct Test { - a: u32, - b: u32, -} - -fn test1() { - let t = &mut Test { a: 0, b: 0 }; - { - let x; - { - let y = &t.a; - x = &t; - let _y = *y; - } - let _x = x.a; - } - t.b = 42; -} - -fn test2(r: &mut RefCell) { - let x = &*r; // releasing write lock, first suspension recorded - let mut x_ref = x.borrow_mut(); - let x_inner : &mut i32 = &mut *x_ref; // new inner write lock, with same lifetime as outer lock - let x_inner_shr = &*x_inner; // releasing inner write lock, recording suspension - let y = &*r; // second suspension for the outer write lock - let x_inner_shr2 = &*x_inner; // 2nd suspension for inner write lock -} - -fn main() { - test1(); - test2(&mut RefCell::new(0)); -} diff --git a/tests/run-pass/match_slice.rs b/tests/run-pass/match_slice.rs deleted file mode 100644 index 568a1a1c8818..000000000000 --- a/tests/run-pass/match_slice.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() { - let x = "hello"; - match x { - "foo" => {}, - "bar" => {}, - _ => {}, - } -} diff --git a/tests/run-pass/mir_coercions.rs b/tests/run-pass/mir_coercions.rs deleted file mode 100644 index 36155297e32f..000000000000 --- a/tests/run-pass/mir_coercions.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(coerce_unsized, unsize)] - -use std::ops::CoerceUnsized; -use std::marker::Unsize; - -fn identity_coercion(x: &(Fn(u32)->u32 + Send)) -> &Fn(u32)->u32 { - x -} -fn fn_coercions(f: &fn(u32) -> u32) -> - (unsafe fn(u32) -> u32, - &(Fn(u32) -> u32+Send)) -{ - (*f, f) -} - -fn simple_array_coercion(x: &[u8; 3]) -> &[u8] { x } - -fn square(a: u32) -> u32 { a * a } - -#[derive(PartialEq,Eq)] -struct PtrWrapper<'a, T: 'a+?Sized>(u32, u32, (), &'a T); -impl<'a, T: ?Sized+Unsize, U: ?Sized> - CoerceUnsized> for PtrWrapper<'a, T> {} - -struct TrivPtrWrapper<'a, T: 'a+?Sized>(&'a T); -impl<'a, T: ?Sized+Unsize, U: ?Sized> - CoerceUnsized> for TrivPtrWrapper<'a, T> {} - -fn coerce_ptr_wrapper(p: PtrWrapper<[u8; 3]>) -> PtrWrapper<[u8]> { - p -} - -fn coerce_triv_ptr_wrapper(p: TrivPtrWrapper<[u8; 3]>) -> TrivPtrWrapper<[u8]> { - p -} - -fn coerce_fat_ptr_wrapper(p: PtrWrapper u32+Send>) - -> PtrWrapper u32> { - p -} - -fn coerce_ptr_wrapper_poly<'a, T, Trait: ?Sized>(p: PtrWrapper<'a, T>) - -> PtrWrapper<'a, Trait> - where PtrWrapper<'a, T>: CoerceUnsized> -{ - p -} - -fn main() { - let a = [0,1,2]; - let square_local : fn(u32) -> u32 = square; - let (f,g) = fn_coercions(&square_local); - assert_eq!(f as *const (), square as *const()); - assert_eq!(g(4), 16); - assert_eq!(identity_coercion(g)(5), 25); - - assert_eq!(simple_array_coercion(&a), &a); - let w = coerce_ptr_wrapper(PtrWrapper(2,3,(),&a)); - assert!(w == PtrWrapper(2,3,(),&a) as PtrWrapper<[u8]>); - - let w = coerce_triv_ptr_wrapper(TrivPtrWrapper(&a)); - assert_eq!(&w.0, &a); - - let z = coerce_fat_ptr_wrapper(PtrWrapper(2,3,(),&square_local)); - assert_eq!((z.3)(6), 36); - - let z: PtrWrapper u32> = - coerce_ptr_wrapper_poly(PtrWrapper(2,3,(),&square_local)); - assert_eq!((z.3)(6), 36); -} diff --git a/tests/run-pass/mir_fat_ptr.rs b/tests/run-pass/mir_fat_ptr.rs deleted file mode 100644 index e5c9e3577d1c..000000000000 --- a/tests/run-pass/mir_fat_ptr.rs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// test that ordinary fat pointer operations work. - -struct Wrapper(u32, T); - -struct FatPtrContainer<'a> { - ptr: &'a [u8] -} - -fn fat_ptr_project(a: &Wrapper<[u8]>) -> &[u8] { - &a.1 -} - -fn fat_ptr_simple(a: &[u8]) -> &[u8] { - a -} - -fn fat_ptr_via_local(a: &[u8]) -> &[u8] { - let x = a; - x -} - -fn fat_ptr_from_struct(s: FatPtrContainer) -> &[u8] { - s.ptr -} - -fn fat_ptr_to_struct(a: &[u8]) -> FatPtrContainer { - FatPtrContainer { ptr: a } -} - -fn fat_ptr_store_to<'a>(a: &'a [u8], b: &mut &'a [u8]) { - *b = a; -} - -fn fat_ptr_constant() -> &'static str { - "HELLO" -} - -fn main() { - let a = Wrapper(4, [7,6,5]); - - let p = fat_ptr_project(&a); - let p = fat_ptr_simple(p); - let p = fat_ptr_via_local(p); - let p = fat_ptr_from_struct(fat_ptr_to_struct(p)); - - let mut target : &[u8] = &[42]; - fat_ptr_store_to(p, &mut target); - assert_eq!(target, &a.1); - - assert_eq!(fat_ptr_constant(), "HELLO"); -} diff --git a/tests/run-pass/miri-issue-133.rs b/tests/run-pass/miri-issue-133.rs deleted file mode 100644 index 406b5e102c8b..000000000000 --- a/tests/run-pass/miri-issue-133.rs +++ /dev/null @@ -1,30 +0,0 @@ -use std::mem::size_of; - -struct S { - _u: U, - size_of_u: usize, - _v: V, - size_of_v: usize -} - -impl S { - fn new(u: U, v: V) -> Self { - S { - _u: u, - size_of_u: size_of::(), - _v: v, - size_of_v: size_of::() - } - } -} - -impl Drop for S { - fn drop(&mut self) { - assert_eq!(size_of::(), self.size_of_u); - assert_eq!(size_of::(), self.size_of_v); - } -} - -fn main() { - S::new(0u8, 1u16); -} diff --git a/tests/run-pass/move-arg-3-unique.rs b/tests/run-pass/move-arg-3-unique.rs deleted file mode 100644 index 2e6320eb8025..000000000000 --- a/tests/run-pass/move-arg-3-unique.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(unused_features, unused_variables)] -#![feature(box_syntax)] - -pub fn main() { - let x = box 10; - let y = x; - assert_eq!(*y, 10); -} diff --git a/tests/run-pass/move-undef-primval.rs b/tests/run-pass/move-undef-primval.rs deleted file mode 100644 index 2c18c2d3687a..000000000000 --- a/tests/run-pass/move-undef-primval.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Moving around undef is not allowed by validation -// compile-flags: -Zmir-emit-validate=0 - -struct Foo { - _inner: i32, -} - -fn main() { - unsafe { - let foo = Foo { - _inner: std::mem::uninitialized(), - }; - let _bar = foo; - } -} diff --git a/tests/run-pass/multi_arg_closure.rs b/tests/run-pass/multi_arg_closure.rs deleted file mode 100644 index 30cfb5b685b2..000000000000 --- a/tests/run-pass/multi_arg_closure.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn foo(f: &mut FnMut(isize, isize) -> isize) -> isize { - f(1, 2) -} - -fn main() { - let z = foo(&mut |x, y| x * 10 + y); - assert_eq!(z, 12); -} diff --git a/tests/run-pass/negative_discriminant.rs b/tests/run-pass/negative_discriminant.rs deleted file mode 100644 index 16f175e7dfc8..000000000000 --- a/tests/run-pass/negative_discriminant.rs +++ /dev/null @@ -1,13 +0,0 @@ -enum AB { A = -1, B = 1 } - -fn main() { - match AB::A { - AB::A => (), - AB::B => panic!(), - } - - match AB::B { - AB::A => panic!(), - AB::B => (), - } -} diff --git a/tests/run-pass/non_capture_closure_to_fn_ptr.rs b/tests/run-pass/non_capture_closure_to_fn_ptr.rs deleted file mode 100644 index c9daff9c9f46..000000000000 --- a/tests/run-pass/non_capture_closure_to_fn_ptr.rs +++ /dev/null @@ -1,14 +0,0 @@ -// allow(const_err) to work around a bug in warnings -#[allow(const_err)] -static FOO: fn() = || { assert_ne!(42, 43) }; -#[allow(const_err)] -static BAR: fn(i32, i32) = |a, b| { assert_ne!(a, b) }; - -fn main() { - FOO(); - BAR(44, 45); - let bar: unsafe fn(i32, i32) = BAR; - unsafe { bar(46, 47) }; - let boo: &Fn(i32, i32) = &BAR; - boo(48, 49); -} diff --git a/tests/run-pass/observed_local_mut.rs b/tests/run-pass/observed_local_mut.rs deleted file mode 100644 index a4ecf1e635d2..000000000000 --- a/tests/run-pass/observed_local_mut.rs +++ /dev/null @@ -1,21 +0,0 @@ -// This test is intended to guard against the problem described in commit -// 39bb1254d1eaf74f45a4e741097e33fc942168d5. -// -// As written, it might be considered UB in compiled Rust, but of course Miri gives it a safe, -// deterministic behaviour (one that might not correspond with how an eventual Rust spec would -// defined this). -// -// An alternative way to write the test without `unsafe` would be to use `Cell`, but it would -// only surface the bug described by the above commit if `Cell` on the stack got represented -// as a primitive `PrimVal::I32` which is not yet the case. - -fn main() { - let mut x = 0; - let y: *const i32 = &x; - x = 1; - - // When the described bug is in place, this results in `0`, not observing the `x = 1` line. - assert_eq!(unsafe { *y }, 1); - - assert_eq!(x, 1); -} diff --git a/tests/run-pass/option_box_transmute_ptr.rs b/tests/run-pass/option_box_transmute_ptr.rs deleted file mode 100644 index 0786db1ef895..000000000000 --- a/tests/run-pass/option_box_transmute_ptr.rs +++ /dev/null @@ -1,15 +0,0 @@ -// This tests that the size of Option> is the same as *const i32. -fn option_box_deref() -> i32 { - let val = Some(Box::new(42)); - unsafe { - let ptr: *const i32 = std::mem::transmute::>, *const i32>(val); - let ret = *ptr; - // unleak memory - std::mem::transmute::<*const i32, Option>>(ptr); - ret - } -} - -fn main() { - assert_eq!(option_box_deref(), 42); -} diff --git a/tests/run-pass/option_eq.rs b/tests/run-pass/option_eq.rs deleted file mode 100644 index e698f8767746..000000000000 --- a/tests/run-pass/option_eq.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - assert_eq!(std::char::from_u32('x' as u32), Some('x')); -} diff --git a/tests/run-pass/overloaded-calls-simple.rs b/tests/run-pass/overloaded-calls-simple.rs deleted file mode 100644 index 1eeda12ca06f..000000000000 --- a/tests/run-pass/overloaded-calls-simple.rs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -#![feature(lang_items, unboxed_closures, fn_traits)] - -struct S3 { - x: i32, - y: i32, -} - -impl FnOnce<(i32,i32)> for S3 { - type Output = i32; - extern "rust-call" fn call_once(self, (z,zz): (i32,i32)) -> i32 { - self.x * self.y * z * zz - } -} - -fn main() { - let s = S3 { - x: 3, - y: 3, - }; - let ans = s(3, 1); - assert_eq!(ans, 27); -} diff --git a/tests/run-pass/packed_static.rs b/tests/run-pass/packed_static.rs deleted file mode 100644 index 1fa3a369670b..000000000000 --- a/tests/run-pass/packed_static.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[repr(packed)] -struct Foo { - i: i32 -} - -fn main() { - assert_eq!({FOO.i}, 42); -} - -static FOO: Foo = Foo { i: 42 }; diff --git a/tests/run-pass/packed_struct.rs b/tests/run-pass/packed_struct.rs deleted file mode 100644 index e0387a5f405f..000000000000 --- a/tests/run-pass/packed_struct.rs +++ /dev/null @@ -1,69 +0,0 @@ -// FIXME: We have to disable this, force_allocation fails. -// TODO: I think this can be triggered even without validation. -// compile-flags: -Zmir-emit-validate=0 -#![allow(dead_code)] -#![feature(unsize, coerce_unsized)] - -#[repr(packed)] -struct S { - a: i32, - b: i64, -} - -#[repr(packed)] -struct Test1<'a> { - x: u8, - other: &'a u32, -} - -#[repr(packed)] -struct Test2<'a> { - x: u8, - other: &'a Test1<'a>, -} - -fn test(t: Test2) { - let x = *t.other.other; - assert_eq!(x, 42); -} - -fn test_unsizing() { - #[repr(packed)] - struct UnalignedPtr<'a, T: ?Sized> - where T: 'a, - { - data: &'a T, - } - - impl<'a, T, U> std::ops::CoerceUnsized> for UnalignedPtr<'a, T> - where - T: std::marker::Unsize + ?Sized, - U: ?Sized, - { } - - let arr = [1, 2, 3]; - let arr_unaligned: UnalignedPtr<[i32; 3]> = UnalignedPtr { data: &arr }; - let arr_unaligned: UnalignedPtr<[i32]> = arr_unaligned; - let _unused = &arr_unaligned; // forcing an allocation, which could also yield "unaligned write"-errors -} - -fn main() { - let mut x = S { - a: 42, - b: 99, - }; - let a = x.a; - let b = x.b; - assert_eq!(a, 42); - assert_eq!(b, 99); - // can't do `assert_eq!(x.a, 42)`, because `assert_eq!` takes a reference - assert_eq!({x.a}, 42); - assert_eq!({x.b}, 99); - - x.b = 77; - assert_eq!({x.b}, 77); - - test(Test2 { x: 0, other: &Test1 { x: 0, other: &42 }}); - - test_unsizing(); -} diff --git a/tests/run-pass/pointers.rs b/tests/run-pass/pointers.rs deleted file mode 100644 index f3ae3ab913a3..000000000000 --- a/tests/run-pass/pointers.rs +++ /dev/null @@ -1,60 +0,0 @@ -fn one_line_ref() -> i16 { - *&1 -} - -fn basic_ref() -> i16 { - let x = &1; - *x -} - -fn basic_ref_mut() -> i16 { - let x = &mut 1; - *x += 2; - *x -} - -fn basic_ref_mut_var() -> i16 { - let mut a = 1; - { - let x = &mut a; - *x += 2; - } - a -} - -fn tuple_ref_mut() -> (i8, i8) { - let mut t = (10, 20); - { - let x = &mut t.1; - *x += 2; - } - t -} - -fn match_ref_mut() -> i8 { - let mut t = (20, 22); - { - let opt = Some(&mut t); - match opt { - Some(&mut (ref mut x, ref mut y)) => *x += *y, - None => {}, - } - } - t.0 -} - -fn dangling_pointer() -> *const i32 { - let b = Box::new(42); - &*b as *const i32 -} - -fn main() { - assert_eq!(one_line_ref(), 1); - assert_eq!(basic_ref(), 1); - assert_eq!(basic_ref_mut(), 3); - assert_eq!(basic_ref_mut_var(), 3); - assert_eq!(tuple_ref_mut(), (10, 22)); - assert_eq!(match_ref_mut(), 42); - // FIXME: improve this test... how? - assert!(dangling_pointer() != std::ptr::null()); -} diff --git a/tests/run-pass/products.rs b/tests/run-pass/products.rs deleted file mode 100644 index 86bb71a0be56..000000000000 --- a/tests/run-pass/products.rs +++ /dev/null @@ -1,32 +0,0 @@ -fn tuple() -> (i16,) { - (1,) -} - -fn tuple_2() -> (i16, i16) { - (1, 2) -} - -fn tuple_5() -> (i16, i16, i16, i16, i16) { - (1, 2, 3, 4, 5) -} - -#[derive(Debug, PartialEq)] -struct Pair { x: i8, y: i8 } - -fn pair() -> Pair { - Pair { x: 10, y: 20 } -} - -fn field_access() -> (i8, i8) { - let mut p = Pair { x: 10, y: 20 }; - p.x += 5; - (p.x, p.y) -} - -fn main() { - assert_eq!(tuple(), (1,)); - assert_eq!(tuple_2(), (1, 2)); - assert_eq!(tuple_5(), (1, 2, 3, 4, 5)); - assert_eq!(pair(), Pair { x: 10, y: 20} ); - assert_eq!(field_access(), (15, 20)); -} diff --git a/tests/run-pass/ptr_arith_offset.rs b/tests/run-pass/ptr_arith_offset.rs deleted file mode 100644 index 7912da9fd437..000000000000 --- a/tests/run-pass/ptr_arith_offset.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - let v = [1i16, 2]; - let x = &v as *const i16; - let x = x.wrapping_offset(1); - assert_eq!(unsafe { *x }, 2); -} diff --git a/tests/run-pass/ptr_arith_offset_overflow.rs b/tests/run-pass/ptr_arith_offset_overflow.rs deleted file mode 100644 index 3383c3b80148..000000000000 --- a/tests/run-pass/ptr_arith_offset_overflow.rs +++ /dev/null @@ -1,9 +0,0 @@ -fn main() { - let v = [1i16, 2]; - let x = &v[1] as *const i16; - // Adding 2*isize::max and then 1 is like substracting 1 - let x = x.wrapping_offset(isize::max_value()); - let x = x.wrapping_offset(isize::max_value()); - let x = x.wrapping_offset(1); - assert_eq!(unsafe { *x }, 1); -} diff --git a/tests/run-pass/ptr_int_casts.rs b/tests/run-pass/ptr_int_casts.rs deleted file mode 100644 index b1b06263056d..000000000000 --- a/tests/run-pass/ptr_int_casts.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::mem; - -fn eq_ref(x: &T, y: &T) -> bool { - x as *const _ == y as *const _ -} - -fn f() -> i32 { 42 } - -fn main() { - // int-ptr-int - assert_eq!(1 as *const i32 as usize, 1); - assert_eq!((1 as *const i32).wrapping_offset(4) as usize, 1 + 4*4); - - { // ptr-int-ptr - let x = 13; - let mut y = &x as &_ as *const _ as usize; - y += 13; - y -= 13; - let y = y as *const _; - assert!(eq_ref(&x, unsafe { &*y })); - } - - { // fnptr-int-fnptr - let x : fn() -> i32 = f; - let y : *mut u8 = unsafe { mem::transmute(x as fn() -> i32) }; - let mut y = y as usize; - y += 13; - y -= 13; - let x : fn() -> i32 = unsafe { mem::transmute(y as *mut u8) }; - assert_eq!(x(), 42); - } - - // involving types other than usize - assert_eq!((-1i32) as usize as *const i32 as usize, (-1i32) as usize); -} diff --git a/tests/run-pass/ptr_offset.rs b/tests/run-pass/ptr_offset.rs deleted file mode 100644 index 6add5212db9f..000000000000 --- a/tests/run-pass/ptr_offset.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn main() { - let v = [1i16, 2]; - let x = &v as *const i16; - let x = unsafe { x.offset(1) }; - assert_eq!(unsafe { *x }, 2); -} diff --git a/tests/run-pass/rc.rs b/tests/run-pass/rc.rs deleted file mode 100644 index 0bf707503112..000000000000 --- a/tests/run-pass/rc.rs +++ /dev/null @@ -1,39 +0,0 @@ -use std::cell::RefCell; -use std::rc::Rc; - -fn rc_refcell() { - let r = Rc::new(RefCell::new(42)); - *r.borrow_mut() += 10; - let x = *r.borrow(); - assert_eq!(x, 52); -} - -fn rc_raw() { - let r = Rc::new(0); - let r2 = Rc::into_raw(r.clone()); - let r2 = unsafe { Rc::from_raw(r2) }; - assert!(Rc::ptr_eq(&r, &r2)); - drop(r); - assert!(Rc::try_unwrap(r2).is_ok()); -} - -// Make sure this Rc doesn't fall apart when touched -fn check_unique_rc(mut r: Rc) { - let r2 = r.clone(); - assert!(Rc::get_mut(&mut r).is_none()); - drop(r2); - assert!(Rc::get_mut(&mut r).is_some()); -} - -fn rc_from() { - check_unique_rc::<[_]>(Rc::from(&[1,2,3] as &[_])); - check_unique_rc::<[_]>(Rc::from(vec![1,2,3])); - check_unique_rc::<[_]>(Rc::from(Box::new([1,2,3]) as Box<[_]>)); - check_unique_rc::(Rc::from("Hello, World!")); -} - -fn main() { - rc_refcell(); - rc_raw(); - rc_from(); -} diff --git a/tests/run-pass/recursive_static.rs b/tests/run-pass/recursive_static.rs deleted file mode 100644 index d259ca6361c9..000000000000 --- a/tests/run-pass/recursive_static.rs +++ /dev/null @@ -1,12 +0,0 @@ -// FIXME: Disable validation until we figure out how to handle recursive statics. -// compile-flags: -Zmir-emit-validate=0 - -struct S(&'static S); -static S1: S = S(&S2); -static S2: S = S(&S1); - -fn main() { - let p: *const S = S2.0; - let q: *const S = &S1; - assert_eq!(p, q); -} diff --git a/tests/run-pass/ref-invalid-ptr.rs b/tests/run-pass/ref-invalid-ptr.rs deleted file mode 100644 index ebbbb77748d4..000000000000 --- a/tests/run-pass/ref-invalid-ptr.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - let x = 2usize as *const u32; - let _y = unsafe { &*x as *const u32 }; - - let x = 0usize as *const u32; - let _y = unsafe { &*x as *const u32 }; -} diff --git a/tests/run-pass/regions-lifetime-nonfree-late-bound.rs b/tests/run-pass/regions-lifetime-nonfree-late-bound.rs deleted file mode 100644 index 1aef95d8a3f3..000000000000 --- a/tests/run-pass/regions-lifetime-nonfree-late-bound.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// This is a regression test for the ICE from issue #10846. -// -// The original issue causing the ICE: the LUB-computations during -// type inference were encountering late-bound lifetimes, and -// asserting that such lifetimes should have already been substituted -// with a concrete lifetime. -// -// However, those encounters were occurring within the lexical scope -// of the binding for the late-bound lifetime; that is, the late-bound -// lifetimes were perfectly valid. The core problem was that the type -// folding code was over-zealously passing back all lifetimes when -// doing region-folding, when really all clients of the region-folding -// case only want to see FREE lifetime variables, not bound ones. - -// pretty-expanded FIXME #23616 - -#![allow(unused_features)] -#![feature(box_syntax)] - -pub fn main() { - fn explicit() { - fn test(_x: Option>) where F: FnMut(Box FnMut(&'a isize)>) {} - test(Some(box |_f: Box FnMut(&'a isize)>| {})); - } - - // The code below is shorthand for the code above (and more likely - // to represent what one encounters in practice). - fn implicit() { - fn test(_x: Option>) where F: FnMut(Box< FnMut(& isize)>) {} - test(Some(box |_f: Box< FnMut(& isize)>| {})); - } - - explicit(); - implicit(); -} diff --git a/tests/run-pass/rfc1623.rs b/tests/run-pass/rfc1623.rs deleted file mode 100644 index 0ee523a5be00..000000000000 --- a/tests/run-pass/rfc1623.rs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(dead_code)] - -// very simple test for a 'static static with default lifetime -static STATIC_STR: &str = "&'static str"; -const CONST_STR: &str = "&'static str"; - -// this should be the same as without default: -static EXPLICIT_STATIC_STR: &'static str = "&'static str"; -const EXPLICIT_CONST_STR: &'static str = "&'static str"; - -// a function that elides to an unbound lifetime for both in- and output -fn id_u8_slice(arg: &[u8]) -> &[u8] { - arg -} - -// one with a function, argument elided -static STATIC_SIMPLE_FN: &fn(&[u8]) -> &[u8] = &(id_u8_slice as fn(&[u8]) -> &[u8]); -const CONST_SIMPLE_FN: &fn(&[u8]) -> &[u8] = &(id_u8_slice as fn(&[u8]) -> &[u8]); - -// this should be the same as without elision -static STATIC_NON_ELIDED_FN: &for<'a> fn(&'a [u8]) -> &'a [u8] = - &(id_u8_slice as for<'a> fn(&'a [u8]) -> &'a [u8]); -const CONST_NON_ELIDED_FN: &for<'a> fn(&'a [u8]) -> &'a [u8] = - &(id_u8_slice as for<'a> fn(&'a [u8]) -> &'a [u8]); - -// another function that elides, each to a different unbound lifetime -fn multi_args(_a: &u8, _b: &u8, _c: &u8) {} - -static STATIC_MULTI_FN: &fn(&u8, &u8, &u8) = &(multi_args as fn(&u8, &u8, &u8)); -const CONST_MULTI_FN: &fn(&u8, &u8, &u8) = &(multi_args as fn(&u8, &u8, &u8)); - -struct Foo<'a> { - bools: &'a [bool], -} - -static STATIC_FOO: Foo = Foo { bools: &[true, false] }; -const CONST_FOO: Foo = Foo { bools: &[true, false] }; - -type Bar<'a> = Foo<'a>; - -static STATIC_BAR: Bar = Bar { bools: &[true, false] }; -const CONST_BAR: Bar = Bar { bools: &[true, false] }; - -type Baz<'a> = fn(&'a [u8]) -> Option; - -fn baz(e: &[u8]) -> Option { - e.first().map(|x| *x) -} - -static STATIC_BAZ: &Baz = &(baz as Baz); -const CONST_BAZ: &Baz = &(baz as Baz); - -static BYTES: &[u8] = &[1, 2, 3]; - -fn main() { - // make sure that the lifetime is actually elided (and not defaulted) - let x = &[1u8, 2, 3]; - STATIC_SIMPLE_FN(x); - CONST_SIMPLE_FN(x); - - STATIC_BAZ(BYTES); // neees static lifetime - CONST_BAZ(BYTES); - - // make sure this works with different lifetimes - let a = &1; - { - let b = &2; - let c = &3; - CONST_MULTI_FN(a, b, c); - } -} diff --git a/tests/run-pass/rust-lang-org.rs b/tests/run-pass/rust-lang-org.rs deleted file mode 100644 index 7ba68e6b239c..000000000000 --- a/tests/run-pass/rust-lang-org.rs +++ /dev/null @@ -1,21 +0,0 @@ -// This code is editable and runnable! -fn main() { - // A simple integer calculator: - // `+` or `-` means add or subtract by 1 - // `*` or `/` means multiply or divide by 2 - - let program = "+ + * - /"; - let mut accumulator = 0; - - for token in program.chars() { - match token { - '+' => accumulator += 1, - '-' => accumulator -= 1, - '*' => accumulator *= 2, - '/' => accumulator /= 2, - _ => { /* ignore everything else */ } - } - } - - assert_eq!(accumulator, 1); -} diff --git a/tests/run-pass/send-is-not-static-par-for.rs b/tests/run-pass/send-is-not-static-par-for.rs deleted file mode 100644 index 4ac1b5436f52..000000000000 --- a/tests/run-pass/send-is-not-static-par-for.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//ignore-windows - -use std::sync::Mutex; - -fn par_for(iter: I, f: F) - where I: Iterator, - I::Item: Send, - F: Fn(I::Item) + Sync -{ - for item in iter { - f(item) - } -} - -fn sum(x: &[i32]) { - let sum_lengths = Mutex::new(0); - par_for(x.windows(4), |x| { - *sum_lengths.lock().unwrap() += x.len() - }); - - assert_eq!(*sum_lengths.lock().unwrap(), (x.len() - 3) * 4); -} - -fn main() { - let mut elements = [0; 20]; - - // iterators over references into this stack frame - par_for(elements.iter_mut().enumerate(), |(i, x)| { - *x = i as i32 - }); - - sum(&elements) -} diff --git a/tests/run-pass/sendable-class.rs b/tests/run-pass/sendable-class.rs deleted file mode 100644 index b3e07d00f010..000000000000 --- a/tests/run-pass/sendable-class.rs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// Test that a class with only sendable fields can be sent - -// pretty-expanded FIXME #23616 - -use std::sync::mpsc::channel; - -#[allow(dead_code)] -struct Foo { - i: isize, - j: char, -} - -fn foo(i:isize, j: char) -> Foo { - Foo { - i: i, - j: j - } -} - -pub fn main() { - let (tx, rx) = channel(); - let _ = tx.send(foo(42, 'c')); - let _ = rx; -} diff --git a/tests/run-pass/simd-intrinsic-generic-elements.rs b/tests/run-pass/simd-intrinsic-generic-elements.rs deleted file mode 100644 index 36567f4c0331..000000000000 --- a/tests/run-pass/simd-intrinsic-generic-elements.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(repr_simd, platform_intrinsics)] - -#[repr(simd)] -#[derive(Copy, Clone, Debug, PartialEq)] -#[allow(non_camel_case_types)] -struct i32x2(i32, i32); -#[repr(simd)] -#[derive(Copy, Clone, Debug, PartialEq)] -#[allow(non_camel_case_types)] -struct i32x3(i32, i32, i32); -#[repr(simd)] -#[derive(Copy, Clone, Debug, PartialEq)] -#[allow(non_camel_case_types)] -struct i32x4(i32, i32, i32, i32); -#[repr(simd)] -#[derive(Copy, Clone, Debug, PartialEq)] -#[allow(non_camel_case_types)] -struct i32x8(i32, i32, i32, i32, - i32, i32, i32, i32); - -fn main() { - let _x2 = i32x2(20, 21); - let _x3 = i32x3(30, 31, 32); - let _x4 = i32x4(40, 41, 42, 43); - let _x8 = i32x8(80, 81, 82, 83, 84, 85, 86, 87); - - let _y2 = i32x2(120, 121); - let _y3 = i32x3(130, 131, 132); - let _y4 = i32x4(140, 141, 142, 143); - let _y8 = i32x8(180, 181, 182, 183, 184, 185, 186, 187); - -} diff --git a/tests/run-pass/slice-of-zero-size-elements.rs b/tests/run-pass/slice-of-zero-size-elements.rs deleted file mode 100644 index dbe8ec9addac..000000000000 --- a/tests/run-pass/slice-of-zero-size-elements.rs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// compile-flags: -C debug-assertions - -use std::slice; - -fn foo(v: &[T]) -> Option<&[T]> { - let mut it = v.iter(); - for _ in 0..5 { - let _ = it.next(); - } - Some(it.as_slice()) -} - -fn foo_mut(v: &mut [T]) -> Option<&mut [T]> { - let mut it = v.iter_mut(); - for _ in 0..5 { - let _ = it.next(); - } - Some(it.into_slice()) -} - -pub fn main() { - // In a slice of zero-size elements the pointer is meaningless. - // Ensure iteration still works even if the pointer is at the end of the address space. - let slice: &[()] = unsafe { slice::from_raw_parts(-5isize as *const (), 10) }; - assert_eq!(slice.len(), 10); - assert_eq!(slice.iter().count(), 10); - - // .nth() on the iterator should also behave correctly - let mut it = slice.iter(); - assert!(it.nth(5).is_some()); - assert_eq!(it.count(), 4); - - // Converting Iter to a slice should never have a null pointer - assert!(foo(slice).is_some()); - - // Test mutable iterators as well - let slice: &mut [()] = unsafe { slice::from_raw_parts_mut(-5isize as *mut (), 10) }; - assert_eq!(slice.len(), 10); - assert_eq!(slice.iter_mut().count(), 10); - - { - let mut it = slice.iter_mut(); - assert!(it.nth(5).is_some()); - assert_eq!(it.count(), 4); - } - - assert!(foo_mut(slice).is_some()) -} diff --git a/tests/run-pass/small_enum_size_bug.rs b/tests/run-pass/small_enum_size_bug.rs deleted file mode 100644 index 7576a97e36ad..000000000000 --- a/tests/run-pass/small_enum_size_bug.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![allow(dead_code)] - -enum E { - A = 1, - B = 2, - C = 3, -} - -fn main() { - let enone = None::; - if let Some(..) = enone { - panic!(); - } -} diff --git a/tests/run-pass/specialization.rs b/tests/run-pass/specialization.rs deleted file mode 100644 index 13894926d36d..000000000000 --- a/tests/run-pass/specialization.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![feature(specialization)] - -trait IsUnit { - fn is_unit() -> bool; -} - -impl IsUnit for T { - default fn is_unit() -> bool { false } -} - -impl IsUnit for () { - fn is_unit() -> bool { true } -} - -fn specialization() -> (bool, bool) { - (i32::is_unit(), <()>::is_unit()) -} - -fn main() { - assert_eq!(specialization(), (false, true)); -} diff --git a/tests/run-pass/static_memory_modification.rs b/tests/run-pass/static_memory_modification.rs deleted file mode 100644 index a68f727322e2..000000000000 --- a/tests/run-pass/static_memory_modification.rs +++ /dev/null @@ -1,8 +0,0 @@ -static mut X: usize = 5; - -fn main() { - unsafe { - X = 6; - assert_eq!(X, 6); - } -} diff --git a/tests/run-pass/static_mut.rs b/tests/run-pass/static_mut.rs deleted file mode 100644 index be5830698b21..000000000000 --- a/tests/run-pass/static_mut.rs +++ /dev/null @@ -1,17 +0,0 @@ -#![allow(dead_code)] - -static mut FOO: i32 = 42; -static BAR: Foo = Foo(unsafe { &FOO as *const _} ); - -struct Foo(*const i32); - -unsafe impl Sync for Foo {} - -fn main() { - unsafe { - assert_eq!(*BAR.0, 42); - FOO = 5; - assert_eq!(FOO, 5); - assert_eq!(*BAR.0, 5); - } -} diff --git a/tests/run-pass/std.rs b/tests/run-pass/std.rs deleted file mode 100644 index e0e23812d275..000000000000 --- a/tests/run-pass/std.rs +++ /dev/null @@ -1,33 +0,0 @@ -use std::cell::{Cell, RefCell}; -use std::rc::Rc; -use std::sync::Arc; - -fn rc_cell() -> Rc> { - let r = Rc::new(Cell::new(42)); - let x = r.get(); - r.set(x + x); - r -} - -fn rc_refcell() -> i32 { - let r = Rc::new(RefCell::new(42)); - *r.borrow_mut() += 10; - let x = *r.borrow(); - x -} - -fn arc() -> Arc { - let a = Arc::new(42); - a -} - -fn true_assert() { - assert_eq!(1, 1); -} - -fn main() { - assert_eq!(*arc(), 42); - assert_eq!(rc_cell().get(), 84); - assert_eq!(rc_refcell(), 52); - true_assert(); -} diff --git a/tests/run-pass/strings.rs b/tests/run-pass/strings.rs deleted file mode 100644 index d5fc80b41f01..000000000000 --- a/tests/run-pass/strings.rs +++ /dev/null @@ -1,27 +0,0 @@ -fn empty() -> &'static str { - "" -} - -fn hello() -> &'static str { - "Hello, world!" -} - -fn hello_bytes() -> &'static [u8; 13] { - b"Hello, world!" -} - -fn hello_bytes_fat() -> &'static [u8] { - b"Hello, world!" -} - -fn fat_pointer_on_32_bit() { - Some(5).expect("foo"); -} - -fn main() { - assert_eq!(empty(), ""); - assert_eq!(hello(), "Hello, world!"); - assert_eq!(hello_bytes(), b"Hello, world!"); - assert_eq!(hello_bytes_fat(), b"Hello, world!"); - fat_pointer_on_32_bit(); // Should run without crashing. -} diff --git a/tests/run-pass/subslice_array.rs b/tests/run-pass/subslice_array.rs deleted file mode 100644 index 468cc9f09416..000000000000 --- a/tests/run-pass/subslice_array.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![feature(advanced_slice_patterns)] -#![feature(slice_patterns)] - -fn bar(a: &'static str, b: &'static str) -> [&'static str; 4] { - [a, b, b, a] -} - -fn main() { - let out = bar("baz", "foo"); - let [a, xs.., d] = out; - assert_eq!(a, "baz"); - assert_eq!(xs, ["foo", "foo"]); - assert_eq!(d, "baz"); -} diff --git a/tests/run-pass/sums.rs b/tests/run-pass/sums.rs deleted file mode 100644 index a8dfd5ed66ae..000000000000 --- a/tests/run-pass/sums.rs +++ /dev/null @@ -1,59 +0,0 @@ -// FIXME(solson): 32-bit mode doesn't test anything currently. -#![cfg_attr(target_pointer_width = "32", allow(dead_code))] - -#[derive(Debug, PartialEq)] -enum Unit { Unit(()) } // Force non-C-enum representation. - -fn return_unit() -> Unit { - Unit::Unit(()) -} - -#[derive(Debug, PartialEq)] -enum MyBool { False(()), True(()) } // Force non-C-enum representation. - -fn return_true() -> MyBool { - MyBool::True(()) -} - -fn return_false() -> MyBool { - MyBool::False(()) -} - -fn return_none() -> Option { - None -} - -fn return_some() -> Option { - Some(42) -} - -fn match_opt_none() -> i8 { - let x = None; - match x { - Some(data) => data, - None => 42, - } -} - -fn match_opt_some() -> i8 { - let x = Some(13); - match x { - Some(data) => data, - None => 20, - } -} - -fn two_nones() -> (Option, Option) { - (None, None) -} - -fn main() { - assert_eq!(two_nones(), (None, None)); - assert_eq!(match_opt_some(), 13); - assert_eq!(match_opt_none(), 42); - assert_eq!(return_some(), Some(42)); - assert_eq!(return_none(), None); - assert_eq!(return_false(), MyBool::False(())); - assert_eq!(return_true(), MyBool::True(())); - assert_eq!(return_unit(), Unit::Unit(())); -} diff --git a/tests/run-pass/tag-align-dyn-u64.rs b/tests/run-pass/tag-align-dyn-u64.rs deleted file mode 100644 index 81c19022ab08..000000000000 --- a/tests/run-pass/tag-align-dyn-u64.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![allow(dead_code)] - -use std::mem; - -enum Tag { - Tag2(A) -} - -struct Rec { - c8: u8, - t: Tag -} - -fn mk_rec() -> Rec { - return Rec { c8:0, t:Tag::Tag2(0) }; -} - -fn is_u64_aligned(u: &Tag) -> bool { - let p: usize = unsafe { mem::transmute(u) }; - let u64_align = std::mem::align_of::(); - return (p & (u64_align - 1)) == 0; -} - -pub fn main() { - let x = mk_rec(); - assert!(is_u64_aligned(&x.t)); -} diff --git a/tests/run-pass/thread-local.rs b/tests/run-pass/thread-local.rs deleted file mode 100644 index db00e42d99ac..000000000000 --- a/tests/run-pass/thread-local.rs +++ /dev/null @@ -1,67 +0,0 @@ -//ignore-windows - -#![feature(libc)] -extern crate libc; - -use std::mem; - -pub type Key = libc::pthread_key_t; - -static mut RECORD : usize = 0; -static mut KEYS : [Key; 2] = [0; 2]; -static mut GLOBALS : [u64; 2] = [1, 0]; - -static mut CANNARY : *mut u64 = 0 as *mut _; // this serves as a cannary: if TLS dtors are not run properly, this will not get deallocated, making the test fail. - -pub unsafe fn create(dtor: Option) -> Key { - let mut key = 0; - assert_eq!(libc::pthread_key_create(&mut key, mem::transmute(dtor)), 0); - key -} - -pub unsafe fn set(key: Key, value: *mut u8) { - let r = libc::pthread_setspecific(key, value as *mut _); - assert_eq!(r, 0); -} - -pub fn record(r: usize) { - assert!(r < 10); - unsafe { RECORD = RECORD*10 + r }; -} - -unsafe extern fn dtor(ptr: *mut u64) { - assert!(CANNARY != 0 as *mut _); // make sure we do not get run too often - let val = *ptr; - - let which_key = GLOBALS.iter().position(|global| global as *const _ == ptr).expect("Should find my global"); - record(which_key); - - if val > 0 { - *ptr = val-1; - set(KEYS[which_key], ptr as *mut _); - } - - // Check if the records matches what we expect. If yes, clear the cannary. - // If the record is wrong, the cannary will never get cleared, leading to a leak -> test fails. - // If the record is incomplete (i.e., more dtor calls happen), the check at the beginning of this function will fail -> test fails. - // The correct sequence is: First key 0, then key 1, then key 0. - if RECORD == 0_1_0 { - drop(Box::from_raw(CANNARY)); - CANNARY = 0 as *mut _; - } -} - -fn main() { - unsafe { - create(None); // check that the no-dtor case works - - // Initialize the keys we use to check destructor ordering - for (key, global) in KEYS.iter_mut().zip(GLOBALS.iter()) { - *key = create(Some(mem::transmute(dtor as unsafe extern fn(*mut u64)))); - set(*key, global as *const _ as *mut _); - } - - // Initialize cannary - CANNARY = Box::into_raw(Box::new(0u64)); - } -} diff --git a/tests/run-pass/too-large-primval-write-problem.rs b/tests/run-pass/too-large-primval-write-problem.rs deleted file mode 100644 index 1bbe45277c43..000000000000 --- a/tests/run-pass/too-large-primval-write-problem.rs +++ /dev/null @@ -1,23 +0,0 @@ -// PrimVals in Miri are represented with 8 bytes (u64) and at the time of writing, the `-x` -// will sign extend into the entire 8 bytes. Then, if you tried to write the `-x` into -// something smaller than 8 bytes, like a 4 byte pointer, it would crash in byteorder crate -// code that assumed only the low 4 bytes would be set. Actually, we were masking properly for -// everything except pointers before I fixed it, so this was probably impossible to reproduce on -// 64-bit. -// -// This is just intended as a regression test to make sure we don't reintroduce this problem. - -#[cfg(target_pointer_width = "32")] -fn main() { - use std::mem::transmute; - - // Make the weird PrimVal. - let x = 1i32; - let bad = unsafe { transmute::(-x) }; - - // Force it through the Memory::write_primval code. - Box::new(bad); -} - -#[cfg(not(target_pointer_width = "32"))] -fn main() {} diff --git a/tests/run-pass/traits.rs b/tests/run-pass/traits.rs deleted file mode 100644 index b2eae5d04f41..000000000000 --- a/tests/run-pass/traits.rs +++ /dev/null @@ -1,30 +0,0 @@ -struct Struct(i32); - -trait Trait { - fn method(&self); -} - -impl Trait for Struct { - fn method(&self) { - assert_eq!(self.0, 42); - } -} - -struct Foo(T); - -fn main() { - let y: &Trait = &Struct(42); - y.method(); - let x: Foo = Foo(Struct(42)); - let y: &Foo = &x; - y.0.method(); - - let x: Box i32> = Box::new(|x| x * 2); - assert_eq!(x(21), 42); - let mut i = 5; - { - let mut x: Box = Box::new(|| i *= 2); - x(); x(); - } - assert_eq!(i, 20); -} diff --git a/tests/run-pass/trivial.rs b/tests/run-pass/trivial.rs deleted file mode 100644 index 891d11520656..000000000000 --- a/tests/run-pass/trivial.rs +++ /dev/null @@ -1,11 +0,0 @@ -fn empty() {} - -fn unit_var() { - let x = (); - x -} - -fn main() { - empty(); - unit_var(); -} diff --git a/tests/run-pass/try-operator-custom.rs b/tests/run-pass/try-operator-custom.rs deleted file mode 100644 index 3b447f36ece1..000000000000 --- a/tests/run-pass/try-operator-custom.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn main() { - assert!(Ok::(42) == Ok(42)); -} diff --git a/tests/run-pass/tuple_like_enum_variant_constructor.rs b/tests/run-pass/tuple_like_enum_variant_constructor.rs deleted file mode 100644 index 5cf91b3f4d19..000000000000 --- a/tests/run-pass/tuple_like_enum_variant_constructor.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - assert_eq!(Some(42).map(Some), Some(Some(42))); -} diff --git a/tests/run-pass/tuple_like_enum_variant_constructor_pointer_opt.rs b/tests/run-pass/tuple_like_enum_variant_constructor_pointer_opt.rs deleted file mode 100644 index fb57d4f4c165..000000000000 --- a/tests/run-pass/tuple_like_enum_variant_constructor_pointer_opt.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - let x = 5; - assert_eq!(Some(&x).map(Some), Some(Some(&x))); -} diff --git a/tests/run-pass/tuple_like_enum_variant_constructor_struct_pointer_opt.rs b/tests/run-pass/tuple_like_enum_variant_constructor_struct_pointer_opt.rs deleted file mode 100644 index 44441ed1d36c..000000000000 --- a/tests/run-pass/tuple_like_enum_variant_constructor_struct_pointer_opt.rs +++ /dev/null @@ -1,33 +0,0 @@ -#[derive(Copy, Clone, PartialEq, Debug)] -struct A<'a> { - x: i32, - y: &'a i32, -} - -#[derive(Copy, Clone, PartialEq, Debug)] -struct B<'a>(i32, &'a i32); - -#[derive(Copy, Clone, PartialEq, Debug)] -enum C<'a> { - Value(i32, &'a i32), - #[allow(dead_code)] - NoValue, -} - -fn main() { - let x = 5; - let a = A { x: 99, y: &x }; - assert_eq!(Some(a).map(Some), Some(Some(a))); - let f = B; - assert_eq!(Some(B(42, &x)), Some(f(42, &x))); - // the following doesn't compile :( - //let f: for<'a> fn(i32, &'a i32) -> B<'a> = B; - //assert_eq!(Some(B(42, &x)), Some(f(42, &x))); - assert_eq!(B(42, &x), foo(&x, B)); - let f = C::Value; - assert_eq!(C::Value(42, &x), f(42, &x)); -} - -fn foo<'a, F: Fn(i32, &'a i32) -> B<'a>>(i: &'a i32, f: F) -> B<'a> { - f(42, i) -} diff --git a/tests/run-pass/tuple_like_struct_constructor.rs b/tests/run-pass/tuple_like_struct_constructor.rs deleted file mode 100644 index 05e8893de178..000000000000 --- a/tests/run-pass/tuple_like_struct_constructor.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - #[derive(PartialEq, Eq, Debug)] - struct A(i32); - assert_eq!(Some(42).map(A), Some(A(42))); -} diff --git a/tests/run-pass/union-overwrite.rs b/tests/run-pass/union-overwrite.rs deleted file mode 100644 index df2ff6e51a59..000000000000 --- a/tests/run-pass/union-overwrite.rs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(untagged_unions)] -#![allow(unions_with_drop_fields)] - -#[repr(C)] -struct Pair(T, U); -#[repr(C)] -struct Triple(T, T, T); - -#[repr(C)] -union U { - a: Pair, - b: B, -} - -#[repr(C)] -union W { - a: A, - b: B, -} - -#[cfg(target_endian = "little")] -unsafe fn check() { - let mut u = U:: { b: 0xDE_DE }; - u.a.0 = 0xBE; - assert_eq!(u.b, 0xDE_BE); - - let mut u = U:: { b: 0xDEAD_DEAD }; - u.a.0 = 0xBEEF; - assert_eq!(u.b, 0xDEAD_BEEF); - - let mut u = U:: { b: 0xDEADBEEF_DEADBEEF }; - u.a.0 = 0xBAADF00D; - assert_eq!(u.b, 0xDEADBEEF_BAADF00D); - - let mut w = W::, u8>, u32> { b: 0xDEAD_DEAD }; - w.a.0 = Triple(0, 0, 0); - assert_eq!(w.b, 0xDE00_0000); - - let mut w = W::>, u32> { b: 0xDEAD_DEAD }; - w.a.1 = Triple(0, 0, 0); - assert_eq!(w.b, 0x0000_00AD); -} - -#[cfg(target_endian = "big")] -unsafe fn check() { - let mut u = U:: { b: 0xDE_DE }; - u.a.0 = 0xBE; - assert_eq!(u.b, 0xBE_DE); - - let mut u = U:: { b: 0xDEAD_DEAD }; - u.a.0 = 0xBEEF; - assert_eq!(u.b, 0xBEEF_DEAD); - - let mut u = U:: { b: 0xDEADBEEF_DEADBEEF }; - u.a.0 = 0xBAADF00D; - assert_eq!(u.b, 0xBAADF00D_DEADBEEF); - - let mut w = W::, u8>, u32> { b: 0xDEAD_DEAD }; - w.a.0 = Triple(0, 0, 0); - assert_eq!(w.b, 0x0000_00AD); - - let mut w = W::>, u32> { b: 0xDEAD_DEAD }; - w.a.1 = Triple(0, 0, 0); - assert_eq!(w.b, 0xDE00_0000); -} - -fn main() { - unsafe { - check(); - } -} diff --git a/tests/run-pass/union.rs b/tests/run-pass/union.rs deleted file mode 100644 index 342c94f3d4a3..000000000000 --- a/tests/run-pass/union.rs +++ /dev/null @@ -1,88 +0,0 @@ -#![feature(untagged_unions)] -#![allow(dead_code, unused_variables)] - -fn main() { - a(); - b(); - c(); - d(); -} - -fn a() { - union U { - f1: u32, - f2: f32, - } - let mut u = U { f1: 1 }; - unsafe { - let b1 = &mut u.f1; - *b1 = 5; - } - assert_eq!(unsafe { u.f1 }, 5); -} - -fn b() { - struct S { - x: u32, - y: u32, - } - - union U { - s: S, - both: u64, - } - let mut u = U { s: S { x: 1, y: 2 } }; - unsafe { - let bx = &mut u.s.x; - let by = &mut u.s.y; - *bx = 5; - *by = 10; - } - assert_eq!(unsafe { u.s.x }, 5); - assert_eq!(unsafe { u.s.y }, 10); -} - -fn c() { - #[repr(u32)] - enum Tag { I, F } - - #[repr(C)] - union U { - i: i32, - f: f32, - } - - #[repr(C)] - struct Value { - tag: Tag, - u: U, - } - - fn is_zero(v: Value) -> bool { - unsafe { - match v { - Value { tag: Tag::I, u: U { i: 0 } } => true, - Value { tag: Tag::F, u: U { f } } => f == 0.0, - _ => false, - } - } - } - assert!(is_zero(Value { tag: Tag::I, u: U { i: 0 }})); - assert!(is_zero(Value { tag: Tag::F, u: U { f: 0.0 }})); - assert!(!is_zero(Value { tag: Tag::I, u: U { i: 1 }})); - assert!(!is_zero(Value { tag: Tag::F, u: U { f: 42.0 }})); -} - -fn d() { - union MyUnion { - f1: u32, - f2: f32, - } - let u = MyUnion { f1: 10 }; - unsafe { - match u { - MyUnion { f1: 10 } => { } - MyUnion { f2 } => { panic!("foo"); } - } - } -} diff --git a/tests/run-pass/unique-send.rs b/tests/run-pass/unique-send.rs deleted file mode 100644 index 7644da08e4af..000000000000 --- a/tests/run-pass/unique-send.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(box_syntax)] - -use std::sync::mpsc::channel; - -pub fn main() { - let (tx, rx) = channel::>(); - tx.send(box 100).unwrap(); - let v = rx.recv().unwrap(); - assert_eq!(v, box 100); -} diff --git a/tests/run-pass/validation_lifetime_resolution.rs b/tests/run-pass/validation_lifetime_resolution.rs deleted file mode 100644 index 4d919f735255..000000000000 --- a/tests/run-pass/validation_lifetime_resolution.rs +++ /dev/null @@ -1,30 +0,0 @@ -trait Id { - type Out; - - fn id(self) -> Self::Out; -} - -impl<'a> Id for &'a mut i32 { - type Out = &'a mut i32; - - fn id(self) -> Self { self } -} - -impl<'a> Id for &'a mut u32 { - type Out = &'a mut u32; - - fn id(self) -> Self { self } -} - -fn foo(mut x: T) where for<'a> &'a mut T: Id -{ - let x = &mut x; - let _y = x.id(); - // Inspecting the trace should show that _y has a type involving a local lifetime, when it gets validated. - // Unfortunately, there doesn't seem to be a way to actually have a test fail if it does not have the right - // type. Currently, this is NOT working correctly; see . -} - -fn main() { - foo(3) -} diff --git a/tests/run-pass/vec-matching-fold.rs b/tests/run-pass/vec-matching-fold.rs deleted file mode 100644 index ac80a4211ada..000000000000 --- a/tests/run-pass/vec-matching-fold.rs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - - -#![feature(advanced_slice_patterns)] -#![feature(slice_patterns)] - -use std::fmt::Debug; - -fn foldl(values: &[T], - initial: U, - mut function: F) - -> U where - U: Clone+Debug, T:Debug, - F: FnMut(U, &T) -> U, -{ match values { - &[ref head, ref tail..] => - foldl(tail, function(initial, head), function), - &[] => { - // FIXME: call guards - let res = initial.clone(); res - } - } -} - -fn foldr(values: &[T], - initial: U, - mut function: F) - -> U where - U: Clone, - F: FnMut(&T, U) -> U, -{ - match values { - &[ref head.., ref tail] => - foldr(head, function(tail, initial), function), - &[] => { - // FIXME: call guards - let res = initial.clone(); res - } - } -} - -pub fn main() { - let x = &[1, 2, 3, 4, 5]; - - let product = foldl(x, 1, |a, b| a * *b); - assert_eq!(product, 120); - - let sum = foldr(x, 0, |a, b| *a + b); - assert_eq!(sum, 15); -} diff --git a/tests/run-pass/write-bytes.rs b/tests/run-pass/write-bytes.rs deleted file mode 100644 index 7c9a38fca696..000000000000 --- a/tests/run-pass/write-bytes.rs +++ /dev/null @@ -1,45 +0,0 @@ -#[repr(C)] -#[derive(Copy, Clone)] -struct Foo { - a: u64, - b: u64, - c: u64, -} - -fn main() { - const LENGTH: usize = 10; - let mut v: [u64; LENGTH] = [0; LENGTH]; - - for idx in 0..LENGTH { - assert_eq!(v[idx], 0); - } - - unsafe { - let p = v.as_mut_ptr(); - ::std::ptr::write_bytes(p, 0xab, LENGTH); - } - - for idx in 0..LENGTH { - assert_eq!(v[idx], 0xabababababababab); - } - - // ----- - - let mut w: [Foo; LENGTH] = [Foo { a: 0, b: 0, c: 0 }; LENGTH]; - for idx in 0..LENGTH { - assert_eq!(w[idx].a, 0); - assert_eq!(w[idx].b, 0); - assert_eq!(w[idx].c, 0); - } - - unsafe { - let p = w.as_mut_ptr(); - ::std::ptr::write_bytes(p, 0xcd, LENGTH); - } - - for idx in 0..LENGTH { - assert_eq!(w[idx].a, 0xcdcdcdcdcdcdcdcd); - assert_eq!(w[idx].b, 0xcdcdcdcdcdcdcdcd); - assert_eq!(w[idx].c, 0xcdcdcdcdcdcdcdcd); - } -} diff --git a/tests/run-pass/zero-sized-binary-heap-push.rs b/tests/run-pass/zero-sized-binary-heap-push.rs deleted file mode 100644 index 63a0d65f017d..000000000000 --- a/tests/run-pass/zero-sized-binary-heap-push.rs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::collections::BinaryHeap; -use std::iter::Iterator; - -fn main() { - const N: usize = 8; - - for len in 0..N { - let mut tester = BinaryHeap::with_capacity(len); - assert_eq!(tester.len(), 0); - assert!(tester.capacity() >= len); - for _ in 0..len { - tester.push(()); - } - assert_eq!(tester.len(), len); - assert_eq!(tester.iter().count(), len); - tester.clear(); - } -} diff --git a/tests/run-pass/zst.rs b/tests/run-pass/zst.rs deleted file mode 100644 index c1c88875c5c8..000000000000 --- a/tests/run-pass/zst.rs +++ /dev/null @@ -1,18 +0,0 @@ -#[derive(PartialEq, Debug)] -struct A; - -fn zst_ret() -> A { - A -} - -fn use_zst() -> A { - let a = A; - a -} - -fn main() { - assert_eq!(zst_ret(), A); - assert_eq!(use_zst(), A); - let x = 42 as *mut (); - unsafe { *x = (); } -} diff --git a/tests/run-pass/zst2.rs b/tests/run-pass/zst2.rs deleted file mode 100644 index c2d7b88ea075..000000000000 --- a/tests/run-pass/zst2.rs +++ /dev/null @@ -1,12 +0,0 @@ -#![allow(dead_code)] - -#[derive(Debug)] -struct A; - -fn main() { - // can't use assert_eq, b/c that will try to print the pointer addresses with full MIR enabled - - // FIXME: Test disabled for now, see . - //assert!(&A as *const A as *const () == &() as *const _); - //assert!(&A as *const A == &A as *const A); -} diff --git a/tests/run-pass/zst_box.rs b/tests/run-pass/zst_box.rs deleted file mode 100644 index 12138be5af97..000000000000 --- a/tests/run-pass/zst_box.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn main() { - let x = Box::new(()); - let y = Box::new(()); - drop(y); - let z = Box::new(()); - drop(x); - drop(z); -} diff --git a/tests/run-pass/zst_variant_drop.rs b/tests/run-pass/zst_variant_drop.rs deleted file mode 100644 index a76f64ce29df..000000000000 --- a/tests/run-pass/zst_variant_drop.rs +++ /dev/null @@ -1,23 +0,0 @@ -struct Foo; -impl Drop for Foo { - fn drop(&mut self) { - unsafe { - FOO = true; - } - } -} - -static mut FOO: bool = false; - -enum Bar { - A(Box), - B(Foo), -} - -fn main() { - assert!(unsafe { !FOO }); - drop(Bar::A(Box::new(42))); - assert!(unsafe { !FOO }); - drop(Bar::B(Foo)); - assert!(unsafe { FOO }); -} diff --git a/tex/final-presentation/latexmkrc b/tex/final-presentation/latexmkrc deleted file mode 100644 index 23aa1a481b3e..000000000000 --- a/tex/final-presentation/latexmkrc +++ /dev/null @@ -1,12 +0,0 @@ -# vim: ft=perl - -$pdf_mode = 1; -$pdflatex = 'lualatex --shell-escape %O %S'; -$out_dir = 'out'; - -# This improves latexmk's detection of source files and generated files. -$recorder = 1; - -# Ignore always-regenerated *.pyg files from the minted package when considering -# whether to run pdflatex again. -$hash_calc_ignore_pattern{'pyg'} = '.*'; diff --git a/tex/final-presentation/rust-logo-512x512.png b/tex/final-presentation/rust-logo-512x512.png deleted file mode 100644 index 38484c670e01f3f355672d6c95f79f035a963a44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96029 zcmeAS@N?(olHy`uVBq!ia0y~yU}6Aa4mJh`hA$OYelakXJ@IsL45_&FX7BZ|=$qSE ztLz%}EoN&qb4+qb$Z6gftK`LU`@x)3$F{DX!)(c(xWO=?xp>X3H+%hepZ~{V*SP%m z8TAh(^Pj&>ZdAxJ!u84g8(0n4w>5GEr2O-O7;uEK>-~PYy9J7M>K-yIXW~yoOtfJ5 z`26c(>HEK=BDk0sEcW@TGJOs=hS>Mb^yl@j9G~px@zu@PKL_G~ha8dK{TVNQ*L{vC zd}!;J^)35`pWBc7`7(+1ajR1`gkNlD|9<-Zy)SxTM|a*yyL_GRdxOsQDCW}-QI4v-f8k*Mcsk<-SqNLN0K#veZIcf+AwnOJEjL4Z*kmb z{I%zC`8(~F{kzk?uAb=nmPyAIr z{ru|!&B8Y|=NHdbwEAs)>QCv6I0lG=BO9J{ms-zR^F?C!9Jdz%Oc(6Mm6?7?eNtlD zcV`WM-QKGQ_T6((|36hqA>rZYvsK*j>#uEEKb?8qkEZi4zpK_9eBXBd>C^HbU1#JI zItA{tZn%3bf8Iez_ysdwSbyTqyr1fA-3$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$W6qPBfA?_h2#MdY3Uv<5d6q)CArW zbzD#CO!-c_3+3;mHxID?%yY@$OH7zlJ@$||m zksloyI}BdjdtUo?rK`syyG5awbn9Jhe;)|kcHsH)_pkRg|49E(amQt1jmpLALJHOL z7r8IDzyJEk`N&7@nFkXLB!n6N-ZozUw5IG!asG-4fA4+`i4a+%Zu{tCHUpGOO- z?|&Cne>T%`r=ncPijb-^lD0K#!{y3$|Gpp2KWV<>ofeL`$$MtM_Br0STE{%=UbW?8@h#9JLdMNbLAvDxVS9& zk~Km1hiY?NL6ILjPr-LFkHh~b?Ppy1JMT&7J*8jQnHP!YFR?gWym7UYoqKiUyfw!` zzP|l9dGiNnzM{+(AJ>X_i9C7IVy?;a?a!eHG2G0q0jKwuoRZFZWZ(4iQ)6M_rwiNn z9(?&{`qxX%Z+7D=+3Rhk?na5m?-I2<724UfDe8&SAqT;JF;-Tk zrP=~l@-15*vD~fSnkgyvUTpgQ*M-MB_x*pDu)(H%+cVaVxZdku-QG<5S{&^8dG$1~ znc@uY+NCWVZF8RLxjK4C#MI_YtIOt^#%>QA2GU+e#T0)NYAmTv64cjoeSVoDClTfz5ed2{Pp(ArFM^(p39dP=YP17{bv1l!M_b}nhRSW z+_G;zm|#%nrS_nzgW<=wK*{PGD_`~PX2?Vik`CQwf9d~t zay|j%k;h_8!5v%rGV5F}{% - \only<#1>{\pgfkeysalso{highlight}} - \alt<#1->{}{\pgfkeysalso{invisible}} - }, -} - -\title{Miri} -\subtitle{An interpreter for Rust's mid-level intermediate representation} -\author{ - Scott Olson - \texorpdfstring{\\ \scriptsize{Supervisor: Christopher Dutchyn}}{} -} -\institute{ - CMPT 400 \\ - University of Saskatchewan -} -\date{} -\titlegraphic{ - \includegraphics[width=64px,height=64px]{rust-logo-512x512.png} \\ - \scriptsize{\url{https://www.rust-lang.org}} -} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Intro slides -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\begin{document} - -\maketitle - -\begin{frame}[fragile] - \frametitle{What is Rust? \small{[review]}} - - According to the website\dots - - \begin{quote} - \textbf{Rust} is a systems programming language that runs blazingly fast, - prevents nearly all segfaults, and guarantees thread safety. - \end{quote} - - It's a new programming language from Mozilla, and it looks like this: - - \begin{minted}[ - autogobble, - fontsize=\footnotesize, - mathescape, - xleftmargin=.3in, - ]{rust} - fn factorial(n: u64) -> u64 { - (1..n).fold(1, |a, b| a * b) - } - - fn main() { - for x in 1..6 { - println!("{}", factorial(x)); - } - // $\Rightarrow$ 1 - // $\Rightarrow$ 1 - // $\Rightarrow$ 2 - // $\Rightarrow$ 6 - // $\Rightarrow$ 24 - } - \end{minted} -\end{frame} - -\begin{frame} - \frametitle{How does Rust compile code? \onslide<-6>{\small{[review]}}} - - \begin{center} - \begin{tikzpicture}[x=4cm, y=3.5cm, auto, rounded corners] - \tikzstyle{basic-stage}=[rectangle, draw, thick, align=center] - \tikzstyle{stage}=[basic-stage, font=\tiny] - \tikzstyle{pass}=[thick, -stealth] - \tikzstyle{pass-label}=[font=\footnotesize] - - \node[basic-stage] (src) at (0,0) {Source\\Code}; - \node[basic-stage] (mach) at (2,-1) {Machine\\Code}; - - \draw<1>[pass, out=0, in=180] - (src.east) to node[font=\Huge] {?} (mach.west); - - \node[stage, intro=<2>] (ast) at (1,0) - {\normalsize{AST} \\ Abstract Syntax Tree}; - \draw[pass, intro=<2>] - (src) -- node[pass-label] {Parse} (ast); - - \node[stage, intro=<3>] (hir) at (2,0) - {\normalsize{HIR} \\ High-level Intermediate\\Representation}; - \draw[pass, intro=<3>] - (ast) -- node[pass-label] {Simplify} (hir); - - \node[stage, intro=<4>] (mir) at (0,-1) - {\normalsize{MIR} \\ Mid-level Intermediate\\Representation}; - \path (hir.south) -- coordinate (middle) (mir.north); - \draw[pass, intro=<4>] - (hir.south) |- (middle) -| (mir.north); - \node[pass-label, above, intro=<4>] at (middle) {Lower}; - - \node[stage, intro=<5>] (llvm) at (1,-1) - {\normalsize{LLVM IR} \\ Low-level Intermediate\\Representation}; - \draw[pass, intro=<5>] - (mir) -- node[pass-label] {Translate} (llvm); - - \draw<6->[pass, intro=<6>] - (llvm) -- node[pass-label] {Magic} (mach); - - \node[stage, intro=<7>] (exec) at (1,-1.75) - {\normalsize{Execution}}; - \draw[pass, intro=<7>] - (mach) -- node[pass-label] {CPU} (exec); - - \draw[pass, intro=<8>] - (mir) -- node[pass-label] {Miri} (exec); - \end{tikzpicture} - \end{center} -\end{frame} - -\begin{frame} - \frametitle{Why build Miri?} - \begin{itemize} - \item For fun and learning. - - \item I originally planned to use it for testing the compiler and execution - of unsafe code, but shifted my goals along the way. \pause - - \item Now it serves as an experimental implementation of the upcoming - compile-time function evaluation feature in Rust. \pause - - \begin{itemize} - \item Similar to C++14's \mintinline{cpp}{constexpr} feature. - - \item You can do complicated calculations at compile time and compile - their \emph{results} into the executable. \pause - - \item For example, you can compute a ``perfect hash function'' for a - statically-known map at compile-time and have guaranteed no-collision - lookup at runtime. \pause - - \item Miri actually supports far more of Rust than C++14's - \mintinline{cpp}{constexpr} does of C++ --- even heap allocation and - unsafe code. - \end{itemize} - \end{itemize} -\end{frame} - -\begin{frame} - \frametitle{How was it built?} - - At first I wrote a naive version with a number of downsides: - - \begin{itemize} - \item represented values in a traditional dynamic language format, where - every value was the same size. - - \item didn't work well for aggregates (structs, enums, arrays, etc.). - - \item made unsafe programming tricks that make assumptions about low-level - value layout essentially impossible. - \end{itemize} -\end{frame} - -\begin{frame} - \frametitle{How was it built?} - \begin{itemize} - \item Later, a Rust compiler team member proposed a ``Rust abstract - machine'' with specialized value layout which solved my previous problems. - \pause - - \item His proposal was intended for a compile-time function evaluator in the - Rust compiler, so I effectively implemented an experimental version of - that. \pause - - \item After this point, making Miri work well was primarily a software - engineering problem. - \end{itemize} -\end{frame} - -\begin{frame} - \frametitle{Data layout} - \begin{itemize} - \item Memory in Miri is literally a HashMap from ``allocation IDs'' to - ``abstract allocations''. - - \item Allocations are represented by: \pause - \begin{enumerate} - \item An array of \textbf{raw bytes} with a size based on the type of - the value \pause - \item A set of \textbf{relocations} --- pointers into other abstract - allocations \pause - \item A mask determining which bytes are \textbf{undefined} - \end{enumerate} - \end{itemize} -\end{frame} - -\begin{frame}[fragile] - \frametitle{\texttt{square} example} - \begin{center} - \begin{minted}[autogobble,fontsize=\scriptsize]{rust} - // Rust - fn square(n: u64) -> u64 { - n * n - } - - // Generated MIR - fn square(arg0: u64) -> u64 { - let var0: u64; // n // On function entry, Miri creates - // virtual allocations for all the - // arguments, variables, and - // temporaries. - - bb0: { - var0 = arg0; // Copy the argument into `n`. - return = Mul(var0, var0); // Multiply `n` with itself. - goto -> bb1; // Jump to basic block `bb1`. - } - - bb1: { - return; // Return from the current fn. - } - } - \end{minted} - \end{center} -\end{frame} - -\begin{frame}[fragile] - \frametitle{\texttt{sum} example} - \begin{center} - \begin{minted}[autogobble,fontsize=\tiny]{rust} - // Rust - fn sum() -> u64 { - let mut sum = 0; let mut i = 0; - while i < 10 { sum += i; i += 1; } - sum - } - - // Generated MIR - fn sum() -> u64 { - let mut var0: u64; // sum - let mut var1: u64; // i - let mut tmp0: bool; - - bb0: { - // sum = 0; i = 0; - var0 = const 0u64; var1 = const 0u64; goto -> bb1; - } - bb1: { - // if i < 10 { goto bb2; } else { goto bb3; } - tmp0 = Lt(var1, const 10u64); - if(tmp0) -> [true: bb2, false: bb3]; - } - bb2: { - var0 = Add(var0, var1); // sum = sum + i; - var1 = Add(var1, const 1u64); // i = i + 1; - goto -> bb1; - } - bb3: { - return = var0; goto -> bb4; - } - bb4: { return; } - } - \end{minted} - \end{center} -\end{frame} - -\begin{frame}[fragile] - \frametitle{Heap allocations!} - \begin{minted}[autogobble,fontsize=\scriptsize]{rust} - fn make_vec() -> Vec { - // Empty array with space for 4 bytes - allocated on the heap! - let mut vec = Vec::with_capacity(4); - // Initialize the first two slots. - vec.push(1); - vec.push(2); - vec - } - - // For reference: - // struct Vec { capacity: usize, data: *mut T, length: usize } - - // Resulting allocations (on 32-bit little-endian architectures): - // Region A: - // 04 00 00 00 00 00 00 00 02 00 00 00 - // └───(B)───┘ - // - // Region B: - // 01 02 __ __ (underscores denote undefined bytes) - \end{minted} - - \footnotesize{Evaluating the above involves a number of compiler built-ins, - ``unsafe'' code blocks, and more inside the standard library, - but Miri handles it all.} -\end{frame} - -\begin{frame}[fragile] - \frametitle{Unsafe code!} - \begin{minted}[autogobble,fontsize=\scriptsize]{rust} - fn out_of_bounds() -> u8 { - let mut vec = vec![1, 2] - unsafe { *vec.get_unchecked(5) } - } - - // test.rs:3: error: pointer offset outside bounds of allocation - // test.rs:3: unsafe { *vec.get_unchecked(5) } - // ^~~~~~~~~~~~~~~~~~~~~ - - fn undefined_bytes() -> u8 { - let mut vec = Vec::with_capacity(10); - unsafe { *vec.get_unchecked(5) } - } - - // test.rs:3: error: attempted to read undefined bytes - // test.rs:3: unsafe { *vec.get_unchecked(5) } - // ^~~~~~~~~~~~~~~~~~~~~ - \end{minted} -\end{frame} - -\begin{frame} - \frametitle{What can't Miri do?} - \begin{itemize} - \item Miri can't do all the stuff I didn't implement yet. :) - \begin{itemize} - \item non-trivial casts - \item function pointers - \item calling destructors and freeing memory - \item taking target architecture endianess and alignment information - into account when computing data layout - \item handling all constants properly (but, well, Miri might be - replacing the old constants system) - \end{itemize} - \pause - - \item Miri can't do foreign function calls (e.g. calling functions defined - in C or C++), but there is a reasonable way it could be done with libffi. - \begin{itemize} - \item On the other hand, for constant evaluation in the compiler, you - want the evaluator to be deterministic and safe, so FFI calls might be - banned anyway. - \end{itemize} - \pause - - \item Without quite some effort, Miri will probably never handle inline - assembly... - \end{itemize} -\end{frame} - -\begin{frame} - \begin{center} - \LARGE{Questions?} - \end{center} -\end{frame} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Extra slides -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\begin{frame}[fragile] - \frametitle{\texttt{varN} vs. \texttt{argN}} - \begin{center} - \begin{minted}[autogobble,fontsize=\scriptsize]{rust} - // Rust - type Pair = (u64, u64); - fn swap((a, b): Pair) -> Pair { - (b, a) - } - - // Generated MIR - fn swap(arg0: (u64, u64)) -> (u64, u64) { - let var0: u64; // a - let var1: u64; // b - - bb0: { - var0 = arg0.0; // get the 1st part of the pair - var1 = arg0.1; // get the 2nd part of the pair - return = (var1, var0); // build a new pair in the result - goto -> bb1; - } - - bb1: { - return; - } - } - \end{minted} - \end{center} -\end{frame} - -\begin{frame}[fragile] - \frametitle{\texttt{factorial} example} - \begin{center} - \begin{minted}[autogobble,fontsize=\tiny]{rust} - // Rust - fn factorial(n: u64) -> u64 { - (1..n).fold(1, |a, b| a * b) - } - - // Generated MIR - fn factorial(arg0: u64) -> u64 { - let var0: u64; // n - let mut tmp0: Range; // Miri calculates sizes for generics like Range. - let mut tmp1: [closure]; - - bb0: { - var0 = arg0; - - // tmp0 = 1..n - tmp0 = Range { start: const 1u64, end: var0 }; - - // tmp1 = |a, b| a * b - tmp1 = [closure]; - - // This loads the MIR for the `fold` fn from the standard library. - // In general, MIR for any function from any library can be loaded. - // return tmp0.fold(1, tmp1) - return = Range::fold(tmp0, const 1u64, tmp1) -> bb1; - } - - bb1: { - return; - } - } - \end{minted} - \end{center} -\end{frame} - -\end{document} diff --git a/tex/report/latexmkrc b/tex/report/latexmkrc deleted file mode 100644 index 23aa1a481b3e..000000000000 --- a/tex/report/latexmkrc +++ /dev/null @@ -1,12 +0,0 @@ -# vim: ft=perl - -$pdf_mode = 1; -$pdflatex = 'lualatex --shell-escape %O %S'; -$out_dir = 'out'; - -# This improves latexmk's detection of source files and generated files. -$recorder = 1; - -# Ignore always-regenerated *.pyg files from the minted package when considering -# whether to run pdflatex again. -$hash_calc_ignore_pattern{'pyg'} = '.*'; diff --git a/tex/report/miri-report.tex b/tex/report/miri-report.tex deleted file mode 100644 index f8bb37b91133..000000000000 --- a/tex/report/miri-report.tex +++ /dev/null @@ -1,663 +0,0 @@ -% vim: tw=100 - -\documentclass[twocolumn]{article} -\usepackage{blindtext} -\usepackage[hypcap]{caption} -\usepackage{fontspec} -\usepackage[colorlinks, urlcolor={blue!80!black}]{hyperref} -\usepackage[outputdir=out]{minted} -\usepackage{relsize} -\usepackage{xcolor} - -\setmonofont{Source Code Pro}[ - BoldFont={* Medium}, - BoldItalicFont={* Medium Italic}, - Scale=MatchLowercase, -] - -\newcommand{\rust}[1]{\mintinline{rust}{#1}} - -\begin{document} - -\title{Miri: \\ \smaller{An interpreter for Rust's mid-level intermediate representation}} -\author{Scott Olson\footnote{\href{mailto:scott@solson.me}{scott@solson.me}} \\ - \smaller{Supervised by Christopher Dutchyn}} -\date{April 12th, 2016} -\maketitle - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Abstract} - -The increasing need for safe low-level code in contexts like operating systems and browsers is -driving the development of Rust\footnote{\url{https://www.rust-lang.org}}, a programming language -promising high performance without the risk of memory unsafety. To make programming more convenient, -it's often desirable to be able to generate code or perform some computation at compile-time. The -former is mostly covered by Rust's existing macro feature or build-time code generation, but the -latter is currently restricted to a limited form of constant evaluation capable of little beyond -simple math. - -The architecture of the compiler at the time the existing constant evaluator was built limited its -potential for future extension. However, a new intermediate representation was recently -added\footnote{\href{https://github.com/rust-lang/rfcs/blob/master/text/1211-mir.md}{Rust RFC \#1211: Mid-level IR (MIR)}} -to the Rust compiler between the abstract syntax tree and the back-end LLVM IR, called mid-level -intermediate representation, or MIR for short. This report will demonstrate that writing an -interpreter for MIR is a surprisingly effective approach for supporting a large proportion of Rust's -features in compile-time execution. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Background} - -The Rust compiler generates an instance of \rust{Mir} for each function [\autoref{fig:mir}]. Each -\rust{Mir} structure represents a control-flow graph for a given function, and contains a list of -``basic blocks'' which in turn contain a list of statements followed by a single terminator. Each -statement is of the form \rust{lvalue = rvalue}. An \rust{Lvalue} is used for referencing variables -and calculating addresses such as when dereferencing pointers, accessing fields, or indexing arrays. -An \rust{Rvalue} represents the core set of operations possible in MIR, including reading a value -from an lvalue, performing math operations, creating new pointers, structures, and arrays, and so -on. Finally, a terminator decides where control will flow next, optionally based on the value of a -boolean or integer. - -\begin{figure}[ht] - \begin{minted}[autogobble]{rust} - struct Mir { - basic_blocks: Vec, - // ... - } - - struct BasicBlockData { - statements: Vec, - terminator: Terminator, - // ... - } - - struct Statement { - lvalue: Lvalue, - rvalue: Rvalue - } - - enum Terminator { - Goto { target: BasicBlock }, - If { - cond: Operand, - targets: [BasicBlock; 2] - }, - // ... - } - \end{minted} - \caption{MIR (simplified)} - \label{fig:mir} -\end{figure} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{First implementation} - -\subsection{Basic operation} - -To investigate the possibility of executing Rust at compile-time I wrote an interpreter for MIR -called Miri\footnote{\url{https://github.com/solson/miri}}. The structure of the interpreter closely -mirrors the structure of MIR itself. It starts executing a function by iterating the statement list -in the starting basic block, translating the lvalue into a pointer and using the rvalue to decide -what to write into that pointer. Evaluating the rvalue may involve reads (such as for the two sides -of a binary operation) or construction of new values. When the terminator is reached, it is used to -decide which basic block to jump to next. Finally, Miri repeats this entire process, reading -statements from the new block. - -\subsection{Function calls} - -To handle function call terminators\footnote{Calls occur only as terminators, never as rvalues.}, -Miri is required to store some information in a virtual call stack so that it may pick up where it -left off when the callee returns. Each stack frame stores a reference to the \rust{Mir} for the -function being executed, its local variables, its return value location\footnote{Return value -pointers are passed in by callers.}, and the basic block where execution should resume. When Miri -encounters a \rust{Return} terminator in the MIR, it pops one frame off the stack and resumes the -previous function. Miri's execution ends when the function it was initially invoked with returns, -leaving the call stack empty. - -It should be noted that Miri does not itself recurse when a function is called; it merely pushes a -virtual stack frame and jumps to the top of the interpreter loop. Consequently, Miri can interpret -deeply recursive programs without overflowing its native call stack. This approach would allow Miri -to set a virtual stack depth limit and report an error when a program exceeds it. - -\subsection{Flaws} - -This version of Miri supported quite a bit of the Rust language, including booleans, integers, -if-conditions, while-loops, structures, enums, arrays, tuples, pointers, and function calls, -requiring approximately 400 lines of Rust code. However, it had a particularly naive value -representation with a number of downsides. It resembled the data layout of a dynamic language like -Ruby or Python, where every value has the same size\footnote{An \rust{enum} is a discriminated union -with a tag and space to fit the largest variant, regardless of which variant it contains.} in the -interpreter: - -\begin{minted}[autogobble]{rust} - enum Value { - Uninitialized, - Bool(bool), - Int(i64), - Pointer(Pointer), // index into stack - Aggregate { - variant: usize, - data: Pointer, - }, - } -\end{minted} - -This representation did not work well for aggregate types\footnote{That is, structures, enums, -arrays, tuples, and closures.} and required strange hacks to support them. Their contained values -were allocated elsewhere on the stack and pointed to by the aggregate value, which made it more -complicated to implement copying aggregate values from place to place. - -Moreover, while the aggregate issues could be worked around, this value representation made common -unsafe programming tricks (which make assumptions about the low-level value layout) fundamentally -impossible. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Current implementation} - -Roughly halfway through my time working on Miri, Eduard -Burtescu\footnote{\href{https://github.com/eddyb}{eddyb on GitHub}} from the Rust compiler -team\footnote{\url{https://www.rust-lang.org/team.html\#Compiler}} made a post on Rust's internal -forums about a ``Rust Abstract Machine'' -specification\footnote{\href{https://internals.rust-lang.org/t/mir-constant-evaluation/3143/31}{Burtescu's -reply on ``MIR constant evaluation''}} which could be used to implement more powerful compile-time -function execution, similar to what is supported by C++14's \mintinline{cpp}{constexpr} feature. -After clarifying some of the details of the data layout with Burtescu via IRC, I started -implementing it in Miri. - -\subsection{Raw value representation} - -The main difference in the new value representation was to represent values by ``abstract -allocations'' containing arrays of raw bytes with different sizes depending on their types. This -mimics how Rust values are represented when compiled for physical machines. In addition to the raw -bytes, allocations carry information about pointers and undefined bytes. - -\begin{minted}[autogobble]{rust} - struct Memory { - map: HashMap, - next_id: AllocId, - } - - struct Allocation { - bytes: Vec, - relocations: BTreeMap, - undef_mask: UndefMask, - } -\end{minted} - -\subsubsection{Relocations} - -The abstract machine represents pointers through ``relocations'', which are analogous to relocations -in linkers\footnote{\href{https://en.wikipedia.org/wiki/Relocation_(computing)}{Relocation -(computing) - Wikipedia}}. Instead of storing a global memory address in the raw byte representation -like on a physical machine, we store an offset from the start of the target allocation and add an -entry to the relocation table which maps the index of the offset bytes to the target allocation. - -In \autoref{fig:reloc}, the relocation stored at offset 0 in \rust{y} points to offset 2 in \rust{x} -(the 2nd 16-bit integer). Thus, the relocation table for \rust{y} is \texttt{\{0 => -x\}}, meaning the next $N$ bytes after offset 0 denote an offset into allocation \rust{x} where $N$ -is the size of a pointer (4 in this example). The example shows this as a labelled line beneath the -offset bytes. - -In effect, the abstract machine represents pointers as \rust{(allocation_id, offset)} pairs. This -makes it easy to detect when pointer accesses go out of bounds. - -\begin{figure}[hb] - \begin{minted}[autogobble]{rust} - let x: [i16; 3] = [0xAABB, 0xCCDD, 0xEEFF]; - let y = &x[1]; - // x: BB AA DD CC FF EE (6 bytes) - // y: 02 00 00 00 (4 bytes) - // └───(x)───┘ - \end{minted} - \caption{Example relocation on 32-bit little-endian} - \label{fig:reloc} -\end{figure} - -\subsubsection{Undefined byte mask} - -The final piece of an abstract allocation is the undefined byte mask. Logically, we store a boolean -for the definedness of every byte in the allocation, but there are multiple ways to make the storage -more compact. I tried two implementations: one based on the endpoints of alternating ranges of -defined and undefined bytes and the other based on a bitmask. The former is more compact but I found -it surprisingly difficult to update cleanly. I currently use the much simpler bitmask system. - -See \autoref{fig:undef} for an example of an undefined byte in a value, represented by underscores. -Note that there is a value for the second byte in the byte array, but it doesn't matter what it is. -The bitmask would be $10_2$, i.e.\ \rust{[true, false]}. - -\begin{figure}[hb] - \begin{minted}[autogobble]{rust} - let x: [u8; 2] = unsafe { - [1, std::mem::uninitialized()] - }; - // x: 01 __ (2 bytes) - \end{minted} - \caption{Example undefined byte} - \label{fig:undef} -\end{figure} - -\subsection{Computing data layout} - -Currently, the Rust compiler's data layouts for types are hidden from Miri, so it does its own data -layout computation which will not always match what the compiler does, since Miri doesn't take -target type alignments into account. In the future, the Rust compiler may be modified so that Miri -can use the exact same data layout. - -Miri's data layout calculation is a relatively simple transformation from Rust types to a structure -with constant size values for primitives and sets of fields with offsets for aggregate types. These -layouts are cached for performance. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Deterministic execution} -\label{sec:deterministic} - -In order to be effective as a compile-time evaluator, Miri must have \emph{deterministic execution}, -as explained by Burtescu in the ``Rust Abstract Machine'' post. That is, given a function and -arguments to that function, Miri should always produce identical results. This is important for -coherence in the type checker when constant evaluations are involved in types, such as for sizes of -array types: - -\begin{minted}[autogobble,mathescape]{rust} - const fn get_size() -> usize { /* $\ldots$ */ } - let array: [i32; get_size()]; -\end{minted} - -Since Miri allows execution of unsafe code\footnote{In fact, the distinction between safe and unsafe -doesn't exist at the MIR level.}, it is specifically designed to remain safe while interpreting -potentially unsafe code. When Miri encounters an unrecoverable error, it reports it via the Rust -compiler's usual error reporting mechanism, pointing to the part of the original code where the -error occurred. Below is an example from Miri's -repository.\footnote{\href{https://github.com/solson/miri/blob/master/test/errors.rs}{miri/test/errors.rs}} - -\begin{minted}[autogobble]{rust} - let b = Box::new(42); - let p: *const i32 = &*b; - drop(b); - unsafe { *p } - // ~~ error: dangling pointer - // was dereferenced -\end{minted} -\label{dangling-pointer} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Language support} - -In its current state, Miri supports a large proportion of the Rust language, detailed below. The -major exception is a lack of support for FFI\footnote{Foreign Function Interface, e.g.\ calling -functions defined in Assembly, C, or C++.}, which eliminates possibilities like reading and writing -files, user input, graphics, and more. However, for compile-time evaluation in Rust, this limitation -is desired. - -\subsection{Primitives} - -Miri supports booleans, integers of various sizes and signed-ness (i.e.\ \rust{i8}, \rust{i16}, -\rust{i32}, \rust{i64}, \rust{isize}, \rust{u8}, \rust{u16}, \rust{u32}, \rust{u64}, \rust{usize}), -and unary and binary operations over these types. The \rust{isize} and \rust{usize} types will be -sized according to the target machine's pointer size just like in compiled Rust. The \rust{char} and -float types (\rust{f32}, \rust{f64}) are not supported yet, but there are no known barriers to doing -so. - -When examining a boolean in an \rust{if} condition, Miri will report an error if its byte -representation is not precisely 0 or 1, since having any other value for a boolean is undefined -behaviour in Rust. The \rust{char} type will have similar restrictions once it is implemented. - -\subsection{Pointers} - -Both references and raw pointers are supported, with essentially no difference between them in Miri. -It is also possible to do pointer comparisons and math. However, a few operations are considered -errors and a few require special support. - -Firstly, pointers into the same allocations may be compared for ordering, but pointers into -different allocations are considered unordered and Miri will complain if you attempt this. The -reasoning is that different allocations may have different orderings in the global address space at -runtime, making this non-deterministic. However, pointers into different allocations \emph{may} be -compared for direct equality (they are always unequal). - -Secondly, pointers represented using relocations may be compared against pointers casted from -integers (e.g.\ \rust{0 as *const i32}) for things like null pointer checks. To handle these cases, -Miri has a concept of ``integer pointers'' which are always unequal to abstract pointers. Integer -pointers can be compared and operated upon freely. However, note that it is impossible to go from an -integer pointer to an abstract pointer backed by a relocation. It is not valid to dereference an -integer pointer. - -\subsubsection{Slice pointers} - -Rust supports pointers to ``dynamically-sized types'' such as \rust{[T]} and \rust{str} which -represent arrays of indeterminate size. Pointers to such types contain an address \emph{and} the -length of the referenced array. Miri supports these fully. - -\subsubsection{Trait objects} - -Rust also supports pointers to ``trait objects'' which represent some type that implements a trait, -with the specific type unknown at compile-time. These are implemented using virtual dispatch with a -vtable, similar to virtual methods in C++. Miri does not currently support these at all. - -\subsection{Aggregates} - -Aggregates include types declared with \rust{struct} or \rust{enum} as well as tuples, arrays, and -closures. Miri supports all common usage of all of these types. The main missing piece is to handle -\texttt{\#[repr(..)]} annotations which adjust the layout of a \rust{struct} or \rust{enum}. - -\subsection{Lvalue projections} - -This category includes field accesses, dereferencing, accessing data in an \rust{enum} variant, and -indexing arrays. Miri supports all of these, including nested projections such as -\rust{*foo.bar[2]}. - -\subsection{Control flow} - -All of Rust's standard control flow features, including \rust{loop}, \rust{while}, \rust{for}, -\rust{if}, \rust{if let}, \rust{while let}, \rust{match}, \rust{break}, \rust{continue}, and -\rust{return} are supported. In fact, supporting these was quite easy since the Rust compiler -reduces them all down to a small set of control-flow graph primitives in MIR. - -\subsection{Function calls} - -As previously described, Miri supports arbitrary function calls without growing the native stack -(only its virtual call stack). It is somewhat limited by the fact that cross-crate\footnote{A crate -is a single Rust library (or executable).} calls only work for functions whose MIR is stored in -crate metadata. This is currently true for \rust{const}, generic, and inline functions. -A branch of the compiler could be made that stores MIR for all functions. This would be a non-issue -for a compile-time evaluator based on Miri, since it would only call \rust{const fn}s. - -\subsubsection{Method calls} - -Miri supports trait method calls, including invoking all the compiler-internal lookup needed to find -the correct implementation of the method. - -\subsubsection{Closures} - -Calls to closures are also supported with the exception of one edge case\footnote{Calling a closure -that takes a reference to its captures via a closure interface that passes the captures by value is -not yet supported.}. The value part of a closure that holds the captured variables is handled as an -aggregate and the function call part is mostly the same as a trait method call, but with the added -complication that closures use a separate calling convention within the compiler. - -\subsubsection{Function pointers} - -Function pointers are not currently supported by Miri, but there is a relatively simple way they -could be encoded using a relocation with a special reserved allocation identifier. The offset of the -relocation would determine which function it points to in a special array of functions in the -interpreter. - -\subsubsection{Intrinsics} - -To support unsafe code, and in particular to support Rust's standard library, it became clear that -Miri would have to support calls to compiler -intrinsics\footnote{\url{https://doc.rust-lang.org/stable/std/intrinsics/index.html}}. Intrinsics -are function calls which cause the Rust compiler to produce special-purpose code instead of a -regular function call. Miri simply recognizes intrinsic calls by their unique -ABI\footnote{Application Binary Interface, which defines calling conventions. Includes ``C'', -``Rust'', and ``rust-intrinsic''.} and name and runs special-purpose code to handle them. - -An example of an important intrinsic is \rust{size_of} which will cause Miri to write the size of -the type in question to the return value location. The Rust standard library uses intrinsics heavily -to implement various data structures, so this was a major step toward supporting them. Intrinsics -have been implemented on a case-by-case basis as tests which required them were written, and not all -intrinsics are supported yet. - -\subsubsection{Generic function calls} - -Miri needs special support for generic function calls since Rust is a \emph{monomorphizing} -compiler, meaning it generates a special version of each function for each distinct set of type -parameters it gets called with. Since functions in MIR are still polymorphic, Miri has to do the -same thing and substitute function type parameters into all types it encounters to get fully -concrete, monomorphized types. For example, in\ldots - -\begin{minted}[autogobble]{rust} - fn some(t: T) -> Option { Some(t) } -\end{minted} - -\ldots{}Miri needs to know the size of \rust{T} to copy the right amount of bytes from the argument -to the return value. If we call \rust{some(10i32)} Miri will execute \rust{some} knowing that -\rust{T = i32} and generate a representation for \rust{Option}. - -Miri currently does this monomorphization lazily on-demand unlike the Rust back-end which does it -all ahead of time. - -\subsection{Heap allocations} - -The next piece of the puzzle for supporting interesting programs (and the standard library) was heap -allocations. There are two main interfaces for heap allocation in Rust: the built-in \rust{Box} -rvalue in MIR and a set of C ABI foreign functions including \rust{__rust_allocate}, -\rust{__rust_reallocate}, and \rust{__rust_deallocate}. These correspond approximately to -\mintinline{c}{malloc}, \mintinline{c}{realloc}, and \mintinline{c}{free} in C. - -The \rust{Box} rvalue allocates enough space for a single value of a given type. This was easy to -support in Miri. It simply creates a new abstract allocation in the same manner as for -stack-allocated values, since there's no major difference between them in Miri. - -The allocator functions, which are used to implement things like Rust's standard \rust{Vec} type, -were a bit trickier. Rust declares them as \rust{extern "C" fn} so that different allocator -libraries can be linked in at the user's option. Since Miri doesn't actually support FFI and wants -full control of allocations for safety, it ``cheats'' and recognizes these allocator functions in -essentially the same way it recognizes compiler intrinsics. Then, a call to \rust{__rust_allocate} -simply creates another abstract allocation with the requested size and \rust{__rust_reallocate} -grows one. - -In the future, Miri should also track which allocations came from \rust{__rust_allocate} so it can -reject reallocate or deallocate calls on stack allocations. - -\subsection{Destructors} - -When a value which ``owns'' some resource (like a heap allocation or file handle) goes out of scope, -Rust inserts \emph{drop glue} that calls the user-defined destructor for the type if it has one, and -then drops all of the subfields. Destructors for types like \rust{Box} and \rust{Vec} -deallocate heap memory. - -Miri doesn't yet support calling user-defined destructors, but it has most of the machinery in place -to do so already. There \emph{is} support for dropping \rust{Box} types, including deallocating -their associated allocations. This is enough to properly execute the dangling pointer example in -\autoref{sec:deterministic}. - -\subsection{Constants} - -Only basic integer, boolean, string, and byte-string literals are currently supported. Evaluating -more complicated constant expressions in their current form would be a somewhat pointless exercise -for Miri. Instead, we should lower constant expressions to MIR so Miri can run them directly, which -is precisely what would need be done to use Miri as the compiler's constant evaluator. - -\subsection{Static variables} - -Miri doesn't currently support statics, but they would need support similar to constants. Also note -that while it would be invalid to write to static (i.e.\ global) variables in Miri executions, it -would probably be fine to allow reads. - -\subsection{Standard library} - -Throughout the implementation of the above features, I often followed this process: - -\begin{enumerate} - \item Try using a feature from the standard library. - \item See where Miri runs into stuff it can't handle. - \item Fix the problem. - \item Go to 1. -\end{enumerate} - -At present, Miri supports a number of major non-trivial features from the standard library along -with tons of minor features. Smart pointer types such as \rust{Box}, \rust{Rc}\footnote{Reference -counted shared pointer} and \rust{Arc}\footnote{Atomically reference-counted thread-safe shared -pointer} all seem to work. I've also tested using the shared smart pointer types with \rust{Cell} -and \rust{RefCell}\footnote{\href{https://doc.rust-lang.org/stable/std/cell/index.html}{Rust -documentation for cell types}} for internal mutability, and that works as well, although -\rust{RefCell} can't ever be borrowed twice until I implement destructor calls, since a destructor -is what releases the borrow. - -But the standard library collection I spent the most time on was \rust{Vec}, the standard -dynamically-growable array type, similar to C++'s \texttt{std::vector} or Java's -\texttt{java.util.ArrayList}. In Rust, \rust{Vec} is an extremely pervasive collection, so -supporting it is a big win for supporting a larger swath of Rust programs in Miri. - -See \autoref{fig:vec} for an example (working in Miri today) of initializing a \rust{Vec} with a -small amount of space on the heap and then pushing enough elements to force it to reallocate its -data array. This involves cross-crate generic function calls, unsafe code using raw pointers, heap -allocation, handling of uninitialized memory, compiler intrinsics, and more. - -\begin{figure}[t] - \begin{minted}[autogobble]{rust} - struct Vec { - data: *mut T, // 4 byte pointer - capacity: usize, // 4 byte integer - length: usize, // 4 byte integer - } - - let mut v: Vec = - Vec::with_capacity(2); - // v: 00 00 00 00 02 00 00 00 00 00 00 00 - // └─(data)──┘ - // data: __ __ - - v.push(1); - // v: 00 00 00 00 02 00 00 00 01 00 00 00 - // └─(data)──┘ - // data: 01 __ - - v.push(2); - // v: 00 00 00 00 02 00 00 00 02 00 00 00 - // └─(data)──┘ - // data: 01 02 - - v.push(3); - // v: 00 00 00 00 04 00 00 00 03 00 00 00 - // └─(data)──┘ - // data: 01 02 03 __ - \end{minted} - \caption{\rust{Vec} example on 32-bit little-endian} - \label{fig:vec} -\end{figure} - -Miri supports unsafe operations on \rust{Vec} like \rust{v.set_len(10)} or -\rust{v.get_unchecked(2)}, provided that such calls do no invoke undefined behaviour. If a call -\emph{does} invoke undefined behaviour, Miri will abort with an appropriate error message (see -\autoref{fig:vec-error}). - -\begin{figure}[t] - \begin{minted}[autogobble]{rust} - fn out_of_bounds() -> u8 { - let v = vec![1, 2]; - let p = unsafe { v.get_unchecked(5) }; - *p + 10 - // ~~ error: pointer offset outside - // bounds of allocation - } - - fn undefined_bytes() -> u8 { - let v = Vec::::with_capacity(10); - let p = unsafe { v.get_unchecked(5) }; - *p + 10 - // ~~~~~~~ error: attempted to read - // undefined bytes - } - \end{minted} - \caption{\rust{Vec} examples with undefined behaviour} - \label{fig:vec-error} -\end{figure} - -\newpage - -Here is one final code sample Miri can execute that demonstrates many features at once, including -vectors, heap allocation, iterators, closures, raw pointers, and math: - -\begin{minted}[autogobble]{rust} - let x: u8 = vec![1, 2, 3, 4] - .into_iter() - .map(|x| x * x) - .fold(0, |x, y| x + y); - // x: 1e (that is, the hex value - // 0x1e = 30 = 1 + 4 + 9 + 16) -\end{minted} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Future directions} - -\subsection{Finishing the implementation} - -There are a number of pressing items on my to-do list for Miri, including: - -\begin{itemize} - \item A much more comprehensive and automated test suite. - \item User-defined destructor calls. - \item Non-trivial casts between primitive types like integers and pointers. - \item Handling statics and global memory. - \item Reporting errors for all undefined behaviour.\footnote{\href{https://doc.rust-lang.org/reference.html\#behavior-considered-undefined}{The Rust reference on what is considered undefined behaviour}} - \item Function pointers. - \item Accounting for target machine primitive type alignment and endianness. - \item Optimizations (undefined byte masks, tail-calls). - \item Benchmarking Miri vs. unoptimized Rust. - \item Various \texttt{TODO}s and \texttt{FIXME}s left in the code. - \item Integrating into the compiler proper. -\end{itemize} - -\subsection{Future projects} - -Other possible Miri-related projects include: - -\begin{itemize} - \item A read-eval-print-loop (REPL) for Rust, which may be easier to implement on top of Miri than - the usual LLVM back-end. - \item A graphical or text-mode debugger that steps through MIR execution one statement at a time, - for figuring out why some compile-time execution is raising an error or simply learning how Rust - works at a low level. - \item A less restricted version of Miri that is able to run foreign functions from C/C++ and - generally has full access to the operating system. Such an interpreter could be used to more - quickly prototype changes to the Rust language that would otherwise require changes to the LLVM - back-end. - \item Unit-testing the compiler by comparing the results of Miri's execution against the results - of LLVM-compiled machine code's execution. This would help to guarantee that compile-time - execution works the same as runtime execution. - \item Some kind of Miri-based symbolic evaluator that examines multiple possible code paths at - once to determine if undefined behaviour could be observed on any of them. -\end{itemize} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Final thoughts} - -Writing an interpreter which models values of varying sizes, stack and heap allocation, unsafe -memory operations, and more requires some unconventional techniques compared to conventional -interpreters targeting dynamically-typed languages. However, aside from the somewhat complicated -abstract memory model, making Miri work was primarily a software engineering problem, and not a -particularly tricky one. This is a testament to MIR's suitability as an intermediate representation -for Rust---removing enough unnecessary abstraction to keep it simple. For example, Miri doesn't even -need to know that there are different kinds of loops, or how to match patterns in a \rust{match} -expression. - -Another advantage to targeting MIR is that any new features at the syntax-level or type-level -generally require little to no change in Miri. For example, when the new ``question mark'' syntax -for error handling\footnote{ - \href{https://github.com/rust-lang/rfcs/blob/master/text/0243-trait-based-exception-handling.md} - {Question mark syntax RFC}} -was added to rustc, Miri required no change to support it. -When specialization\footnote{ - \href{https://github.com/rust-lang/rfcs/blob/master/text/1210-impl-specialization.md} - {Specialization RFC}} -was added, Miri supported it with just minor changes to trait method lookup. - -Of course, Miri also has limitations. The inability to execute FFI and inline assembly reduces the -amount of Rust programs Miri could ever execute. The good news is that in the constant evaluator, -FFI can be stubbed out in cases where it makes sense, like I did with \rust{__rust_allocate}. For a -version of Miri not intended for constant evaluation, it may be possible to use libffi to call C -functions from the interpreter. - -In conclusion, Miri is a surprisingly effective project, and a lot of fun to implement. Due to MIR's -tendency to collapse multiple source-level features into one, I often ended up supporting features I -hadn't explicitly intended to. I am excited to work with the compiler team going forward to try to -make Miri useful for constant evaluation in Rust. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Thanks} - -A big thanks goes to Eduard Burtescu for writing the abstract machine specification and answering my -incessant questions on IRC, to Niko Matsakis for coming up with the idea for Miri and supporting my -desire to work with the Rust compiler, and to my research supervisor Christopher Dutchyn. Thanks -also to everyone else on the compiler team and on Mozilla IRC who helped me figure stuff out. -Finally, thanks to Daniel Keep and everyone else who helped fix my numerous writing mistakes. - -\end{document} diff --git a/xargo/Cargo.lock b/xargo/Cargo.lock deleted file mode 100644 index 031ad9a87954..000000000000 --- a/xargo/Cargo.lock +++ /dev/null @@ -1,4 +0,0 @@ -[root] -name = "miri-xargo" -version = "0.0.0" - diff --git a/xargo/Cargo.toml b/xargo/Cargo.toml deleted file mode 100644 index 9129c105b112..000000000000 --- a/xargo/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "miri-xargo" -description = "A dummy project for building libstd with xargo." -version = "0.0.0" - -[dependencies] diff --git a/xargo/Xargo.toml b/xargo/Xargo.toml deleted file mode 100644 index 4b650b97de56..000000000000 --- a/xargo/Xargo.toml +++ /dev/null @@ -1,2 +0,0 @@ -[dependencies] -std = {features = ["panic_unwind", "jemalloc", "backtrace"]} diff --git a/xargo/build.sh b/xargo/build.sh deleted file mode 100755 index 15a7c770910d..000000000000 --- a/xargo/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd "$(dirname "$0")" -RUSTFLAGS='-Zalways-encode-mir -Zmir-emit-validate=1' xargo build diff --git a/xargo/src/lib.rs b/xargo/src/lib.rs deleted file mode 100644 index e69de29bb2d1..000000000000