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
Mazdak Farrokhzad
e32397a754
Rollup merge of #66060 - traxys:test_65401, r=michaelwoerister
...
Making ICEs and test them in incremental
This adds:
- A way to make the compiler ICE
- A way to check for ICE in `cfail` tests with `should-ice`
- A regression test for issue #65401
I am not sure the attribute added `should-ice` is the best for this job
2019-11-20 18:32:04 +01:00
Esteban Küber
468722b33c
fix rebase
2019-11-18 15:23:45 -08:00
Vadim Petrochenkov
f74fe812fe
resolve: Give derive helpers highest priority during resolution
2019-11-19 00:50:53 +03:00
Esteban Küber
6f8f70624b
Surround types with backticks in type errors
2019-11-18 11:03:04 -08:00
Esteban Küber
94c6425464
Remove E0308 note when primary label has all info
2019-11-18 11:03:03 -08:00
Esteban Küber
b2e6aef073
review comments: tweak prefix strings
2019-11-18 11:02:44 -08:00
Esteban Küber
83ffda5216
Specific labels when referring to "expected" and "found" types
2019-11-18 11:02:22 -08:00
Yuki Okushi
b83d50d34f
Rollup merge of #66271 - petrochenkov:abism, r=Centril
...
syntax: Keep string literals in ABIs and `asm!` more precisely
As a result we don't lose spans when `extern` functions or blocks are passed to proc macros, and also escape all string literals consistently.
Continuation of https://github.com/rust-lang/rust/pull/60679 , which did a similar thing with all literals besides those in ABIs and `asm!`.
TODO: Add tests.
Fixes https://github.com/rust-lang/rust/issues/60493
Fixes https://github.com/rust-lang/rust/issues/64561
r? @Centril
2019-11-17 13:36:12 +09:00
Vadim Petrochenkov
28aec1beaa
Add some more tests
2019-11-17 01:11:35 +03:00