Commit graph

29 commits

Author SHA1 Message Date
Jonas Schievink
014e8d46f8 Add tracking issue 2021-05-16 21:57:40 +02:00
Jonas Schievink
bd16825767 Allow async {} expressions in const contexts 2021-05-16 02:06:40 +02:00
SNCPlay42
ee79f83129 forbid impl Trait in generic param defaults 2021-04-06 16:21:08 +01:00
SNCPlay42
770a9cf780 fix expected/found order on impl trait projection mismatch 2021-03-16 16:55:11 +00:00
Oli Scherer
1f7df1956a Replace type_alias_impl_trait by min_type_alias_impl_trait with no actual changes in behaviour
This makes `type_alias_impl_trait` not actually do anything anymore
2021-03-15 17:32:43 +00:00
Alex Macleod
2a5a379b46 Add two regression tests
For #78721 and #78722
2020-11-16 23:13:45 +00:00
Yuki Okushi
7db8904518 Add test for issue-70877 2020-10-18 07:57:23 +09:00
Yuki Okushi
3a4fe97052 Add a regression test for issue-65581 2020-10-09 18:32:33 +09: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
Esteban Küber
8f12485335 review comments 2020-06-15 12:11:28 -07:00
Esteban Küber
96f5584b80 Expand "recursive opaque type" diagnostic
Fix #70968, partially address #66523.
2020-06-15 11:08:43 -07:00
Esteban Küber
c764a82310 keep predicate order and tweak output 2020-02-28 11:37:59 -08:00
Esteban Küber
1e7bcc733a Tweak wording 2020-02-28 11:37:59 -08:00
Esteban Küber
0387f0d19b Mention the full path of the implementing trait 2020-02-28 11:37:59 -08:00
Esteban Küber
8993b99ae2 On single local candidate, use span label 2020-02-28 11:37:58 -08:00
Esteban Küber
2c5766f2d4 Unify output of "variant not found" errors 2020-01-08 08:05:31 -08:00
Mazdak Farrokhzad
7ab50e4006
Rollup merge of #65785 - Centril:compat-to-error-2, r=oli-obk
Transition future compat lints to {ERROR, DENY} - Take 2

Follow up to https://github.com/rust-lang/rust/pull/63247 implementing https://github.com/rust-lang/rust/pull/63247#issuecomment-536295992.

- `legacy_ctor_visibility` (ERROR) -- closes #39207
- `legacy_directory_ownership` (ERROR) -- closes #37872
- `safe_extern_static` (ERROR) -- closes #36247
- `parenthesized_params_in_types_and_modules` (ERROR) -- closes #42238
- `duplicate_macro_exports` (ERROR)
- `nested_impl_trait` (ERROR) -- closes #59014
- `ill_formed_attribute_input` (DENY) -- transitions #57571
- `patterns_in_fns_without_body` (DENY) -- transitions #35203

r? @varkor
cc @petrochenkov
2019-11-08 16:50:33 +01:00
Mazdak Farrokhzad
0cbd06ae1c nested_impl_trait -> error 2019-11-06 11:10:37 +01:00
Tomasz Miąsko
0501d8ab0d Use check-pass in ui tests where appropriate 2019-11-04 16:03:46 +01:00
Sydney Acksman
4b2b23cc07 Add detailed explaination for E0666 2019-10-26 17:44:23 -05:00
Sydney Acksman
4cfcb77084 Changed APIT with explicit generic args span to specific arg spans 2019-10-24 09:47:26 -05:00
varkor
2f7c9a2896 Improve error message for APIT with explicit generic parameters
This is disallowed with type or const generics.
2019-10-20 01:40:24 +01:00
bors
824383d4ab Auto merge of #64237 - estebank:tweak-method-not-found, r=Centril
Give method not found a primary span label
2019-09-09 08:39:59 +00:00
Esteban Küber
5799fb419c Give method not found a primary span label 2019-09-08 18:27:02 -07:00
Mark Rousskov
6fdbece55f Update test stderr with results of enabling unused lints 2019-09-08 11:32:28 -04:00
varkor
fc48541ab1 Update syntax in existing tests 2019-08-02 02:44:35 +01:00
Giles Cope
c56c5a861a Self-referencial type renamed to recursive type. 2019-07-18 07:30:51 +01:00
Yuki Okushi
c004451a20 Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
varkor
1c6dce8b6d Add ui/impl-trait/issues folder 2019-06-03 19:57:13 +01:00