summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
AgeCommit message (Collapse)AuthorLines
2021-06-07Add E0316.mdFabian Wolff-1/+33
2021-06-07Comment out unused error codes in error_codes.rsFabian Wolff-15/+15
2021-06-06Fix corrected example in E0759.mdFabian Wolff-3/+3
2021-05-13swap function order for better read flowRafael Kraut-5/+5
When having the order ``` foo.bar(); // we can now use this method since i32 implements the Foo trait [...] impl Foo for i32 ``` the `// we can now use this method` comment is less clear to me.
2021-05-04Auto merge of #83213 - rylev:update-lints-to-errors, r=nikomatsakisbors-0/+50
Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021 This addresses https://github.com/rust-lang/rust/pull/81244 by updating two lints to errors in the Rust 2021 edition. r? `@estebank`
2021-04-29Implement RFC 1260 with feature_name `imported_main`.Charles Lew-1/+3
2021-04-25remove const_fn from some error_code descriptionsRalf Jung-4/+0
2021-04-24Auto merge of #84310 - RalfJung:const-fn-feature-flags, r=oli-obkbors-21/+1
further split up const_fn feature flag This continues the work on splitting up `const_fn` into separate feature flags: * `const_fn_trait_bound` for `const fn` with trait bounds * `const_fn_unsize` for unsizing coercions in `const fn` (looks like only `dyn` unsizing is still guarded here) I don't know if there are even any things left that `const_fn` guards... at least libcore and liballoc do not need it any more. `@oli-obk` are you currently able to do reviews?
2021-04-23Auto merge of #83729 - JohnTitor:issue-43913, r=estebankbors-6/+20
Add a suggestion when using a type alias instead of trait alias Fixes #43913 r? `@estebank`
2021-04-19remove E0723 error codeRalf Jung-21/+1
2021-04-18Auto merge of #83799 - crlf0710:stablize_non_ascii_idents, r=Manishearthbors-5/+2
Stablize `non-ascii-idents` This is the stablization PR for RFC 2457. Currently this is waiting on fcp in [tracking issue](https://github.com/rust-lang/rust/issues/55467). r? `@Manishearth`
2021-04-16Remove #[main] attribute.Charles Lew-2/+4
2021-04-13Add compatibility info to lintsRyan Levick-2/+2
2021-04-08Fix error code testsRyan Levick-2/+2
2021-04-08Improve errorRyan Levick-1/+1
2021-04-08Update error code docs even moreRyan Levick-12/+8
2021-04-08Proper format for error code explanationsRyan Levick-13/+30
2021-04-08Fix error code tests for nowRyan Levick-3/+3
2021-04-08Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in ↵Ryan Levick-0/+37
Rust 2021
2021-04-08Stablize `non_ascii_idents` feature.Charles Lew-5/+2
2021-04-04Bump cfgsMark Rousskov-2/+1
2021-04-02Mention trait alias on the E0404 noteYuki Okushi-6/+20
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>