about summary refs log tree commit diff
path: root/src/test/ui/span
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-7833/+0
2023-01-05Tweak wording of fn call with wrong number of argsEsteban Küber-9/+9
2023-01-01Verbose suggestionsEsteban Küber-15/+35
2022-12-28Use verbose suggestions for mutability errorsEsteban Küber-30/+70
2022-12-14Rollup merge of #105523 - estebank:suggest-collect-vec, r=compiler-errorsMatthias Krüger-4/+4
Suggest `collect`ing into `Vec<_>` Fix #105510.
2022-12-13review commentsEsteban Küber-6/+6
2022-12-13Suggest `: Type` instead of `: _`Esteban Küber-6/+6
2022-12-13Suggest `collect`ing into `Vec<_>`Esteban Küber-2/+2
2022-12-13Inform the user which trait is meant in the diagnostic itself instead of ↵Oli Scherer-1/+1
relying on the span making it obvious
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-7/+1
available
2022-12-09Introduce `Span::is_visible`Esteban Küber-4/+0
2022-12-07Make -Zsimulate-remapped-rust-src-base reproducible on CIOli Scherer-3/+3
2022-12-06Properly indent messagesOli Scherer-2/+6
2022-12-06Start emitting labels even if their pointed to file is not available locallyOli Scherer-0/+2
2022-12-05Tweak "the following other types implement trait"Esteban Küber-9/+4
When *any* of the suggested impls is an exact match, *only* show the exact matches. This is particularly relevant for integer types. fix fmt
2022-11-29Avoid more unnecessary `MetaItem`/`Attribute` conversions.Nicholas Nethercote-2/+10
In `Expander::expand` the code currently uses `mk_attr_outer` to convert a `MetaItem` to an `Attribute`, and then follows that with `meta_item_list` which converts back. This commit avoids the unnecessary conversions. There was one wrinkle: the existing conversions caused the bogus `<>` on `Default<>` to be removed. With the conversion gone, we get a second error message about the `<>`. This is a rare case, so I think it probably doesn't matter much.
2022-11-09Rollup merge of #103307 - b4den:master, r=estebankManish Goregaokar-10/+10
Add context to compiler error message Changed `creates a temporary which is freed while still in use` to `creates a temporary value which is freed while still in use`.
2022-11-05Adjust diagnostics, bless testsMichael Goulet-2/+2
2022-10-25Modify ui tests to reflect the changeByron Zhong-0/+3
2022-10-20Update tests to match error message changesb4den-10/+10
2022-10-12Auto merge of #101679 - compiler-errors:rpitit-default-body, r=nikomatsakisbors-19/+4
Support default-body trait functions with return-position `impl Trait` in traits Introduce a new `Trait` candidate kind for the `ImplTraitInTrait` projection candidate, which just projects an RPITIT down to its opaque type form. This is a hack until we lower RPITITs to regular associated types, after which we will need to rework how these default bodies are type-checked, so comments are left in a few places for us to clean up later. Fixes #101665
2022-10-10Rollup merge of #102055 - c410-f3r:moar-errors, r=petrochenkovDylan DPC-157/+0
Move some tests to more reasonable directories r? ``@petrochenkov``
2022-10-07Rewrite representabilityCameron Steffen-31/+23
2022-10-05Delay function resolution error until typeckMichael Goulet-6/+6
2022-10-05Bless testsMichael Goulet-19/+4
2022-10-01bless ui testsMaybe Waffle-1/+1
2022-09-26Rollup merge of #101875 - fmease:allow-more-negative-copy-impls, r=lcnrMatthias Krüger-4/+4
Allow more `!Copy` impls You can already implement `!Copy` for a lot of types (with `#![feature(negative_impls)]`). However, before this PR you could not implement `!Copy` for ADTs whose fields don't implement `Copy` which didn't make any sense. Further, you couldn't implement `!Copy` for types impl'ing `Drop` (equally nonsensical). ``@rustbot`` label T-types F-negative_impls Fixes #101836. r? types
2022-09-24Note the type when unable to drop values in compile timeDeadbeef-3/+3
2022-09-23Allow more !Copy implsLeón Orell Valerian Liehr-4/+4
2022-09-23Rollup merge of #100734 - ComputerDruid:afit_feature, r=compiler-errorsMatthias Krüger-1/+1
Split out async_fn_in_trait into a separate feature PR #101224 added support for async fn in trait desuraging behind the `return_position_impl_trait_in_trait` feature. Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
2022-09-21Split out async_fn_in_trait into a separate featureDan Johnson-1/+1
PR #101224 added support for async fn in trait desuraging behind the return_position_impl_trait_in_trait feature. Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
2022-09-22Bless test output changesFrank Steffahn-1/+1
2022-09-20Move some tests to more reasonable directoriesCaio-157/+0
2022-09-16add help for invalid inline argumentRageking8-0/+2
2022-09-09Adjust pretty printing of RPITITsMichael Goulet-2/+2
2022-09-09Bless tests, fix ICE with ImplTraitPlaceholderMichael Goulet-17/+34
2022-09-03Shrink suggestion span of argument mismatch errorMichael Goulet-8/+8
2022-08-28Remove `register_attr`-related testsYuki Okushi-24/+0
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-08-19Rollup merge of #100081 - RalfJung:unused-unsafe-in-unsafe-fn, r=jackh726Dylan DPC-541/+103
never consider unsafe blocks unused if they would be required with deny(unsafe_op_in_unsafe_fn) Judging from https://github.com/rust-lang/rust/issues/71668#issuecomment-1200317370 the consensus nowadays seems to be that we should never consider an unsafe block unused if it was required with `deny(unsafe_op_in_unsafe_fn)`, no matter whether that lint is actually enabled or not. So let's adjust rustc accordingly. The first commit does the change, the 2nd does some cleanup.
2022-08-18Rollup merge of #100643 - ↵Matthias Krüger-1/+3
TaKO8Ki:point-at-type-parameter-shadowing-another-type, r=estebank Point at a type parameter shadowing another type This patch fixes a part of #97459.
2022-08-17point at a type parameter shadowing another typeTakayuki Maeda-1/+3
2022-08-12Point out a single arg if we have a single arg incompatibilityMichael Goulet-3/+3
2022-08-02never consider unsafe blocks unused if they would be required with ↵Ralf Jung-541/+103
unsafe_op_in_unsafe_fn
2022-07-15Avoid incorrect suggestionEsteban Küber-11/+4
We check that there's a single level of block nesting to ensure always correct suggestions. If we don't, then we only provide a free-form message to avoid misleading users in cases like `src/test/ui/nll/borrowed-temporary-error.rs`. We could expand the analysis to suggest hoising all of the relevant parts of the users' code to make the code compile, but that could be too much.
2022-07-15Provide structured suggestion for dropped temp valueEsteban Küber-12/+65
2022-07-08Auto merge of #98816 - estebank:implicit-sized, r=oli-obkbors-1/+1
Track implicit `Sized` obligations in type params When we evaluate `ty::GenericPredicates` we introduce the implicit `Sized` predicate of type params, but we do so with only the `Predicate` its `Span` as context, we don't have an `Obligation` or `ObligationCauseCode` we could influence. To try and carry this information through, we add a new field to `ty::GenericPredicates` that tracks both which predicates come from a type param and whether that param has any bounds already (to use in suggestions). We also suggest adding a `?Sized` bound if appropriate on E0599. Address part of #98539.
2022-07-07Track implicit `Sized` obligations in type paramsEsteban Küber-1/+1
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
2022-07-07Shorten span for closures.Camille GILLOT-11/+8
2022-07-01Auto merge of #98781 - GuillaumeGomez:rollup-798kb8u, r=GuillaumeGomezbors-7/+10
Rollup of 5 pull requests Successful merges: - #97249 (`<details>`/`<summary>` UI fixes) - #98418 (Allow macOS to build LLVM as shared library) - #98460 (Use CSS variables to handle theming) - #98497 (Improve some inference diagnostics) - #98708 (rustdoc: fix 98690 Panic if invalid path for -Z persist-doctests) Failed merges: - #98761 (more `need_type_info` improvements) r? `@ghost` `@rustbot` modify labels: rollup
2022-07-01Rollup merge of #98497 - compiler-errors:span-inference-note, r=lcnrGuillaume Gomez-7/+10
Improve some inference diagnostics - Properly point out point location where "type must be known at this point", or else omit the note if it's not associated with a useful span. - Fix up some type ambiguity diagnostics, errors shouldn't say "cannot infer type for reference `&'a ()`" when the given type has no inference variables.