summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2016-05-04Check transmutes between types without statically known sizes.Eduard Burtescu-21/+75
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-12/+5
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-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 #32016 - nikomatsakis:incr-comp-save, r=mwbors-7/+7
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-30/+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-30/+7
2016-04-07Add test for #30079Jeffrey Seyfried-0/+55
2016-04-06Fix LLVM assert when handling bad intrinsic monomorphizationsAmanieu d'Antras-0/+44
2016-04-06restructure rustc options relating to incr. comp.Niko Matsakis-7/+7
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-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-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 #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-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-0/+117
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-04Auto merge of #32582 - nikomatsakis:issue-32326, r=aturonbors-5/+57
process cycles as soon as they are detected We used to wait for the recursion limit, but that might well be too long! Fixes #32326 r? @aturon
2016-04-04add error code to testNiko Matsakis-1/+1
2016-04-04fix corner case around top of stackNiko Matsakis-0/+32
When deciding on a coinductive match, we were examining the new obligation and the backtrace, but not the *current* obligation that goes in between the two. Refactoring the code to just have the cycle given as input also made things a lot simpler.
2016-04-04process cycles as soon as they are detectedNiko Matsakis-5/+25
We used to wait for the recursion limit, but that might well be too long!
2016-04-04Beef up testJonas Schievink-0/+6
2016-04-03Add compile-fail testAmanieu d'Antras-0/+117
2016-04-03Autoderef when suggesting to call `(self.field)`Jonas Schievink-0/+25
Fixes #32128
2016-04-03Fix "consider removing this semicolon" helpJonas Schievink-0/+17
Check last statement in a block, not the first
2016-04-03check constants even if they are unused in the current crateOliver Schneider-11/+31
2016-03-31Auto merge of #32506 - petrochenkov:use, r=Manishearthbors-5/+5
syntax: Extra diagnostics for `_` used in an identifier position Closes https://github.com/rust-lang/rust/issues/32501
2016-03-31Auto merge of #31938 - jseyfried:autoderef_privacy, r=nikomatsakisbors-20/+53
Integrate privacy into field and method selection This PR integrates privacy checking into field and method selection so that an inaccessible field/method can not stop an accessible field/method from being used (fixes #12808 and fixes #22684). r? @eddyb
2016-03-31syntax: Extra diagnostics for `_` used in an identifier positionVadim Petrochenkov-5/+5
2016-03-30Auto merge of #32439 - jseyfried:visible_suggestions, r=nrcbors-247/+247
diagnostics: make paths to external items more visible This PR changes the reported path for an external item so that it is visible from at least one local module (i.e. it does not use any inaccessible external modules) if possible. If the external item's crate was declared with an `extern crate`, the path is guarenteed to use the `extern crate`. Fixes #23224, fixes #23355, fixes #26635, fixes #27165. r? @nrc
2016-03-30Detect cycles that include renamed importsJeffrey Seyfried-0/+7
2016-03-31Rollup merge of #32494 - pnkfelix:gate-parser-recovery-via-debugflag, r=nrcManish Goregaokar-0/+16
Gate parser recovery via debugflag Gate parser recovery via debugflag Put in `-Z continue_parse_after_error` This works by adding a method, `fn abort_if_no_parse_recovery`, to the diagnostic handler in `syntax::errors`, and calling it after each error is emitted in the parser. (We might consider adding a debugflag to do such aborts in other places where we are currently attempting recovery, such as resolve, but I think the parser is the really important case to handle in the face of #31994 and the parser bugs of varying degrees that were injected by parse error recovery.) r? @nikomatsakis
2016-03-30Fix fallout in testsJeffrey Seyfried-247/+247
2016-03-30Improve testsJeffrey Seyfried-50/+5
2016-03-30privacy: Cleanup check_fieldVadim Petrochenkov-18/+18
2016-03-30Add tests for #12808 and #22684Jeffrey Seyfried-0/+77
2016-03-30Fix fallout in testsJeffrey Seyfried-1/+2