rust/tests/ui/span
Esteban Küber 10c2fbec24 Suggest .clone() in some move errors
```
error[E0507]: cannot move out of `*x` which is behind a shared reference
  --> $DIR/borrowck-fn-in-const-a.rs:6:16
   |
LL |         return *x
   |                ^^ move occurs because `*x` has type `String`, which does not implement the `Copy` trait
   |
help: consider cloning the value if the performance cost is acceptable
   |
LL -         return *x
LL +         return x.clone()
   |
```
2024-04-11 16:41:41 +00:00
..
auxiliary
borrowck-borrow-overloaded-auto-deref-mut.rs
borrowck-borrow-overloaded-auto-deref-mut.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-borrow-overloaded-deref-mut.rs
borrowck-borrow-overloaded-deref-mut.stderr
borrowck-call-is-borrow-issue-12224.rs
borrowck-call-is-borrow-issue-12224.stderr Suggest .clone() in some move errors 2024-04-11 16:41:41 +00:00
borrowck-call-method-from-mut-aliasable.rs
borrowck-call-method-from-mut-aliasable.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowck-fn-in-const-b.rs
borrowck-fn-in-const-b.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowck-let-suggestion-suffixes.rs
borrowck-let-suggestion-suffixes.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-object-mutability.rs
borrowck-object-mutability.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
borrowck-ref-into-rvalue.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
borrowck-ref-into-rvalue.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
borrowck-ref-into-rvalue.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
coerce-suggestions.rs remove sub_relations from infcx, recompute in diagnostics 2024-02-22 17:29:25 +01:00
coerce-suggestions.stderr remove sub_relations from infcx, recompute in diagnostics 2024-02-22 17:29:25 +01:00
destructor-restrictions.rs
destructor-restrictions.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
drop-location-span-error-rust-2021-incompatible-closure-captures-96258.rs Make sure that async closures (and fns) only capture their parent callable's parameters by move, and nothing else 2024-02-06 02:22:57 +00:00
drop-location-span-error-rust-2021-incompatible-closure-captures-96258.stderr Make sure that async closures (and fns) only capture their parent callable's parameters by move, and nothing else 2024-02-06 02:22:57 +00:00
dropck_arr_cycle_checked.rs
dropck_arr_cycle_checked.stderr
dropck_direct_cycle_with_drop.rs
dropck_direct_cycle_with_drop.stderr
dropck_misc_variants.rs
dropck_misc_variants.stderr
dropck_vec_cycle_checked.rs
dropck_vec_cycle_checked.stderr
dropck-object-cycle.rs
dropck-object-cycle.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
E0046.rs
E0046.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
E0072.rs
E0072.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
E0204.rs
E0204.stderr
E0493.rs
E0493.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
E0535.rs
E0535.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
E0536.rs
E0536.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
E0537.rs
E0537.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
gated-features-attr-spans.rs
gated-features-attr-spans.stderr Bless tests 2024-01-13 12:46:58 -05:00
impl-wrong-item-for-trait.rs
impl-wrong-item-for-trait.stderr
import-ty-params.rs
import-ty-params.stderr
issue28498-reject-ex1.rs
issue28498-reject-ex1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue28498-reject-lifetime-param.rs
issue28498-reject-lifetime-param.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue28498-reject-passed-to-fn.rs
issue28498-reject-passed-to-fn.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue28498-reject-trait-bound.rs
issue28498-reject-trait-bound.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-11925.rs
issue-11925.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-15480.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-15480.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-15480.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-23338-locals-die-before-temps-of-body.rs
issue-23338-locals-die-before-temps-of-body.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
issue-23729.rs
issue-23729.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-23827.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
issue-23827.stderr Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
issue-24356.rs
issue-24356.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-24690.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-24690.stderr
issue-24805-dropck-child-has-items-via-parent.rs
issue-24805-dropck-child-has-items-via-parent.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-24805-dropck-trait-has-items.rs
issue-24805-dropck-trait-has-items.stderr
issue-24895-copy-clone-dropck.rs
issue-24895-copy-clone-dropck.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-25199.rs
issue-25199.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-26656.rs
issue-26656.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-27522.rs
issue-27522.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-29106.rs
issue-29106.stderr
issue-29595.rs
issue-29595.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-33884.rs
issue-33884.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-34264.rs
issue-34264.stderr
issue-35987.rs Merge collect_mod_item_types query into check_well_formed 2024-03-07 14:26:31 +00:00
issue-35987.stderr Merge collect_mod_item_types query into check_well_formed 2024-03-07 14:26:31 +00:00
issue-36537.rs
issue-36537.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-37767.rs
issue-37767.stderr Rework print_disambiguation_help 2023-11-07 05:23:09 +00:00
issue-39018.rs
issue-39018.stderr
issue-39698.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
issue-39698.stderr Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
issue-40157.rs
issue-40157.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-42234-unknown-receiver-type.full.stderr
issue-42234-unknown-receiver-type.generic_arg.stderr
issue-42234-unknown-receiver-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-43927-non-ADT-derive.rs Supress unhelpful diagnostics for unresolved top level attributes 2024-01-29 17:43:07 +08:00
issue-43927-non-ADT-derive.stderr Supress unhelpful diagnostics for unresolved top level attributes 2024-01-29 17:43:07 +08:00
issue-71363.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71363.stderr
issue-81800.rs
issue-81800.stderr
issue-107353.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lint-unused-unsafe.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lint-unused-unsafe.stderr Remove revisions for THIR unsafeck 2024-01-05 09:30:27 +00:00
macro-span-replacement.rs macro_rules: Preserve all metavariable spans in a global side table 2024-02-18 11:19:24 +03:00
macro-span-replacement.stderr macro_rules: Preserve all metavariable spans in a global side table 2024-02-18 11:19:24 +03:00
macro-ty-params.rs
macro-ty-params.stderr
method-and-field-eager-resolution.rs
method-and-field-eager-resolution.stderr
missing-unit-argument.rs
missing-unit-argument.stderr
move-closure.rs
move-closure.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
multiline-span-E0072.rs
multiline-span-E0072.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
multiline-span-simple.rs
multiline-span-simple.stderr Use TraitRef::to_string sorting in favor of TraitRef::ord, as the latter compares DefIds which we need to avoid 2024-03-27 14:02:15 +00:00
multispan-import-lint.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
multispan-import-lint.stderr
mut-arg-hint.rs
mut-arg-hint.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
mut-ptr-cant-outlive-ref.rs
mut-ptr-cant-outlive-ref.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
non-existing-module-import.rs
non-existing-module-import.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
pub-struct-field.rs
pub-struct-field.stderr
range-2.rs
range-2.stderr
recursive-type-field.rs
recursive-type-field.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
regionck-unboxed-closure-lifetimes.rs
regionck-unboxed-closure-lifetimes.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
regions-close-over-borrowed-ref-in-obj.rs
regions-close-over-borrowed-ref-in-obj.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
regions-close-over-type-parameter-2.rs
regions-close-over-type-parameter-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
regions-escape-loop-via-variable.rs
regions-escape-loop-via-variable.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
regions-escape-loop-via-vec.rs
regions-escape-loop-via-vec.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
regions-infer-borrow-scope-within-loop.rs
regions-infer-borrow-scope-within-loop.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
send-is-not-static-ensures-scoping.rs
send-is-not-static-ensures-scoping.stderr
send-is-not-static-std-sync-2.rs
send-is-not-static-std-sync-2.stderr
send-is-not-static-std-sync.rs Remove Drop impl of mpsc Receiver and (Sync)Sender 2023-08-18 14:46:20 +02:00
send-is-not-static-std-sync.stderr Account for unops when suggesting cloning 2024-04-11 16:41:41 +00:00
slice-borrow.rs
slice-borrow.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
suggestion-non-ascii.rs
suggestion-non-ascii.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
transitive-dep-span.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
transitive-dep-span.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
type-annotations-needed-expr.rs
type-annotations-needed-expr.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
type-binding.rs
type-binding.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
typo-suggestion.rs
typo-suggestion.stderr
unused-warning-point-at-identifier.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused-warning-point-at-identifier.stderr
vec_refs_data_with_early_death.rs
vec_refs_data_with_early_death.stderr
vec-must-not-hide-type-from-dropck.rs
vec-must-not-hide-type-from-dropck.stderr
visibility-ty-params.rs Resolve visibility paths as modules not as types. 2023-08-02 15:30:24 +00:00
visibility-ty-params.stderr Resolve visibility paths as modules not as types. 2023-08-02 15:30:24 +00:00
wf-method-late-bound-regions.rs
wf-method-late-bound-regions.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00