summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2018-11-17resolve: Avoid sentence breaks in diagnosticsVadim Petrochenkov-3/+3
2018-11-17resolve: Tweak some articles in ambiguity diagnosticsVadim Petrochenkov-1/+1
2018-11-17resolve: Improve diagnostics for resolution ambiguitiesVadim Petrochenkov-4/+5
2018-10-29resolve: More precise spans for privacy errorsVadim Petrochenkov-2/+2
2018-10-23Auto merge of #55113 - mockersf:master, r=estebankbors-9/+10
#45829 when a renamed import conflict with a previous import Fix the suggestion when a renamed import conflict. It check if the snipped contains `" as "`, and if so uses everything before for the suggestion.
2018-10-19Auto merge of #55162 - nikomatsakis:issue-54902-underscore-bound, r=tmandrybors-9/+9
handle underscore bounds in unexpected places Per the discussion on #54902, I made it a hard error to use lifetime bounds in various places where they used to be permitted: - `where Foo: Bar<'_>` for example I also moved error reporting to HIR lowering and added `Error` variants to let us suppress downstream errors that result. I (imo) improved the error message wording to be clearer, as well. In the process, I fixed the ICE in #52098. Fixes #54902 Fixes #52098
2018-10-18Auto merge of #54979 - estebank:path-unsized, r=nikomatsakisbors-1/+1
Custom E0277 diagnostic for `Path` r? @nikomatsakis we have a way to target `Path` exclusively, we need to identify the correct text to show to consider #23286 fixed.
2018-10-17move E0637 to lowering and improve output, add more testsNiko Matsakis-9/+9
2018-10-17fix other tests failing due to change in case or new suggestion for extern crateFrançois Mockers-9/+10
2018-10-17Update output for borrowck=migrate compare mode.David Wood-11/+18
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
2018-10-13Auto merge of #54997 - davidtwco:issue-54896, r=nagisabors-3/+29
The #[panic_handler] attribute can be applied to non-functions Fixes #54896. This commit extends the existing lang items functionality to assert that the `#[lang_item]` attribute is only found on the appropriate item for any given lang item. That is, language items representing traits must only ever have their corresponding attribute placed on a trait, for example. r? @nagisa
2018-10-11structured suggestion for E0223 ambiguous associated typeZack M. Davis-3/+1
It looks like we tend to use angle-brackets around the placeholder in the few other places we use `Applicability::HasPlaceholders`, but that would be confusing here, so ...
2018-10-11Extend lang items to assert correct target.David Wood-3/+29
This commit extends the existing lang items functionality to assert that the `#[lang_item]` attribute is only found on the appropriate item for any given lang item. That is, language items representing traits must only ever have their corresponding attribute placed on a trait, for example.
2018-10-10Custom E0277 diagnostic for `Path`Esteban Küber-1/+1
2018-10-05Updates to .stderr output in ui tests from earlier changes.Felix S. Klock II-1/+1
2018-10-03Clearer later use messages for callsMatthew Jasper-2/+2
Give a special message when the later use is from a call. Use the span of the callee instead of the whole expression. For conflicting borrow messages say that the later use is of the first borrow.
2018-09-23Improve error message for E0424Julian Kulesh-1/+1
2018-09-17On nightly with NLL, suggest `#![feature(bind_by_move_pattern_guards)]` when ↵Felix S. Klock II-0/+22
it might fix the code.
2018-09-09Auto merge of #53778 - petrochenkov:shadrelax2, r=nikomatsakisbors-2/+2
resolve: Relax shadowing restrictions on macro-expanded macros Previously any macro-expanded macros weren't allowed to shadow macros from outer scopes. Now only "more macro-expanded" macros cannot shadow "less macro-expanded" macros. See comments to `fn may_appear_after` and added tests for more details and examples. The functional changes are a21f6f588fc28c97533130ae44a6957b579ab58c and 46dd365ce9ca0a6b8653849b80267763c542842a, other commits are refactorings.
2018-09-09Auto merge of #53960 - estebank:issue-51303, r=nagisabors-4/+5
Fix incorrect outer function type parameter message Fix #51303.
2018-09-08resolve: More precise spans for ambiguous resolution errorsVadim Petrochenkov-2/+2
Add labels to ambiguous resolution errors
2018-09-06Auto merge of #53575 - matthewjasper:unsized-is-an-error, r=estebankbors-3/+94
Don't reduce E0161 to a warning in NLL migrate mode This error has been on stable for a while, and allowing such code cause the compile to later ICE (since we can't codegen it). Errors `box UNSIZED EXPR` with unsized locals because it's not compatible with the current evaluation order (create the box before evaluating the expressions). cc #53469 (fixes the ICE in this case) cc @qnighy
2018-09-05reword label as per reviewEsteban Küber-1/+1
2018-09-05slight rewording of labelsEsteban Küber-1/+1
2018-09-05Fix incorrect outer function type parameter messageEsteban Küber-3/+4
2018-09-03Auto merge of #53865 - zilbuz:issue-52768, r=pnkfelixbors-6/+0
Remove 'not reporting regions error due to nll' warning Fix #52768
2018-09-01Update testsBasile Desloges-6/+0
2018-08-31Implement the `min_const_fn` feature gateOliver Schneider-2/+2
2018-08-25Auto merge of #53584 - mcr431:Fix-#53525, r=varkorbors-164/+0
Fix #53525 - Unify E0243, E0244, E0087, E0088, E0089, and E0090 into E0107 Fix #53525 This pr merges all errors related to too many or too few generic arguments in types and functions. E0243, E0244, E0087, E0088, E0089, E0090 errors will no longer be emitted and E0107 will be used instead.
2018-08-24updates tests to use new error codeMatthew Russo-98/+0
2018-08-24Merging error code descriptions into E0107 and adding "no longerMatthew Russo-66/+0
emitted" messages to the others.
2018-08-23Stabilize 'attr_literals' feature.Sergio Benitez-6/+2
2018-08-22Update E0161 test to cover more casesMatthew Jasper-3/+94
Update another test that broke due to E0161 no longer being buffered
2018-08-21Auto merge of #53530 - kennytm:rollup, r=kennytmbors-1/+1
Rollup of 17 pull requests Successful merges: - #53030 (Updated RELEASES.md for 1.29.0) - #53104 (expand the documentation on the `Unpin` trait) - #53213 (Stabilize IP associated constants) - #53296 (When closure with no arguments was expected, suggest wrapping) - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.) - #53363 (add individual docs to `core::num::NonZero*`) - #53370 (Stabilize macro_vis_matcher) - #53393 (Mark libserialize functions as inline) - #53405 (restore the page title after escaping out of a search) - #53452 (Change target triple used to check for lldb in build-manifest) - #53462 (Document Box::into_raw returns non-null ptr) - #53465 (Remove LinkMeta struct) - #53492 (update lld submodule to include RISCV patch) - #53496 (Fix typos found by codespell.) - #53521 (syntax: Optimize some literal parsing) - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/) - #53551 (Avoid some Place clones.) Failed merges: r? @ghost
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-1/+1
Fix typos found by codespell.
2018-08-20Fix diagnostic regressionvarkor-10/+10
2018-08-19Refactor generic argument count check in check/mod.rsvarkor-24/+24
2018-08-19Refactor generic argument count check in astconvvarkor-10/+10
2018-08-19Refactor astconv.rs (part ii)varkor-2/+1
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-19Lift some Sized checks.Masaki Hara-0/+1
2018-08-18Auto merge of #53175 - matthewjasper:more-return-stuff, r=nikomatsakisbors-2/+2
[NLL] Returns are interesting for free regions Based on #53088 - creating now to get feedback. Closes #51175 * Make assigning to the return type interesting. * Use "returning this value" instead of "return" in error messages. * Prefer one of the explanations that we have a name for to a generic interesting cause in some cases. * Treat causes that involve the destination of a call like assignments.
2018-08-16Auto merge of #53147 - ashtneoi:dont-suggest-ref, r=estebankbors-0/+12
For move errors, suggest match ergonomics instead of `ref` Partially fixes issue #52423. Also makes errors and suggestions more consistent between move-from-place and move-from-value errors. Limitations: - Only the first pattern in a match arm can have a "consider removing this borrow operator" suggestion. - Suggestions don't always compile as-is (see the TODOs in the test for details). Sorry for the really long test. I wanted to make sure I handled every case I could think of, and it turned out there were a lot of them. Questions: - Is there any particular applicability I should set on those suggestions? - Are the notes about the `Copy` trait excessive?
2018-08-15Add files I forgot to commit earlierashtneoi-0/+12
2018-08-14Update testsMatthew Jasper-2/+2
2018-08-12Various changes to `rustc_on_unimplemented`Esteban Küber-1/+1
- Add `from_method` and `from_desugaring` to formatting options - Change wording of errors slightly
2018-08-10Rollup merge of #53082 - felixrabe:fix-doc-link-again, r=GuillaumeGomezkennytm-1/+1
Fix doc link (again) Similar to #52404. The link for comparison: - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized (broken) - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, stable 2nd ed) - https://doc.rust-lang.org/nightly/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2nd ed) - https://doc.rust-lang.org/nightly/book/2018-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait (correct, nightly 2018 ed) This commit is the result of (first) searching via ripgrep (0.8.1 -SIMD -AVX): rg -l dynamically-sized-types-and-sized and then replacing all relevant occurrences via: find src/{libcore,test/ui} -type f -print0 | xargs -0 sed -i.bak \ s/dynamically-sized-types-and-sized/dynamically-sized-types-and-the-sized-trait/g find src/{libcore,test/ui} -type f -name '*.bak' -print0 | xargs -0 rm (Note: Tested on on macOS 10.13 (BSD). `sed -i.bak` should work on Linux (GNU sed) as well, but not tested.)
2018-08-08Auto merge of #53088 - matthewjasper:closure-region-spans, r=nikomatsakisbors-5/+4
[NLL] Use span of the closure args in free region errors Also adds a note when one of the free regions is BrEnv. In a future PR I'll change these messages to say "return requires", which should improve them a bit more. r? @nikomatsakis
2018-08-07Make sure the feature gate actually works and never allows promoting these ↵Oliver Schneider-1/+1
operations
2018-08-07Add feature gate testOliver Schneider-0/+2