about summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
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
2018-08-07Also put comparing raw pointers behind a feature gateOliver Schneider-5/+7
2018-08-07Add feature gate checksOliver Schneider-1/+3
2018-08-07Place unions, pointer casts and pointer derefs behind extra feature gatesOliver Schneider-5/+39
2018-08-06Name return type in free region messagesMatthew Jasper-4/+4
2018-08-05Use span of the closure args in free region errorsMatthew Jasper-3/+2
2018-08-05Fix doc link (again)Felix Rabe-1/+1
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-03Update tests for new spans for nll errors involving closuresMatthew Jasper-9/+8
2018-07-27Region inference error messages no longer start with 'free region'David Wood-1/+1
2018-07-27Fixed missing whitespace on some elaborated types.David Wood-1/+1
2018-07-27Update affected tests.David Wood-1/+1
2018-07-23Don't match on region kinds when reporting NLL errorsMatthew Jasper-1/+1
With NLL region kinds are always ReVar
2018-07-22Rollup merge of #52507 - estebank:infer-type, r=nikomatsakiskennytm-1/+1
Reword when `_` couldn't be inferred r? @nikomatsakis
2018-07-21Add specific message when moving from upvars in a non-FnOnce closureMatthew Jasper-16/+0
2018-07-20Update tests for new NLL mutability errorsMatthew Jasper-2/+2
2018-07-20Reword when `_` couldn't be inferredEsteban Küber-1/+1
2018-07-18rustc: Stabilize #[wasm_import_module] as #[link(...)]Alex Crichton-1/+3
This commit stabilizes the `#[wasm_import_module]` attribute as `#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in the `#[link]` attribute is used to configured the module name that the imports are listed with. The WebAssembly specification indicates two utf-8 names are associated with all imported items, one for the module the item comes from and one for the item itself. The item itself is configurable in Rust via its identifier or `#[link_name = "..."]`, but the module name was previously not configurable and defaulted to `"env"`. This commit ensures that this is also configurable. Closes #52090
2018-07-17Fix doc linkFelix Rabe-1/+1
The link for comparison: - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types--sized (broken) - https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized (fixed) This commit is the result of (first) searching via: find src -type f -print0 | xargs -0 fgrep -l dynamically-sized-types--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--sized/dynamically-sized-types-and-sized/g find src/{libcore,test/ui} -type f -name '*.bak' -print0 | xargs -0 rm (Note: Commands run on macOS 10.13 (BSD). `sed -i.bak` should work on GNU/Linux as well, but not tested.)