Mazdak Farrokhzad
bb85308ce7
Rollup merge of #70233 - petrochenkov:superproc, r=ecstatic-morse
...
resolve: Do not resolve visibilities on proc macro definitions twice
Fixes https://github.com/rust-lang/rust/issues/68921
2020-03-23 10:29:16 +01:00
Mazdak Farrokhzad
906b399583
Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasper
...
Increase verbosity when suggesting subtle code changes
Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion.
Fix #69243 .
2020-03-23 10:29:09 +01:00
Vadim Petrochenkov
c3c0a097a7
resolve: Do not resolve visibilities on proc macro definitions twice
2020-03-23 11:40:58 +03:00
Mazdak Farrokhzad
11f5309858
Rollup merge of #70227 - LeSeulArtichaut:typo-def, r=Centril
...
Only display definition when suggesting a typo
Closes #70206
r? @Centril
2020-03-23 04:26:08 +01:00
Esteban Küber
854b78fe22
Normalize wording of privacy access labels
2020-03-22 15:36:54 -07:00
Esteban Küber
94bbd46682
Add span label to primary error span
2020-03-22 11:18:06 -07:00
Vadim Petrochenkov
bdd07f932b
proc_macro_harness: Use item header spans for errors
2020-03-22 12:59:32 +03:00
Vadim Petrochenkov
e391d776e3
Add a test for out-of-line module passed through a proc macro
2020-03-21 21:40:58 +03:00
LeSeulArtichaut
cb7a2c16aa
Bless tests
2020-03-21 15:03:58 +01:00
Mazdak Farrokhzad
60a2d063a9
Rollup merge of #70075 - GuillaumeGomez:fix-repr-display, r=petrochenkov
...
Fix repr pretty display
Fixes #70027 .
r? @varkor
2020-03-18 18:03:47 +01:00
Guillaume Gomez
81172d8f39
Update pretty tests
2020-03-17 20:58:31 +01:00
bors
7ceebd98c6
Auto merge of #69519 - 12101111:remove-proc-macro-check, r=nagisa
...
Don't use static crt by default when build proc-macro
Don't check value of `crt-static` when build proc-macro crates, since they are always built dynamically.
For more information, see https://github.com/rust-lang/cargo/issues/7563#issuecomment-591965320
I hope this will fix issues about compiling `proc_macro` crates on musl host without bring more issues.
Fix https://github.com/rust-lang/cargo/issues/7563
2020-03-17 18:27:26 +00:00
12101111
afd374ff36
Ignore wasm32
2020-03-17 09:57:11 +08:00
Ralf Jung
c7eb0f2a40
fix expand-to-unstable test
2020-03-11 19:41:41 +01:00
Mazdak Farrokhzad
87b6bc3518
span-api-tests: leave FIXME
2020-03-10 07:26:27 +01:00
Mazdak Farrokhzad
cf2d4236eb
--bless some tests
2020-03-10 07:26:27 +01:00
Mazdak Farrokhzad
b3bc427228
adjust span-api-tests.rs
2020-03-10 07:26:27 +01:00
12101111
75e6cfc79b
run crt-static test on all target
2020-03-09 08:39:34 +08:00
12101111
7a89bf1667
override flags from compiletest
2020-03-08 21:49:52 +08:00
12101111
84349cc564
Remove trailing whitespace.
2020-03-03 19:42:27 +08:00
12101111
89aebbdd7b
Only run this test on musl
2020-03-03 19:17:24 +08:00
12101111
7ca1b2f504
Don't use static crt by default when build proc-macro.
2020-03-03 16:17:15 +08:00
Yuki Okushi
c55df3786a
Make rustc_attrs tracking issue None
2020-03-01 00:48:14 +09:00
Vadim Petrochenkov
d134385823
syntax: Remove Nt(Impl,Trait,Foreign)Item
2020-02-24 20:25:32 +03:00
Vadim Petrochenkov
950845c5b1
Add a test for proc macro generating $ IDENT
2020-02-17 22:47:59 +03:00
Matthias Prechtl
7b555178ae
--bless --compare-mode=nll
2020-02-09 20:43:49 +01:00
Eduard-Mihai Burtescu
4c7eb59e81
rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.
2020-02-06 21:46:38 +02:00
Eduard-Mihai Burtescu
ab080973cb
rustc_errors: hide "in this macro invocation" when redundant, more explicitly.
2020-02-06 21:32:07 +02:00
Eduard-Mihai Burtescu
f6fc80206e
rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.
2020-02-06 21:32:07 +02:00
Esteban Küber
2100b31535
review comments
2020-02-05 10:32:01 -08:00
Esteban Küber
fa4594196d
Suggest 'r instead of 'lifetime
2020-02-05 10:32:01 -08:00
David
152811d8bf
Change expansion error to be non-fatal
...
Changes the error handler for inner attributes that replace the root
with a non-module. Previously it would emit a fatal error. It now emits
an empty expasion and a non-fatal error like the existing handler for a
failed expansion.
2020-02-02 21:03:38 -08:00
David Ross
410114b9d2
Add tests for issue 59191
2020-02-01 18:59:11 -08:00
bors
5371ddf8c6
Auto merge of #68080 - varkor:declared-here, r=petrochenkov
...
Address inconsistency in using "is" with "declared here"
"is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout.
r? @Centril
2020-01-31 15:13:51 +00:00
Esteban Küber
697fdc568e
Suggest defining type parameter when appropriate
...
```
error[E0412]: cannot find type `T` in this scope
--> file.rs:3:12
|
3 | impl Trait<T> for Struct {}
| - ^ not found in this scope
| |
| help: you might be missing a type parameter: `<T>`
```
Fix #64298 .
2020-01-26 10:57:18 -08:00
varkor
24a2929ed1
Normalise notes with the/is
2020-01-24 16:24:50 +00:00
Esteban Küber
2102723887
review comments
2020-01-19 17:31:34 -08:00
Esteban Küber
78d3ea5484
When encountering an expected named lifetime and none are present, suggest adding one
2020-01-19 17:31:33 -08:00
Vadim Petrochenkov
c84efe9b6c
resolve: Say "import" when reporting private imports
2020-01-16 21:59:11 +03:00
Vadim Petrochenkov
28c3f6eb40
resolve: Point at the private item definitions in privacy errors
2020-01-16 21:59:11 +03:00
Esteban Küber
38a3506c45
Ignore platforms that can't point to std
2020-01-10 11:40:30 -08:00
Esteban Küber
8eb7ac561e
Use def_span to minimize definition span to first line when possible
2020-01-10 11:40:29 -08:00
Esteban Küber
39c96a0f53
Point at the span for the definition of crate foreign ADTs
2020-01-10 11:40:29 -08:00
Vadim Petrochenkov
642669c74d
Update tests
2020-01-09 21:23:12 +03:00
Andy Russell
7fd014d569
tweak wording of mismatched delimiter errors
2020-01-03 08:40:15 -05:00
Vadim Petrochenkov
e3155abd2e
Stabilize attribute macros on inline modules
2019-12-28 11:42:26 +03:00
Aaron Hill
462f06de07
Emit coercion suggestions in more places
...
Fixes #66910
We have several different kinds of suggestions we can try to make when
type coercion fails. However, we were previously only emitting these
suggestions from `demand_coerce_diag`. This resulted in the compiler
failing to emit applicable suggestions in several different cases, such
as when the implicit return value of a function had the wrong type.
This commit adds a new `emit_coerce_suggestions` method, which tries to
emit a number of related suggestions. This method is called from both
`demand_coerce_diag` and `CoerceMany::coerce_inner`, which covers a much
wider range of cases than before.
We now suggest using `.await` in more cases where it is applicable,
among other improvements.
2019-12-03 21:51:16 -05:00
Vadim Petrochenkov
1a496f3379
syntax: Use ast::MacArgs for attributes
2019-12-02 21:56:34 +03:00
Esteban Küber
34f03c01f6
Point at type in let assignment on type errors
2019-11-21 19:24:31 -08:00
bors
53712f8637
Auto merge of #66389 - estebank:type-err-labels, r=petrochenkov
...
Specific labels when referring to "expected" and "found" types
2019-11-21 17:53:19 +00:00