Commit graph

18 commits

Author SHA1 Message Date
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
Oli Scherer
063b1675b2 Clarify what "this" means 2022-12-13 09:51:03 +00:00
Esteban Küber
3c905d4ccd review comments: inline bindings and fix typo 2022-11-23 12:17:48 -08:00
Esteban Küber
e6e7a6db28 Fix wording 2022-11-23 12:17:47 -08:00
Esteban Küber
c0e481731b Remove logic duplication 2022-11-23 12:17:47 -08:00
Esteban Küber
9e72e35ceb Suggest .clone() or ref binding on E0382 2022-11-23 12:17:47 -08:00
Maybe Waffle
13b67fb9d2 bless ui tests 2022-10-01 10:03:06 +00:00
Aaron Hill
20979aad77
Change wording of note 2021-01-08 14:57:35 -05:00
Santiago Pastorino
953d7a64a5
Add unsized_locals to INCOMPLETE_FEATURES list 2020-10-27 14:45:28 -03:00
Dan Aloni
07e7823c01 pretty: trim paths of unique symbols
If a symbol name can only be imported from one place for a type, and
as long as it was not glob-imported anywhere in the current crate, we
can trim its printed path and print only the name.

This has wide implications on error messages with types, for example,
shortening `std::vec::Vec` to just `Vec`, as long as there is no other
`Vec` importable anywhere.

This adds a new '-Z trim-diagnostic-paths=false' option to control this
feature.

On the good path, with no diagnosis printed, we should try to avoid
issuing this query, so we need to prevent trimmed_def_paths query on
several cases.

This change also relies on a previous commit that differentiates
between `Debug` and `Display` on various rustc types, where the latter
is trimmed and presented to the user and the former is not.
2020-09-02 22:26:37 +03:00
Aaron Hill
5f7436b5fd
Be consistent when describing a move as a 'partial' in diagnostics
When an error occurs due to a partial move, we would use the world
"partial" in some parts of the error message, but not in others. This
commit ensures that we use the word 'partial' in either all or none of
the diagnostic messages.

Additionally, we no longer describe a move out of a `Box` via `*` as
a 'partial move'. This was a pre-existing issue, but became more
noticable when the word 'partial' is used in more places.
2020-08-08 14:21:04 -04:00
Aaron Hill
fa6a61c689
Explain move errors that occur due to method calls involving self
This is a re-attempt of #72389 (which was reverted in #73594)
Instead of using `ExpnKind::Desugaring` to represent operators, this PR
checks the lang item directly.
2020-06-26 16:28:09 -04:00
Aaron Hill
ad9972a20d
Revert "Rollup merge of #72389 - Aaron1011:feature/move-fn-self-msg, r=nikomatsakis"
This reverts commit 372cb9b69c, reversing
changes made to 5c61a8dc34.
2020-06-22 12:46:29 -04:00
Aaron Hill
5902b2f6e5
Use fn_span to point to the actual method call 2020-06-11 18:10:13 -04:00
Aaron Hill
2c11c35f89
Explain move errors that occur due to method calls involving self 2020-06-11 17:40:40 -04:00
Santiago Pastorino
365807f057
Make Box<dyn FnOnce> respect self alignment 2020-04-18 14:37:44 -03:00
Matthew Jasper
8eef102270 update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
Masaki Hara
2f7ea4a872 Add more tests on unsized locals autoderef and borrowck. 2018-10-27 17:17:24 +09:00