about summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2019-04-23Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=kennytmMazdak Farrokhzad-3/+1
Warn when ignore-tidy-linelength is present, but no lines are too long It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
2019-04-23Update ui testsvarkor-1/+1
2019-04-23Remove unnecessary ignore-tidy-linelengthvarkor-2/+0
2019-04-22Never stop due to errors before borrow checkingEsteban Küber-7/+45
2019-04-22update tests for migrate mode by defaultMatthew Jasper-241/+58
2019-04-19Emit specific error for struct literal in conditionsEsteban Küber-43/+17
2019-04-19Rollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebankMazdak Farrokhzad-1/+1
Correct unused parameter diagnostic The message was incorrect for unused lifetime parameters. There's no need to be specific.
2019-04-18Update testsvarkor-1/+1
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-23/+17
2019-04-17Resolve inconsistency in error messages between "parameter" and "variable".Eduard-Mihai Burtescu-2/+2
2019-04-14Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichtonMazdak Farrokhzad-5/+3
Stabilize the `alloc` crate. This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12Stabilize the `alloc` crate.Simon Sapin-5/+3
This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-11Reword tracking issue noteEsteban Küber-3/+3
2019-04-10Tweak unstable diagnostic outputEsteban Küber-4/+9
2019-03-28Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obkMazdak Farrokhzad-1/+1
compiletest: make path normalization smarter Fixes #59109.
2019-03-26Rollup merge of #59150 - estebank:type-ascription, r=varkorMazdak Farrokhzad-0/+16
Expand suggestions for type ascription parse errors Fix #51222. CC #48016, #47666, #54516, #34255.
2019-03-25compiletest: make path normalization smarterAndy Russell-1/+1
2019-03-23Hide obvious suggestion from cli outputEsteban Küber-4/+2
2019-03-23Swap primary/secondary spans for E0458Esteban Küber-2/+2
2019-03-23Swap const evaluation lint spans to point at problem in primary spanEsteban Küber-2/+2
2019-03-23Tweak spans for E0599Esteban Küber-1/+1
2019-03-22Reword type ascription note to reduce verbosityEsteban Küber-12/+2
2019-03-22Review commentEsteban Küber-2/+2
2019-03-22Expand suggestions for type ascription parse errorsEsteban Küber-0/+26
2019-03-20Update testsvarkor-4/+4
2019-03-11Update tests that don't run on my platformVadim Petrochenkov-16/+0
2019-03-11Update NLL testsVadim Petrochenkov-19/+19
2019-03-11Update testsVadim Petrochenkov-200/+200
2019-03-02Reword error messageEsteban Küber-1/+1
2019-03-02Point at enum definition when match patterns are not exhaustiveEsteban Küber-7/+12
``` error[E0004]: non-exhaustive patterns: type `X` is non-empty --> file.rs:9:11 | 1 | / enum X { 2 | | A, | | - variant not covered 3 | | B, | | - variant not covered 4 | | C, | | - variant not covered 5 | | } | |_- `X` defined here ... 9 | match x { | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `B` and `C` not covered --> file.rs:11:11 | 1 | / enum X { 2 | | A, 3 | | B, 4 | | C, | | - not covered 5 | | } | |_- `X` defined here ... 11 | match x { | ^ patterns `C` not covered ``` When a match expression doesn't have patterns covering every variant, point at the enum's definition span. On a best effort basis, point at the variant(s) that are missing. This does not handle the case when the missing pattern is due to a field's enum variants: ``` enum E1 { A, B, C, } enum E2 { A(E1), B, } fn foo() { match E2::A(E1::A) { E2::A(E1::B) => {} E2::B => {} } //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled } ``` Unify look between match with no arms and match with some missing patterns. Fix #37518.
2019-02-27Rename variadic to c_variadicDan Robertson-2/+2
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-27Support defining C compatible variadic functionsDan Robertson-6/+6
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-14rustc_mir: split qualify_consts' checking and value qualification.Eduard-Mihai Burtescu-16/+16
2019-02-07Make name resolution handle consts in GenericParamsFromOuterFunction properlyvarkor-8/+8
2019-02-07Update testsvarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07Auto merge of #58010 - Zoxc:parallel-passes, r=michaelwoeristerbors-13/+13
Move privacy checking later in the pipeline and make some passes run in parallel r? @michaelwoerister
2019-01-31Add suggestion for duplicated import.David Wood-6/+4
This commit adds a suggestion when a import is duplicated (ie. the same name is used twice trying to import the same thing) to remove the second import.
2019-01-30Move privacy checking later in the pipeline and make some passes run in parallelJohn Kåre Alsaker-13/+13
2019-01-26Replace deprecated ATOMIC_INIT constsMark Rousskov-2/+2
2019-01-21Auto merge of #55009 - oli-obk:const_safety, r=RalfJungbors-4/+4
Make raw ptr ops unsafe in const contexts r? @RalfJung cc @Centril
2019-01-21Declare some unconst operations as unsafe in const fnOliver Scherer-4/+4
2019-01-20Do not suggest angle brackets when there are no type argumentsEsteban Küber-2/+2
2019-01-19Suggest usage of angle bracketsEsteban Küber-1/+4
2019-01-19Accept parenthesized type args for error recoveryEsteban Küber-9/+2
2019-01-19Continune parsing after encountering Trait with paren argsEsteban Küber-2/+9
2019-01-19Auto merge of #56722 - Aaron1011:fix/blanket-eval-overflow, r=nikomatsakisbors-5/+4
Fix stack overflow when finding blanket impls Currently, SelectionContext tries to prevent stack overflow by keeping track of the current recursion depth. However, this depth tracking is only used when performing normal section (which includes confirmation). No such tracking is performed for evaluate_obligation_recursively, which can allow a stack overflow to occur. To fix this, this commit tracks the current predicate evaluation depth. This is done separately from the existing obligation depth tracking: an obligation overflow can occur across multiple calls to 'select' (e.g. when fulfilling a trait), while a predicate evaluation overflow can only happen as a result of a deep recursive call stack. Fixes #56701 I've re-used `tcx.sess.recursion_limit` when checking for predication evaluation overflows. This is such a weird corner case that I don't believe it's necessary to have a separate setting controlling the maximum depth.
2019-01-18Rollup merge of #57725 - estebank:parens, r=michaelwoeristerMazdak Farrokhzad-3/+9
Use structured suggestion to surround struct literal with parenthesis
2019-01-17Use structured suggestion to surround struct literal with parenthesisEsteban Küber-3/+9
2019-01-16Don't explicitly increment the depth for new trait predicatesAaron Hill-1/+32
2019-01-16Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakisbors-46/+0
Implement basic input validation for built-in attributes Correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes, built-in attributes must also fit into the "meta-item" syntax (aka the "classic attribute syntax"). For some subset of attributes (found by crater run), errors are lowered to deprecation warnings. NOTE: This PR previously included https://github.com/rust-lang/rust/pull/57367 as well.