summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2016-05-18trans: callee: normalize trait_ref before useWang Xuerui-0/+36
Fixes #33436 and #33461. Test case is from #33461.
2016-05-17Don't use env::current_exe with libbacktraceSteven Fackler-6/+10
If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc #21889
2016-05-04trans: always register an item's symbol, even if duplicated.Eduard Burtescu-33/+34
2016-05-04Check transmutes between types without statically known sizes.Eduard Burtescu-21/+75
2016-05-04Make data-layout mandatory in target specs.Eduard Burtescu-0/+1
2016-05-04Add regression test for #32797 (fixes #32797)Jeffrey Seyfried-0/+21
2016-05-04Add testJeffrey Seyfried-0/+26
2016-04-12std: Stabilize APIs for the 1.9 releaseAlex Crichton-19/+12
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-12Fix beta branchBrian Anderson-2/+0
This test tests a message that is only displayed on nightly.
2016-04-11Auto merge of #32850 - jseyfried:add_tests, r=alexcrichtonbors-0/+57
resolve: Add regression tests for fixed issues This adds regression tests for fixed issues in resolve (closes #22146, closes #24883, closes #26930). r? @eddyb
2016-04-10Auto merge of #32816 - eddyb:variadic-fn-item, r=Aatchbors-6/+28
Blacklist fn item types from being used with variadic functions. Fixes #32201 by adding fn types to the variadic blacklist which currently includes `bool`, `i8`, `u8`, `i16`, `u16` and `f32`.
2016-04-08Auto merge of #32773 - mitaa:rdoc-ttfn-json, r=alexcrichtonbors-29/+0
rustdoc: Remove the json-{input, output} format (for reference #32698) fixes #25108 r? @alexcrichton
2016-04-09Add regression test for #26930Jeffrey Seyfried-0/+20
2016-04-09Add regression test for #24883Jeffrey Seyfried-0/+28
2016-04-09Add regression test for #22146Jeffrey Seyfried-0/+9
2016-04-08Blacklist fn item types from being used with variadic functions.Eduard Burtescu-6/+28
2016-04-07Auto merge of #32800 - Manishearth:rollup, r=Manishearthbors-0/+22
Rollup of 7 pull requests - Successful merges: #32687, #32729, #32731, #32732, #32734, #32737, #32741 - Failed merges:
2016-04-07Rollup merge of #32732 - dotdash:ext_arg, r=eddybManish Goregaokar-0/+22
Handle integer-extending for C ABI We need to supply sext/zext attributes to LLVM to ensure that arguments are extended to the appropriate width in the correct way. Most platforms extend integers less than 32 bits, though not all.
2016-04-07Auto merge of #32016 - nikomatsakis:incr-comp-save, r=mwbors-8/+165
Save/load incremental compilation dep graph Contains the code to serialize/deserialize the dep graph to disk between executions. We also hash the item contents and compare to the new hashes. Also includes a unit test harness. There are definitely some known limitations, such as https://github.com/rust-lang/rust/issues/32014 and https://github.com/rust-lang/rust/issues/32015, but I am leaving those for follow-up work. Note that this PR builds on https://github.com/rust-lang/rust/pull/32007, so the overlapping commits can be excluded from review. r? @michaelwoerister
2016-04-07Rollup merge of #32789 - jseyfried:fix_duplicate_resolve_errors, r=eddybManish Goregaokar-31/+7
resolve: Avoid emitting redundant path resolution errors This PR avoids emitting redundant path resolution errors in `resolve` (fixes #32760). r? @eddyb
2016-04-07Rollup merge of #32674 - jseyfried:1422_groundwork, r=nikomatsakisManish Goregaokar-0/+55
Lay groundwork for RFC 1422 and improve `PrivateItemsInPublicInterfacesVisitor` This PR lays groundwork for RFC 1422 (cc #32409) and improves `PrivateItemsInPublicInterfacesVisitor`. More specifically, it - Refactors away `hir::Visibility::inherit_from`, the semantics of which are obsolete. - Makes `hir::Visibility` non-`Copy` so that we will be able to add new variants to represent `pub(restricted)` (for example, `Visibility::Restricted(Path)`). - Adds a new `Copy` type `ty::Visibility` that represents a visibility value, i.e. a characterization of where an item is accessible. This is able to represent `pub(restricted)` visibilities. - Improves `PrivateItemsInPublicInterfacesVisitor` so that it checks for items in an interface that are less visible than the interface. This fixes #30079 but doesn't change any other behavior. r? @nikomatsakis
2016-04-07Auto merge of #32583 - arielb1:need-a-bound, r=nikomatsakisbors-364/+409
Suggest adding a where-clause when that can help Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it. r? @nikomatsakis
2016-04-07test the substs ppaux code both with and without -Z verboseAriel Ben-Yehuda-47/+61
2016-04-07Auto merge of #32649 - Amanieu:intrinsic_monomorphization_assert, r=eddybbors-0/+44
Fix LLVM assert when handling bad intrinsic monomorphizations Passing an invalid type to certain intrinsics would trigger an LLVM assert even though the invalid type was caught by the compiler. r? @eddyb
2016-04-07Fix fallout in testsJeffrey Seyfried-31/+7
2016-04-07Add test for #30079Jeffrey Seyfried-0/+55
2016-04-07Remove rustdocs json formatmitaa-29/+0
2016-04-06Fix test cases to reflect that #32014...went awayNiko Matsakis-4/+3
Not sure what was the bug. Fixes #32014.
2016-04-06Rollup merge of #32761 - tshepang:assert, r=steveklabnikSteve Klabnik-8/+8
avoid "==" in assert! when one of the values is a bool Is suspect this is something of an idiom
2016-04-06Fix LLVM assert when handling bad intrinsic monomorphizationsAmanieu d'Antras-0/+44
2016-04-06add incremental test runner and some testsNiko Matsakis-0/+158
2016-04-06restructure rustc options relating to incr. comp.Niko Matsakis-8/+8
You can now pass `-Z incremental=dir` as well as saying `-Z query-dep-graph` if you want to enable queries for some other purpose. Accessor functions take the place of computed boolean flags.
2016-04-06rustc: retire hir::map's paths.Eduard Burtescu-1/+1
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-9/+4
2016-04-06avoid "==" in assert! when one of the values is a boolTshepang Lekhonkhobe-8/+8
2016-04-05improve the printing of substs and trait-refsAriel Ben-Yehuda-200/+247
2016-04-05remove obsolete testsAriel Ben-Yehuda-82/+0
the meaning of these tests had changed completely over the years and now they are only a maintenance burden.
2016-04-05improve error messageAriel Ben-Yehuda-16/+16
2016-04-05suggest adding a where-clause when that can helpAriel Ben-Yehuda-274/+340
suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it.
2016-04-05Auto merge of #32743 - Manishearth:rollup, r=Manishearthbors-0/+183
Rollup of 11 pull requests - Successful merges: #32403, #32596, #32675, #32678, #32685, #32686, #32692, #32710, #32712, #32714, #32715 - Failed merges: #32488
2016-04-05Auto merge of #32742 - eddyb:cast-fns, r=dotdashbors-2/+13
trans: don't declare symbols that were already imported. Fixes #32740 by checking for a declaration before attempting a new one. Before, `LLVMGetOrInsertFunction` was called for a existing import, but with a different type. The returned value was a cast function pointer instead of a declaration, and we gave this value to `llvm::SetFunctionCallConv` & friends , which triggered an LLVM assertion.
2016-04-05Rollup merge of #32712 - jonas-schievink:autoderef-fields-for-fn-ty, r=nagisaManish Goregaokar-0/+25
Autoderef when suggesting to call `(self.field)` Fixes #32128
2016-04-05Rollup merge of #32710 - jonas-schievink:consider-last-semi, r=nagisaManish Goregaokar-0/+23
Fix "consider removing this semicolon" help Check last statement in a block, not the first. Example of current weirdness: http://is.gd/w80J9h The help was only rarely emitted, and if so, often incorrectly (see above playpen). It was basically only useful with single-statement functions.
2016-04-05Rollup merge of #32678 - mitaa:rdoc-stripped, r=alexcrichtonManish Goregaokar-0/+113
rustdoc: make rustdoc less pass-aware Instead of hardcoding knowledge about the strip-private pass into the rendering process we represent (some) stripped items as `ItemEnum::StrippedItem`. Rustdoc will, for example, generate redirect pages for public items contained in private modules which have been re-exported to somewhere externally reachable - this will now not only work for the `strip-private` pass, but for other passes as well, such as the `strip-hidden` pass. r? @alexcrichton
2016-04-05Rollup merge of #32403 - vlastachu:super_in_path, r=jseyfriedManish Goregaokar-0/+22
Fix issue: Global paths in `use` directives can begin with `super` or `self` #32225 This PR fixes #32225 by warning on `use ::super::...` and `use ::self::...` on `resolve`. Current changes is the most minimal and ad-hoc.
2016-04-05trans: don't declare symbols that were already imported.Eduard Burtescu-2/+13
2016-04-05Fixes bug which accepting using `super` in use statemet.vlastachu-0/+22
Issue: #32225
2016-04-04Auto merge of #32328 - jseyfried:coherence, r=nikomatsakisbors-6/+11
resolve: Improve import failure detection and lay groundwork for RFC 1422 This PR improves import failure detection and lays some groundwork for RFC 1422. More specifically, it - Avoids recomputing the resolution of an import directive's module path. - Refactors code in `resolve_imports` that does not scale to the arbitrarily many levels of visibility that will be required by RFC 1422. - Replaces `ModuleS`'s fields `public_glob_count`, `private_glob_count`, and `resolved_globs` with a list of glob import directives `globs`. - Replaces `NameResolution`'s fields `pub_outstanding_references` and `outstanding_references` with a field `single_imports` of a newly defined type `SingleImports`. - Improves import failure detection by detecting cycles that include single imports (currently, only cycles of globs are detected). This fixes #32119. r? @nikomatsakis
2016-04-04Auto merge of #32647 - Amanieu:checked_atomic_intrinsics, r=eddybbors-9/+118
Only allow using the atomic intrinsics on integer types Using these with non-integer types results in LLVM asserts. Atomic operations on non-integer types will require values be transmuted into an integer type of suitable size. This doesn't affect the standard library since `AtomicBool` and `AtomicPtr` currently use `usize` for atomic operations. r? @eddyb
2016-04-04Handle integer-extending for C ABIJames Miller-0/+22
We need to supply sext/zext attributes to LLVM to ensure that arguments are extended to the appropriate width in the correct way. Most platforms extend integers less than 32 bits, though not all.