about summary refs log tree commit diff
path: root/src/librustc_error_codes
AgeCommit message (Collapse)AuthorLines
2020-05-03Add stability attribute to E0539 error examplesunexge-0/+2
2020-05-02Add `#![feature(staged_api)]` attribute to E0539 error examplesunexge-0/+4
2020-05-02Add long error explanation for E0539unexge-1/+43
2020-04-24Rollup merge of #71426 - contrun:fix-e0751-explanation, r=estebankDylan DPC-1/+1
fix error code in E0751.md reference: https://github.com/rust-lang/rust/issues/71304
2020-04-23Rollup merge of #71461 - GuillaumeGomez:improve-e0567, r=Dylan-DPCDylan DPC-4/+2
Improve E0567 explanation r? @Dylan-DPC
2020-04-23Rollup merge of #71396 - DeeDeeG:improve-e0308-again, r=estebankDylan DPC-5/+4
Improve E0308 error message wording again Hello again, I recently did this PR: #70242 I felt the error message could be further improved, so I made [a post on the Rust community forum](https://users.rust-lang.org/t/looking-for-feedback-on-an-improved-error-message-for-e0308/40004) to ask for feedback. (Also, there were some comments on my original PR that I took into consideration as well.) This PR is my attempt to take all the feedback into account and propose a better and simplified error message that should still be accurate. Its main benefit is having simpler grammar, and hopefully being easier to read and understand. Thanks to everyone who commented and gave feedback, and thank you for taking a look at this PR.
2020-04-23Improve E0567 explanationGuillaume Gomez-4/+2
2020-04-23fix error code for E0751YI-1/+1
2020-04-22Rollup merge of #71350 - GuillaumeGomez:error-code-explanation-extra-check, ↵Dylan DPC-69/+157
r=oli-obk Error code explanation extra check r? @Mark-Simulacrum
2020-04-22Rollup merge of #71370 - PankajChaudhary5:ErrorCode-E0696, r=GuillaumeGomezDylan DPC-1/+50
Added detailed error code explanation for issue E0696 in Rust compiler. Added proper error explanation for issue E0696 in the Rust compiler. Error Code E0696 Sub Part of Issue #61137 r? @GuillaumeGomez
2020-04-22Fix new tidy checksGuillaume Gomez-69/+157
2020-04-22Add error code to inner doc comment attribute errorGuillaume Gomez-0/+32
2020-04-22Rollup merge of #71399 - rust-lang:cleanup-e0554, r=Dylan-DPCYuki Okushi-1/+1
Clean up E0554 explanation r? @Dylan-DPC
2020-04-22Rollup merge of #71390 - aticu:master, r=Dylan-DPCYuki Okushi-1/+1
Fix incorrect description of E0690 r? @steveklabnik
2020-04-22Rollup merge of #70998 - estebank:suggest-impl-trait-empty-fn, r=varkorYuki Okushi-2/+1
Suggest `-> impl Trait` and `-> Box<dyn Trait>` on fn that doesn't return During development, a function could have a return type set that is a bare trait object by accident. We already suggest using either a boxed trait object or `impl Trait` if the return paths will allow it. We now do so too when there are *no* return paths or they all resolve to `!`. We still don't handle cases where the trait object is *not* the entirety of the return type gracefully. Closes #38376.
2020-04-21Clean up E0554 explanationGuillaume Gomez-1/+1
2020-04-21Improve E0308 error message wording againDeeDeeG-5/+4
2020-04-21Fix incorrect description of E0690aticu-1/+1
2020-04-21Added proper explanation error code E0696pankajchaudhary5-1/+50
2020-04-21Rollup merge of #71174 - Nokel81:fix-async-main-error, r=petrochenkovDylan DPC-0/+12
Check that main/start is not async * Add new error code E0752 * Add span to hir::IsAsync::Yes * Emit an error if main or the start function is marked as async * Add two regression tests This PR fixes #68523.
2020-04-20Ensure tail expression will have a `Ty` for E0746Esteban Küber-2/+1
When the return type is `!Sized` we look for all the returned expressions in the body to fetch their types and provide a reasonable suggestion. The tail expression of the body is normally evaluated after checking whether the return type is `Sized`. Changing the order of the evaluation produces undesirable knock down effects, so we detect the specific case that newcomers are likely to encounter ,returning a single bare trait object, and only in that case we evaluate the tail expression's type so that the suggestion will be accurate.
2020-04-20Check that main/start is not asyncSebastian Malton-0/+12
* Add new error code E0752 * Add span to hir::IsAsync::Yes * Emit an error if main or the start function is marked as async * Add two regression tests Fix formatting errors and bless test outputs * move tests to ui/async-await fix test error text remove span from IsAsync
2020-04-19Rollup merge of #71319 - GuillaumeGomez:cleanup-e0522, r=Dylan-DPCDylan DPC-4/+7
Clean up E0522 explanation r? @Dylan-DPC
2020-04-19Clean up E0522 explanationGuillaume Gomez-4/+7
2020-04-17Rollup merge of #70578 - PankajChaudhary5:master, r=GuillaumeGomezDylan DPC-1/+58
Add long error explanation for E0657 Added proper error explanation for issue E0657 in the Rust compiler. Part of #61137 r? @GuillaumeGomez
2020-04-16Rollup merge of #70611 - pawanbisht62:doc/61137-add-long-error-code-e0708, ↵Dylan DPC-2/+27
r=GuillaumeGomez Add long error explanation for E0708 #61137 Add long explanation for the E0708 error code Part of #61137 r? @GuillaumeGomez
2020-04-16Rollup merge of #71191 - GuillaumeGomez:cleanup-e0520, r=Dylan-DPCDylan DPC-1/+3
Clean up E0520 explanation r? @Dylan-DPC
2020-04-16Clean up E0520 explanationGuillaume Gomez-1/+3
2020-04-16Rollup merge of #71166 - GuillaumeGomez:cleanup-e0518, r=Dylan-DPCDylan DPC-3/+3
Clean up E0518 explanation r? @Dylan-DPC
2020-04-15Clean up E0518 explanationGuillaume Gomez-3/+3
2020-04-14Rollup merge of #71120 - GuillaumeGomez:cleanup-e0517, r=Dylan-DPCDylan DPC-2/+1
Clean up E0517 explanation r? @Dylan-DPC
2020-04-14Clean up E0517 explanationGuillaume Gomez-2/+1
2020-04-13Add proper explanation of error code E0657PankajChaudhary5-1/+58
2020-04-12Rollup merge of #71057 - GuillaumeGomez:cleanup-e0516, r=Dylan-DPCDylan DPC-0/+1
Clean up E0516 explanation r? @Dylan-DPC
2020-04-12Rollup merge of #71034 - GuillaumeGomez:cleanup-e0515, r=Dylan-DPCDylan DPC-4/+4
Clean up E0515 explanation r? @Dylan-DPC
2020-04-12Clean up E0516 explanationGuillaume Gomez-0/+1
2020-04-12Add long error explanation for E0708 #61137bishtpawan-2/+27
Refactor code as per the suggestions Refacotor code provide edition support
2020-04-11Clean up E0515 explanationGuillaume Gomez-4/+4
2020-04-10Rollup merge of #70985 - GuillaumeGomez:cleanup-e0512, r=Dylan-DPCMazdak Farrokhzad-2/+3
Clean up E0512 explanation r? @Dylan-DPC
2020-04-10Clean up E0512 explanationGuillaume Gomez-2/+3
2020-04-10Rollup merge of #70952 - GuillaumeGomez:cleanup-e0511, r=Dylan-DPCMazdak Farrokhzad-2/+3
Clean up E0511 explanation r? @Dylan-DPC
2020-04-10Rollup merge of #70913 - eddyb:rc-arc-diagnostic-items, r=matthewjasperMazdak Farrokhzad-3/+3
Replace "rc"/"arc" lang items with Rc/Arc diagnostic items. `Rc`/`Arc` should have no special semantics, so it seems appropriate for them to not be lang items. r? @matthewjasper
2020-04-09Clean up E0511 explanationGuillaume Gomez-2/+3
2020-04-09Rollup merge of #70916 - Centril:track-caller-ffi, r=eddybMazdak Farrokhzad-12/+1
Support `#[track_caller]` on functions in `extern "Rust" { ... }` Fixes https://github.com/rust-lang/rust/issues/70830 which is the follow-up to @eddyb's suggestion in https://github.com/rust-lang/rust/pull/69251#discussion_r380791634 to allow `#[track_caller]` on `fn`s in FFI imports, that is, on functions in `extern "Rust" { ... }` blocks. This requires that the other side, the FFI export, also have the `#[track_caller]` attribute. Otherwise, undefined behavior is triggered and the blame lies, as usual, with the `unsafe { ... }` block which called the FFI imported function. After this PR, all forms of `fn` items with the right ABI (`"Rust"`) support `#[track_caller]`. As a drive-by, the PR also hardens the check rejecting `#[naked] #[track_caller]` such that methods and other forms of `fn` items are also considered. r? @eddyb cc @rust-lang/lang
2020-04-09track_caller: support on FFI importsMazdak Farrokhzad-12/+1
2020-04-08Rollup merge of #70927 - GuillaumeGomez:cleanup-e0510, r=Dylan-DPCDylan DPC-7/+20
Clean up E0510 explanation r? @Dylan-DPC
2020-04-08Rollup merge of #70883 - GuillaumeGomez:cleanup-e0507, r=Dylan-DPCDylan DPC-6/+6
Clean up E0507 explanation r? @Dylan-DPC
2020-04-08Clean up E0510 explanationGuillaume Gomez-7/+20
2020-04-08Replace "rc"/"arc" lang items with Rc/Arc diagnostic items.Eduard-Mihai Burtescu-3/+3
2020-04-07Clean up E0507 explanationGuillaume Gomez-6/+6