about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
AgeCommit message (Collapse)AuthorLines
2021-03-23progress, stuff compiles nowlcnr-1/+1
2021-03-04Rollup merge of #80527 - jyn514:rustdoc-lints, r=GuillaumeGomezYuki Okushi-1/+2
Make rustdoc lints a tool lint instead of built-in - Rename `broken_intra_doc_links` to `rustdoc::broken_intra_doc_links` (and similar for other rustdoc lints; I don't expect any others to be used frequently, though). - Ensure that the old lint names still work and give deprecation errors - Register lints even when running doctests - Move lint machinery into a separate file - Add `declare_rustdoc_lint!` macro Unblocks https://github.com/rust-lang/rust/pull/80300, https://github.com/rust-lang/rust/pull/79816, https://github.com/rust-lang/rust/pull/80965. Makes the strangeness in https://github.com/rust-lang/rust/pull/77364 more apparent to the end user (note that `missing_docs` is *not* moved to rustdoc in this PR). Closes https://github.com/rust-lang/rust/issues/78786. ## Current status This is blocked on #82620 (see https://github.com/rust-lang/rust/pull/80527#issuecomment-787401519)
2021-03-02Rollup merge of #82516 - PoignardAzur:inherent-impl-ty, r=oli-obkYuki Okushi-16/+0
Add incomplete feature gate for inherent associate types. Mentored by ``````@oli-obk`````` So far the only change is that instead of giving an automatic error, the following code compiles: ```rust struct Foo; impl Foo { type Bar = isize; } ``` The backend work to make it actually usable isn't there yet. In particular, this: ```rust let x : Foo::Bar; ``` will give you: ```sh error[E0223]: ambiguous associated type --> /$RUSTC_DIR/src/test/ui/assoc-inherent.rs:15:13 | LL | let x : Foo::Bar; | ^^^^^^^^ help: use fully-qualified syntax: `<Foo as Trait>::Bar` ```
2021-03-01Rename rustdoc lints to be a tool lint instead of built-in.Joshua Nelson-1/+2
- Rename `broken_intra_doc_links` to `rustdoc::broken_intra_doc_links` - Ensure that the old lint names still work and give deprecation errors - Register lints even when running doctests Otherwise, all `rustdoc::` lints would be ignored. - Register all existing lints as removed This unfortunately doesn't work with `register_renamed` because tool lints have not yet been registered when rustc is running. For similar reasons, `check_backwards_compat` doesn't work either. Call `register_removed` directly instead. - Fix fallout + Rustdoc lints for compiler/ + Rustdoc lints for library/ Note that this does *not* suggest `rustdoc::broken_intra_doc_links` for `rustdoc::intra_doc_link_resolution_failure`, since there was no time when the latter was valid.
2021-02-26Auto merge of #78429 - casey:doctest-attribute-splitting, r=jyn514bors-1/+1
[librustdoc] Only split lang string on `,`, ` `, and `\t` Split markdown lang strings into tokens on `,`. The previous behavior was to split lang strings into tokens on any character that wasn't a `_`, `_`, or alphanumeric. This is a potentially breaking change, so please scrutinize! See discussion in #78344. I noticed some test cases that made me wonder if there might have been some reason for the original behavior: ``` t("{.no_run .example}", false, true, Ignore::None, true, false, false, false, v(), None); t("{.sh .should_panic}", true, false, Ignore::None, false, false, false, false, v(), None); t("{.example .rust}", false, false, Ignore::None, true, false, false, false, v(), None); t("{.test_harness .rust}", false, false, Ignore::None, true, true, false, false, v(), None); ``` It seemed pretty peculiar to specifically test lang strings in braces, with all the tokens prefixed by `.`. I did some digging, and it looks like the test cases were added way back in [this commit from 2014](https://github.com/rust-lang/rust/commit/3fef7a74ca9a) by `@skade.` It looks like they were added just to make sure that the splitting was permissive, and aren't testing that those strings in particular are accepted. Closes https://github.com/rust-lang/rust/issues/78344.
2021-02-25Add feature gate for inherent associate types.Olivier FAURE-16/+0
2021-02-18Rollup merge of #82246 - jesusprubio:add-long-explanation-e0549, ↵Dylan DPC-3/+38
r=GuillaumeGomez Add long explanation for E0549 Helps with #61137
2021-02-18Rollup merge of #82215 - TaKO8Ki:replace-if-let-while-let, r=varkorDylan DPC-2/+2
Replace if-let and while-let with `if let` and `while let` This pull request replaces if-let and while-let with `if let` and `while let`. closes https://github.com/rust-lang/rust/issues/82205
2021-02-18Update compiler/rustc_error_codes/src/error_codes/E0549.mdJesús Rubio-1/+1
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-02-18Update compiler/rustc_error_codes/src/error_codes/E0549.mdJesús Rubio-1/+1
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-02-18Update compiler/rustc_error_codes/src/error_codes/E0549.mdJesús Rubio-2/+2
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-02-18Add long explanation for E0549Jesus Rubio-3/+38
2021-02-17Add long explanation for E0543Jesus Rubio-1/+36
2021-02-17replace if-let and while-let with `if let` and `while let`Takayuki Maeda-2/+2
2021-02-15Add long explanation for E0545Jesus Rubio-1/+36
2021-02-12[librustdoc] Reform lang string token splittingCasey Rodarmor-1/+1
Only split doctest lang strings on `,`, ` `, and `\t`. Additionally, to preserve backwards compatibility with pandoc-style langstrings, strip a surrounding `{}`, and remove leading `.`s from each token. Prior to this change, doctest lang strings were split on all non-alphanumeric characters except `-` or `_`, which limited future extensions to doctest lang string tokens, for example using `=` for key-value tokens. This is a breaking change, although it is not expected to be disruptive, because lang strings using separators other than `,` and ` ` are not very common
2021-02-11Improve long explanation for E0542 and E0546Jesus Rubio-2/+2
2021-02-09Update compiler/rustc_error_codes/src/error_codes/E0547.mdJesús Rubio-1/+1
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-02-09Lost text re-addedJesus Rubio-0/+10
2021-02-08Add long explanation for E0547Jesus Rubio-1/+28
2021-02-07Auto merge of #80652 - calebzulawski:simd-lanes, r=nagisabors-5/+5
Improve SIMD type element count validation Resolves rust-lang/stdsimd#53. These changes are motivated by `stdsimd` moving in the direction of const generic vectors, e.g.: ```rust #[repr(simd)] struct SimdF32<const N: usize>([f32; N]); ``` This makes a few changes: * Establishes a maximum SIMD lane count of 2^16 (65536). This value is arbitrary, but attempts to validate lane count before hitting potential errors in the backend. It's not clear what LLVM's maximum lane count is, but cranelift's appears to be much less than `usize::MAX`, at least. * Expands some SIMD intrinsics to support arbitrary lane counts. This resolves the ICE in the linked issue. * Attempts to catch invalid-sized vectors during typeck when possible. Unresolved questions: * Generic-length vectors can't be validated in typeck and are only validated after monomorphization while computing layout. This "works", but the errors simply bail out with no context beyond the name of the type. Should these errors instead return `LayoutError` or otherwise provide context in some way? As it stands, users of `stdsimd` could trivially produce monomorphization errors by making zero-length vectors. cc `@bjorn3`
2021-02-07Rollup merge of #81835 - jesusprubio:improve-long-eplanation-e0546, ↵Guillaume Gomez-2/+9
r=GuillaumeGomez Improve long explanation for E0546 Helps with #61137
2021-02-06Typo fixJesus Rubio-2/+2
2021-02-06References addedJesus Rubio-2/+9
2021-02-06Comments updated to keep the consistencyJesus Rubio-5/+5
2021-02-06Improve long explanation for E0546Jesus Rubio-4/+4
2021-02-06Format fixesJesus Rubio-2/+1
2021-02-06Update compiler/rustc_error_codes/src/error_codes/E0542.mdJesús Rubio-1/+2
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-02-06Add long error explanation for E0542Jesus Rubio-1/+48
2021-02-05Rollup merge of #81676 - jyn514:crate-not-found, r=oli-obkMara Bos-0/+21
Add more information to the error code for 'crate not found' This comes up a lot when bootstrapping.
2021-02-03Add more information to the error code for 'crate not found'Joshua Nelson-0/+21
This comes up a lot when bootstrapping.
2021-02-03Auto merge of #81346 - hug-dev:nonsecure-call-abi, r=jonas-schievinkbors-0/+13
Add a new ABI to support cmse_nonsecure_call This adds support for the `cmse_nonsecure_call` feature to be able to perform non-secure function call. See the discussion on Zulip [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Support.20for.20callsite.20attributes/near/223054928). This is a followup to #75810 which added `cmse_nonsecure_entry`. As for that PR, I assume that the changes are small enough to not have to go through a RFC but I don't mind doing one if needed 😃 I did not yet create a tracking issue, but if most of it is fine, I can create one and update the various files accordingly (they refer to the other tracking issue now). On the Zulip chat, I believe `@jonas-schievink` volunteered to be a reviewer 💯
2021-02-02Add a new ABI to support cmse_nonsecure_callHugues de Valon-0/+13
This commit adds a new ABI to be selected via `extern "C-cmse-nonsecure-call"` on function pointers in order for the compiler to apply the corresponding cmse_nonsecure_call callsite attribute. For Armv8-M targets supporting TrustZone-M, this will perform a non-secure function call by saving, clearing and calling a non-secure function pointer using the BLXNS instruction. See the page on the unstable book for details. Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2021-02-01Add long error explanation for E0521Jesus Rubio-1/+29
2021-01-31Rollup merge of #81572 - pierwill:edit-error-codes-1, r=jonas-schievinkJonas Schievink-12/+14
Edit multiple error code Markdown files Makes small edits to several error code files. Fixes some missing punctuation. Changes some wording, grammar, and formatting for clarity and readability. Adds a link to the rustup book in E0658.
2021-01-30Edit multiple error code Markdown filespierwill-12/+14
Makes small edits to several error code files. Fixes some missing punctuation. Changes some wording, grammar, and formatting for clarity and readability. Adds a link to the rustup book in E0658.
2021-01-30Fix typo in E0759Steve Heindel-1/+1
2021-01-24Fix spelling in documentation for error E0207Joakim Åkerblom-1/+1
I have trouble parsing the the wording "type parameter parameter".
2021-01-24Update docs with powers-of-twoCaleb Zulawski-5/+5
2021-01-16Rollup merge of #80614 - 1000teslas:issue-78938-fix, r=tmandryMara Bos-0/+21
Explain why borrows can't be held across yield point in async blocks For https://github.com/rust-lang/rust/issues/78938.
2021-01-15Simplify E0373 async code example1000teslas-22/+5
2021-01-14Fix E0373 code example1000teslas-1/+1
2021-01-14Fix error E0373 documentation1000teslas-7/+23
2021-01-14Fix whitespace1000teslas-2/+2
2021-01-13Update code to account for extern ABI requirementMark Rousskov-1/+1
2021-01-13Update tests for extern block lintingMark Rousskov-16/+16
2021-01-13Move help link to error index1000teslas-0/+22
2021-01-07Refine E0435 descriptionDaiki Ihara-0/+6
2021-01-01Reinstate the error-code error over the feature gate erroroli-2/+0
2021-01-01Allow references to interior mutable data behind a feature gateoli-2/+4