summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
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.
2019-01-16Auto merge of #57416 - alexcrichton:remove-platform-intrinsics, r=nagisabors-128/+0
rustc: Remove platform intrinsics crate This was originally attempted in #57048 but it was realized that we could fully remove the crate via the `"unadjusted"` ABI on intrinsics. This means that all intrinsics in stdsimd are implemented directly against LLVM rather than using the abstraction layer provided here. That ends up meaning that this crate is no longer used at all. This crate developed long ago to implement the SIMD intrinsics, but we didn't end up using it in the long run. In that case let's remove it!
2019-01-14Rollup merge of #57481 - euclio:bool-cast-suggestion, r=estebankMazdak Farrokhzad-3/+1
provide suggestion for invalid boolean cast Also, don't suggest comparing to zero for non-numeric expressions.
2019-01-14rustc: Remove platform intrinsics crateAlex Crichton-128/+0
This was originally attempted in #57048 but it was realized that we could fully remove the crate via the `"unadjusted"` ABI on intrinsics. This means that all intrinsics in stdsimd are implemented directly against LLVM rather than using the abstraction layer provided here. That ends up meaning that this crate is no longer used at all. This crate developed long ago to implement the SIMD intrinsics, but we didn't end up using it in the long run. In that case let's remove it!
2019-01-14Rollup merge of #57477 - euclio:clarify-lev-suggestion, r=zackmdavisMazdak Farrokhzad-1/+1
clarify resolve typo suggestion Include the kind of the binding that we're suggesting, and use a structured suggestion. Fixes #53445.
2019-01-13Rollup merge of #57366 - estebank:point-match-discrim, r=varkorMazdak Farrokhzad-0/+2
Point at match discriminant on type error in match arm pattern ``` error[E0308]: mismatched types --> src/main.rs:5:9 | 4 | let temp: usize = match a + b { | ----- this expression has type `usize` 5 | Ok(num) => num, | ^^^^^^^ expected usize, found enum `std::result::Result` | = note: expected type `usize` found type `std::result::Result<_, _>` ``` Fix #57279.
2019-01-13Implement basic input validation for built-in attributesVadim Petrochenkov-46/+0
2019-01-13Rollup merge of #57412 - JohnTitor:improve-the-wording-1, r=varkorMazdak Farrokhzad-2/+2
Improve the wording I'm sorry but re-opened the PR because I failed to squash commits(#57397). Fixes #55752. r? @varkor
2019-01-12Reword label as per review commentEsteban Küber-1/+1
2019-01-12Point at the match discriminant when arm pattern has a type mismatchEsteban Küber-0/+2
2019-01-12Rollup merge of #57535 - varkor:stabilise-if-while-let-patterns, r=CentrilMazdak Farrokhzad-35/+0
Stabilise irrefutable if-let and while-let patterns This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). This replaces https://github.com/rust-lang/rust/pull/55639, as we want to stabilise this in time for the beta cut-off. Closes https://github.com/rust-lang/rust/pull/55639. r? @Centril
2019-01-12Rollup merge of #57493 - euclio:deref-suggest, r=oli-obkMazdak Farrokhzad-7/+4
use structured suggestion when casting a reference
2019-01-12Stabilise irrefutable if-let and while-let patternsvarkor-35/+0
This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). Co-Authored-By: Sebastian Malton <sebastian@malton.name>
2019-01-10use structured suggestion when casting a referenceAndy Russell-7/+4
2019-01-09provide suggestion for invalid boolean castAndy Russell-3/+1
Also, don't suggest comparing to zero for non-numeric expressions.