about summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
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.
2019-01-09clarify resolve typo suggestionAndy Russell-1/+1
Include the kind of the binding that we're suggesting, and use a structured suggestion.
2019-01-09Stabilize `let` bindings and destructuring in constants and const fnOliver Scherer-4/+23
2019-01-08Improve the wordingYuki Okushi-2/+2
2019-01-06Auto merge of #57291 - euclio:method-call-suggestion, r=estebankbors-3/+1
use structured suggestion for method calls Furthermore, don't suggest calling the method if it is part of a place expression, as this is invalid syntax. I'm thinking it might be worth putting a label on the method assignment span like "this is a method" and removing the span from the "methods are immutable" text so it isn't reported twice. The suggestions in `src/test/ui/did_you_mean/issue-40396.stderr` are suboptimal. I could check if the containing expression is `BinOp`, but I'm not sure if that's general enough. Any ideas? r? @estebank
2019-01-05Rollup merge of #57249 - frewsxcv:frewsxcv-second-edition, r=KodrAuskennytm-1/+1
Fix broken links to second edition TRPL. Fixes https://github.com/rust-lang/rust/issues/57104. Remove `second-edition/` from TRPL hyperlinks.
2019-01-03Improve error generation, fixup recursion limitsAaron Hill-36/+4
2019-01-03use structured suggestion for method callsAndy Russell-3/+1
Furthermore, don't suggest calling the method if it is part of a place expression, as this is invalid syntax.
2019-01-02Auto merge of #57250 - codeworm96:tyerr_msg, r=varkorbors-1/+1
Improve type mismatch error messages Closes #56115. Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing. TODO the book and clippy needs to be changed accordingly later. r? @varkor
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-1/+1
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-31Improve type mismatch error messagesYuning Zhang-1/+1
Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.
2018-12-31Auto merge of #56878 - petrochenkov:privdyn, r=arielb1bors-5/+2
privacy: Use common `DefId` visiting infrastructure for all privacy visitors One repeating pattern in privacy checking is going through a type, visiting all `DefId`s inside it and doing something with them. This is the case because visibilities and reachabilities are attached to `DefId`s. Previously various privacy visitors visited types slightly differently using their own methods, with most recently written `TypePrivacyVisitor` being the "gold standard". This mostly worked okay, but differences could manifest in overly conservative reachability analysis, some errors being reported twice, some private-in-public lints (not errors) being wrongly reported or not reported. This PR does something that I wanted to do since https://github.com/rust-lang/rust/pull/32674#discussion_r58291608 - factoring out the common visiting logic! Now all the common logic is contained in `struct DefIdVisitorSkeleton`, with specific privacy visitors deciding only what to do with visited `DefId`s (via `trait DefIdVisitor`). A bunch of cleanups is also applied in the process. This area is somewhat tricky due to lots of easily miss-able details, but thankfully it's was well covered by tests in https://github.com/rust-lang/rust/pull/46083 and previous PRs, so I'm relatively sure in the refactoring correctness. Fixes https://github.com/rust-lang/rust/pull/56837#discussion_r241962239 in particular. Also this will help with implementing https://github.com/rust-lang/rust/issues/48054.
2019-01-01privacy: Use common `DefId` visiting infra for all privacy visitorsVadim Petrochenkov-5/+2
2018-12-31Auto merge of #57047 - euclio:field-structured-suggestions, r=estebankbors-1/+1
use structured suggestions for nonexistent fields r? @estebank
2018-12-31use structured suggestions for nonexistent fieldsAndy Russell-1/+1
2018-12-31Auto merge of #57044 - varkor:E0512-equal-type, r=matthewjasperbors-3/+3
Add specific diagnostic when attempting to transmute between equal generic types Also clarifies the wording of E0512. Fixes https://github.com/rust-lang/rust/issues/49793.
2018-12-29Fixed stderr files for ui tests.Alexander Regueiro-10/+1
2018-12-28Clarify wording of E0512varkor-3/+3
2018-12-26Added regression test for using generic parameters on modules.Alexander Regueiro-4/+12
2018-12-26Fixed more tests.Alexander Regueiro-2/+2
2018-12-25Remove licensesMark Rousskov-2784/+372
2018-12-25Auto merge of #57088 - euclio:non-camel-case-early-lint, r=estebankbors-9/+16
make non_camel_case_types an early lint This allows us to catch these kinds of style violations much earlier, as evidenced by the large number of tests that had to be updated for this change.