summary refs log tree commit diff
path: root/src/test/compile-fail
AgeCommit message (Collapse)AuthorLines
2018-05-06Fix assertion message generationShotaro Yamada-0/+19
2018-04-30Do not ICE on generics mismatch with non-local traitsShotaro Yamada-0/+11
Fixes #49841
2018-04-25Warn on all erroneous constantsOliver Schneider-60/+64
2018-04-25Only warn on erroneous promoted constantsOliver Schneider-34/+0
2018-04-21Bring back old fallback semantics: Without feature(never_type), fallback to ↵Felix S. Klock II-0/+4
`()`, not `!`. Note that this commit, since it is trying to be minimal in order to ease backporting to the beta and release channels, does *not* include the old future-proofing warnings that we used to have associated with such fallback to `()`; see discussion at this comment: https://github.com/rust-lang/rust/issues/49691#issuecomment-381266730
2018-04-21Revert stabilization of `feature(never_type)`.Felix S. Klock II-0/+16
This commit is just covering the feature gate itself and the tests that made direct use of `!` and thus need to opt back into the feature. A follow on commit brings back the other change that motivates the revert: Namely, going back to the old rules for falling back to `()`.
2018-04-20Disallow `impl Trait` in unsupported positionShotaro Yamada-0/+38
2018-03-29Auto merge of #49291 - tejom:check-for-known-but-incorrect-attributes, ↵bors-0/+48
r=petrochenkov Check for known but incorrect attributes fixes #43988 - Change nested_visit_map so it will recursively check functions - Add visit_stmt and visit_expr for impl Visitor for CheckAttrVisitor and check for incorrect inline and repr attributes on staements and expressions - Add regression test for issue #43988
2018-03-29Stabilize underscore lifetimesTaylor Cramer-7/+0
2018-03-28Stabilize match_default_bindingsTaylor Cramer-5/+2
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-27Add extra test for expressions and fix typo in messagematthew-2/+8
2018-03-26Remove an unnecessary/incorrect match in the expression check functionmatthew-3/+9
2018-03-26Check for known but incorrect attributesmatthew-0/+36
- Change nested_visit_map so it will recusively check functions - Add visit_stmt and visit_expr for impl Visitor for CheckAttrVisitor and check for incorrect inline and repr attributes on staements and expressions - Add regression test for isssue #43988
2018-03-26Remove library feature testMark Mansi-17/+0
2018-03-26Auto merge of #49255 - cramertj:stable-impl-trait, r=nikomatsakisbors-20/+2
Stabilize impl Trait Blocked on: - [x] https://github.com/rust-lang/rust/pull/49041 and - [ ] completion of FCP in https://github.com/rust-lang/rust/issues/34511#issuecomment-373207183 (3 days from now). I have not yet done any docs work for this-- I probably won't get to it until this weekend (might be a project for the flight to the all-hands).
2018-03-26Stabilize conservative_impl_traitTaylor Cramer-18/+2
2018-03-26Stabilize universal_impl_traitTaylor Cramer-3/+1
2018-03-25Modify testsAlexander Ronald Altman-1/+1
2018-03-25Auto merge of #49141 - gnzlbg:simd_select, r=alexcrichtonbors-0/+56
adds simd_select intrinsic The select SIMD intrinsic is used to select elements from two SIMD vectors using a mask: ```rust let mask = b8x4::new(true, false, false, true); let a = f32x4::new(1., 2., 3., 4.); let b = f32x4::new(5., 6., 7., 8.); assert_eq!(simd_select(mask, a, b), f32x4::new(1., 6., 7., 4.)); ``` The number of lanes between the mask and the vectors must match, but the vector width of the mask does not need to match that of the vectors. The mask is required to be a vector of signed integers. Note: this intrinsic will be exposed via `std::simd`'s vector masks - users are not expected to use it directly.
2018-03-25Rollup merge of #49299 - SimonSapin:ubiquity, r=nikomatsakiskennytm-24/+0
Stabilize the copy_closures and clone_closures features In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do. Tracking issue: https://github.com/rust-lang/rust/issues/44490
2018-03-25Rollup merge of #49162 - tmandry:stabilize-termination-trait, r=nikomatsakiskennytm-9/+17
Stabilize termination_trait, split out termination_trait_test For #48453. First time contribution, so I'd really appreciate any feedback on how this PR can be better. Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
2018-03-23Merge branch '49001_epoch' of https://github.com/klnusbaum/rust into rollupAlex Crichton-4/+4
2018-03-23Rollup merge of #49160 - estebank:issue-47457-missing-fields, r=oli-obkAlex Crichton-4/+2
Reduce the diagnostic spam when multiple fields are missing in pattern Fix #47457.
2018-03-23Rollup merge of #48909 - RalfJung:type_alias_bounds, r=petrochenkovAlex Crichton-3/+0
Improve lint for type alias bounds First of all, I learned just today that I was wrong assuming that the bounds in type aliases are entirely ignored: It turns out they are used to resolve associated types in type aliases. So: ```rust type T1<U: Bound> = U::Assoc; // compiles type T2<U> = U::Assoc; // fails type T3<U> = <U as Bound>::Assoc; // "correct" way to write this, maybe? ``` I am sorry for creating this mess. This PR changes the wording of the lint accordingly. Moreover, since just removing the bound is no longer always a possible fix, I tried to detect cases like `T1` above and show a helpful message to the user: ``` warning: bounds on generic parameters are not enforced in type aliases --> $DIR/type-alias-bounds.rs:57:12 | LL | type T1<U: Bound> = U::Assoc; //~ WARN not enforced in type aliases | ^^^^^ | = help: the bound will not be checked when the type alias is used, and should be removed help: use absolute paths (i.e., <T as Trait>::Assoc) to refer to associated types in type aliases --> $DIR/type-alias-bounds.rs:57:21 | LL | type T1<U: Bound> = U::Assoc; //~ WARN not enforced in type aliases | ^^^^^^^^ ``` I am not sure if I got this entirely right. Ideally, we could provide a suggestion involving the correct trait and type name -- however, while I have access to the HIR in the lint, I do not know how to get access to the resolved name information, like which trait `Assoc` belongs to above. The lint does not even run if that resolution fails, so I assume that information is available *somewhere*... This is a follow-up for (parts of) https://github.com/rust-lang/rust/pull/48326. Also see https://github.com/rust-lang/rust/issues/21903. This changes the name of a lint, but that lint was just merged to master yesterday and has never even been on beta.
2018-03-23Stabilize the copy_closures and clone_closures featuresSimon Sapin-24/+0
In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do.
2018-03-21termination_trait: Make error message more helpfulTyler Mandry-3/+4
2018-03-21termination_trait: Put examples in error help, not labelTyler Mandry-1/+1
2018-03-21Use NOTE instead of error-pattern directiveTyler Mandry-1/+2
2018-03-21termination_trait: Add () example to error messageTyler Mandry-1/+1
2018-03-20typeck: Report main return type errors on return type spanTyler Mandry-14/+0
2018-03-20rename epoch to editionKurtis Nusbaum-4/+4
2018-03-20Match against friendly error messageTyler Mandry-2/+2
2018-03-19Reduce diagnostic verbosity by removing labelsEsteban Küber-4/+2
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-29/+6
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2018-03-19update compile-fail tests: fewer warnings because this is now a HIR lintRalf Jung-3/+0
2018-03-19Stabilize termination_traitTyler Mandry-4/+2
This stabilizes `main` with non-() return types; see #48453.
2018-03-19Split out termination_trait_test feature gateTyler Mandry-0/+22
2018-03-18add simd_select intrinsicgnzlbg-0/+56
2018-03-17AST: Make renames in imports closer to the sourceVadim Petrochenkov-2/+2
Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`
2018-03-17Rollup merge of #48983 - gnzlbg:red, r=alexcrichtonkennytm-0/+82
add intrinsics for portable packed simd vector reductions Adds the following portable vector reduction intrinsics: * fn simd_reduce_add<T, U>(x: T) -> U; * fn simd_reduce_mul<T, U>(x: T) -> U; * fn simd_reduce_min<T, U>(x: T) -> U; * fn simd_reduce_max<T, U>(x: T) -> U; * fn simd_reduce_and<T, U>(x: T) -> U; * fn simd_reduce_or<T, U>(x: T) -> U; * fn simd_reduce_xor<T, U>(x: T) -> U; I've also added: * fn simd_reduce_all<T>(x: T) -> bool; * fn simd_reduce_any<T>(x: T) -> bool; These produce better code that what we are currently producing in `stdsimd`, but the code is still not optimal due to this LLVM bug: https://bugs.llvm.org/show_bug.cgi?id=36702 r? @alexcrichton
2018-03-16Auto merge of #48818 - michaelwoerister:issue-47309, r=eddybbors-0/+31
Properly handle collecting default impls of methods with lifetime parameters. r? @eddyb Fixes #47309.
2018-03-16ignore emscriptengnzlbg-0/+1
2018-03-16Auto merge of #48524 - abonander:check-macro-stability, r=petrochenkovbors-0/+38
check stability of macro invocations I haven't implemented tests yet but this should be a pretty solid prototype. I think as-implemented it will also stability-check macro invocations in the same crate, dunno if we want that or not. I don't know if we want this to go through `rustc::middle::stability` or not, considering the information there wouldn't be available at the time of macro expansion (even for external crates, right?). r? @nrc closes #34079 cc @petrochenkov @durka @jseyfried #38356
2018-03-16Auto merge of #49051 - kennytm:rollup, r=kennytmbors-5/+17
Rollup of 17 pull requests - Successful merges: #48706, #48875, #48892, #48922, #48957, #48959, #48961, #48965, #49007, #49024, #49042, #49050, #48853, #48990, #49037, #49049, #48972 - Failed merges:
2018-03-16Rollup merge of #48875 - jcowgill:mips-test-fixes, r=sanxiynkennytm-1/+13
MIPS testsuite fixes This PR adjusts various bits in the testsuite so that more stuff passes on mips*.
2018-03-16Rollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebankkennytm-4/+4
Add crate name to "main function not found" error message. Fixes #44798 and rust-lang/cargo#4948. I was wondering if it might be cleaner to update the ui tests to add a simple `fn main() {}` for the unrelated tests. Let me know if you would prefer that.
2018-03-15add missing min-llvm-versiongnzlbg-0/+5
2018-03-15Auto merge of #47813 - kennytm:stable-incl-range, r=nrcbors-26/+1
Stabilize inclusive range (`..=`) Stabilize the followings: * `inclusive_range` — The `std::ops::RangeInclusive` and `std::ops::RangeInclusiveTo` types, except its fields (tracked by #49022 separately). * `inclusive_range_syntax` — The `a..=b` and `..=b` expression syntax * `dotdoteq_in_patterns` — Using `a..=b` in a pattern cc #28237 r? @rust-lang/lang
2018-03-15add compile fail testsgnzlbg-0/+76
2018-03-15Auto merge of #48138 - estebank:issue-45092, r=nikomatsakisbors-31/+38
Reword E0044 and message for `!Send` types - Reword E0044 help. - Change error message for types that don't implement `Send` CC #45092, #46678, #24909, #33307.