summary refs log tree commit diff
path: root/src/test/ui/error-codes
AgeCommit message (Collapse)AuthorLines
2022-11-28Further tweak the type shortening logicEsteban Küber-1/+1
2022-11-28Detect long types in E0308 and write them to diskEsteban Küber-1/+1
On type error with long types, print an abridged type and write the full type to disk. Print the widest possible short type while still fitting in the terminal.
2022-11-21Unreserve braced enum variants in value namespaceVadim Petrochenkov-1/+1
2022-11-18On E0275 do not print out the full type in the msgEsteban Küber-1/+1
When printing requirement overflow errors, do not print out the full type name when it is longer than 50 characters long.
2022-11-18On overflow errors, do not print out long typesEsteban Küber-3/+5
2022-11-10Don't print full paths in overlap errorsMichael Goulet-6/+6
2022-11-08selection failure: recompute applicable implslcnr-5/+29
2022-11-06Auto merge of #99943 - compiler-errors:tuple-trait, r=jackh726bors-3/+9
Implement `std::marker::Tuple`, use it in `extern "rust-call"` and `Fn`-family traits Implements rust-lang/compiler-team#537 I made a few opinionated decisions in this implementation, specifically: 1. Enforcing `extern "rust-call"` on fn items during wfcheck, 2. Enforcing this for all functions (not just ones that have bodies), 3. Gating this `Tuple` marker trait behind its own feature, instead of grouping it into (e.g.) `unboxed_closures`. Still needing to be done: 1. Enforce that `extern "rust-call"` `fn`-ptrs are well-formed only if they have 1/2 args and the second one implements `Tuple`. (Doing this would fix ICE in #66696.) 2. Deny all explicit/user `impl`s of the `Tuple` trait, kinda like `Sized`. 3. Fixing `Tuple` trait built-in impl for chalk, so that chalkification tests are un-broken. Open questions: 1. Does this need t-lang or t-libs signoff? Fixes #99820
2022-11-05Auto merge of #102458 - JohnTitor:stabilize-instruction-set, r=oli-obkbors-13/+5
Stabilize the `instruction_set` feature Closes https://github.com/rust-lang/rust/issues/74727 FCP is complete on https://github.com/rust-lang/rust/issues/74727#issuecomment-1242773253 r? `@pnkfelix` and/or `@nikomatsakis` cc `@xd009642` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-11-05Adjust diagnostics, bless testsMichael Goulet-3/+9
2022-11-05Rollup merge of #103994 - clubby789:break-unlabeled, r=TaKO8KiDylan DPC-2/+2
Specify that `break` cannot be used outside of loop *or* labeled block Closes #103981 `@rustbot` label +A-diagnostics
2022-11-05Specify that `break` cannot be used outside of loop *or* labeled blockclubby789-2/+2
2022-11-02Remove has_errors from FnCtxtMichael Goulet-5/+19
2022-11-01Rollup merge of #103759 - cjgillot:adt-collect, r=davidtwcoDylan DPC-3/+3
Use `adt_def` during type collection. This removes a wrapper which is close to what `adt_def` does.
2022-10-31Use AdtDef to check enum.Camille GILLOT-3/+3
2022-10-30Rollup merge of #97971 - Soveu:varargs, r=jackh726Michael Howell-2/+2
Enable varargs support for calling conventions other than C or cdecl This patch makes it possible to use varargs for calling conventions, which are either based on C (efiapi) or C is based on them (sysv64 and win64). Also pinging ``@phlopsi,`` because he noticed first this oversight when writing a library for UEFI.
2022-10-23Cleanup message and bless testsJack Huey-1/+1
2022-10-23Enable varargs support for calling conventions other than C or cdeclSoveu-2/+2
This patch makes it possible to use varargs for calling conventions, which are either based on C (like efiapi) or C is based on them (for example sysv64 and win64).
2022-10-20Add fix suggestions for E0199, E0200, and E0569Nicolas Barrios-0/+12
2022-10-13Report duplicate definition in impls with overlap check.Camille GILLOT-5/+6
2022-10-11Report duplicate definitions in trait impls during resolution.Camille GILLOT-12/+18
2022-10-06Rollup merge of #102694 - compiler-errors:fn-to-method, r=davidtwcoMatthias Krüger-11/+11
Suggest calling method if fn does not exist I tried to split this up into two commits, the first where we stash the resolution error until typeck (which causes a bunch of diagnostics changes because the ordering of error messages change), then the second commit is the actual logic that actually implements the suggestion. I am not in love with the presentation of the suggestion, so I could use some advice for how to format the actual messaging. r? diagnostics Fixes #102518
2022-10-05Delay function resolution error until typeckMichael Goulet-11/+11
2022-10-04follow-up fix about 101866 to print the self type.Yiming Lei-12/+12
modified: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs modified: src/test/ui/error-codes/E0283.stderr modified: src/test/ui/error-codes/E0790.stderr modified: src/test/ui/traits/static-method-generic-inference.stderr modified: src/test/ui/type/issue-101866.stderr
2022-10-01bless ui testsMaybe Waffle-4/+4
2022-09-29Stabilize the `instruction_set` featureYuki Okushi-13/+5
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-09-29Rollup merge of #102351 - Rageking8:improve-E0585, r=wesleywiserYuki Okushi-1/+1
Improve E0585 help
2022-09-28Auto merge of #100719 - CohenArthur:rust-safe-intrinsic-attribute, r=wesleywiserbors-2/+6
Add `#[rustc_safe_intrinsic]` This PR adds the `#[rustc_safe_intrinsic]` attribute as mentionned on Zulip. The goal of this attribute is to avoid keeping a list of symbols as the source for stable intrinsics, and instead rely on an attribute. This is similar to `#[rustc_const_stable]` and `#[rustc_const_unstable]`, which among other things, are used to mark the constness of intrinsic functions.
2022-09-29improve E0585 helpRageking8-1/+1
2022-09-27core: Mark all safe intrinsics with #[rustc_safe_intrinsic]Arthur Cohen-1/+3
2022-09-27attributes: Add #[rustc_safe_intrinsic] builtinArthur Cohen-1/+3
2022-09-26remove implied link bound per reviewMatthew Kelly-2/+2
also update .stderr outputs
2022-09-26Merge remote-tracking branch 'origin/master' into ↵Matthew Kelly-9/+9
mpk/add-long-error-message-for-E0311
2022-09-15Remove feature gate from let else suggestionest31-1/+1
The let else suggestion added by 0d92752b8aac53e033541d04fc7d9677d8bca227 does not need a feature gate any more.
2022-09-06Rollup merge of #101357 - compiler-errors:variant-sugg-tweak, r=oli-obkGuillaume Gomez-3/+3
Include enum path in variant suggestion (except for `Result` and `Option`, which we should have via the prelude) Fixes #101356
2022-09-03Include enum path in variant suggestionMichael Goulet-3/+3
2022-09-03Shrink suggestion span of argument mismatch errorMichael Goulet-5/+5
2022-08-31Merge remote-tracking branch 'origin/master' into ↵Matthew Kelly-13/+15
mpk/add-long-error-message-for-E0311
2022-08-27Review updates: simpler MWE and docsMatthew Kelly-50/+19
- use the simpler minimum working example from the review - add an alterate "fix" that helps make the cause of the error more clear - attempt to add an improved description of what is going on
2022-08-27use smaller span for suggestionsTakayuki Maeda-2/+4
2022-08-24Improve description againMatthew Kelly-7/+8
-- update summary based on review -- rewrite explanation to be more clear and correct
2022-08-23Improve local generic parameter suggestions.Camille GILLOT-4/+4
2022-08-21Rework ambiguity errorsMichael Goulet-17/+4
2022-08-21Rework point-at-argMichael Goulet-6/+19
2022-08-19Add long description and test for E0311Matthew Kelly-0/+63
Adds a long description and unit test for the E0311 compiler error.
2022-08-19Rollup merge of #99576 - compiler-errors:foreign-fundamental-drop-is-bad, ↵Dylan DPC-5/+5
r=TaKO8Ki Do not allow `Drop` impl on foreign fundamental types `Drop` should not be implemented on `Pin<T>` even if `T` is local. This does not trigger regular orphan rules is because `Pin` is `#[fundamental]`... but we don't allow specialized `Drop` impls anyways, so these rules are not sufficient to prevent this impl on stable. Let's just choose even stricter rules, since we shouldn't be implementing `Drop` on a foreign ADT ever. Fixes #99575
2022-08-18Reword "Required because of the requirements on the impl of ..."Andy Wang-2/+2
2022-08-16Do not allow Drop impl on foreign fundamental typesMichael Goulet-5/+5
2022-08-14Point to argument if it's self type of unsatisfied projection predicateMichael Goulet-2/+4
2022-08-08Fix plural form of `variant` in error message not formatting correctlyBryysen-6/+26
due to ordering, added/improved comments and removed redundant test already caught by `E0081.rs`