Esteban Küber
3cf556939e
Detect errors caused by async block in 2015 edition
2020-05-05 19:35:20 -07:00
Val Markovic
2155adbc3a
Moving more build-pass tests to check-pass
...
One or two tests became build-pass without the FIXME because they really
needed build-pass (were failing without it).
Helps with #62277
2020-04-23 20:21:38 -07:00
RoccoDev
b85c64c3ea
rustc: Add a warning count upon completion
2020-04-11 16:15:24 +02:00
Mazdak Farrokhzad
d8080d828c
expand: address review comments
2020-03-24 06:28:56 +01:00
Mazdak Farrokhzad
0a8db690a4
nix panictry! in ParserAnyMacro::make
2020-03-24 06:28:10 +01:00
Ana-Maria Mihalache
4809be0137
rustc_errors: Use ensure_source_file_source_present where necessary.
2020-03-10 07:26:27 +01:00
Mazdak Farrokhzad
cf2d4236eb
--bless some tests
2020-03-10 07:26:27 +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
f6fc80206e
rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.
2020-02-06 21:32:07 +02:00
varkor
24a2929ed1
Normalise notes with the/is
2020-01-24 16:24:50 +00:00
Esteban Küber
52e8ec1432
Remove "here" from "expected one of X here"
2019-11-06 17:26:20 -08:00
Esteban Küber
0baf61bfdb
Increase spacing for suggestions in diagnostics
...
Make the spacing between the code snippet and verbose structured
suggestions consistent with note and help messages.
2019-10-24 12:26:01 -07:00
Eric Huss
f6ceccea93
Upgrade async/await to "used" keywords.
2019-09-28 09:15:06 -07:00
Samy Kacimi
e5e1397adb
normalize use of backticks in compiler messages for librustc/lint
...
https://github.com/rust-lang/rust/issues/60532
2019-07-17 22:49:48 +02:00
Vadim Petrochenkov
11585b598c
pprust: Use print_mac_common for delimited token groups
2019-07-15 12:42:07 +03:00
Yuki Okushi
c004451a20
Migrate compile-pass annotations to build-pass
2019-07-03 06:30:28 +09:00
varkor
59762baf8a
Move async/await tests to test/ui/async-await
2019-05-24 21:49:34 +01:00
Taylor Cramer
3f966dcd53
Stabilize futures_api
2019-04-23 16:13:53 -07:00
varkor
497dcfa221
Update ui tests
2019-04-23 11:42:14 +01:00
varkor
62838975d0
Remove unnecessary ignore-tidy-linelength
2019-04-23 11:42:14 +01:00
Andy Russell
b6f148c8bd
hide --explain hint if error has no extended info
2019-04-18 13:29:28 -04:00
Vadim Petrochenkov
1d6f4d66ad
resolve: Simplify import resolution for mixed 2015/2018 edition mode
2019-03-12 21:57:02 +03:00
Vadim Petrochenkov
fa72a81bea
Update tests
2019-03-11 23:10:26 +03:00
Mazdak Farrokhzad
f84a8cf28a
Rollup merge of #58678 - doctorn:refuse-async-fn-2015-edition, r=varkor
...
Deny `async fn` in 2015 edition
This commit prevents code using `async fn` from being compiled in Rust 2015 edition.
Compiling code of the form:
```rust
async fn foo() {}
```
Will now result in the error:
```
error[E0670]: `async fn` is not permitted in the 2015 edition
--> async.rs:1:1
|
1 | async fn foo() {}
| ^^^^^
error: aborting due to error
For more information about an error, try `rustc --explain E0670`.
```
This resolves #58652 and also resolves #53714 .
r? @varkor
2019-02-27 13:32:21 +01:00
Nathan Corbyn
8300f51936
Deny async fn in 2015 edition
...
Fix style issues and update diagnostic messages
Update src/librustc_passes/diagnostics.rs
Co-Authored-By: doctorn <me@nathancorbyn.com>
Deny nested `async fn` in Rust 2015 edition
Deny nested `async fn` in Rust 2015 edition
Deny nested `async fn` in Rust 2015 edition
2019-02-24 16:33:12 +00:00
Oliver Middleton
c654968100
Deny the overflowing_literals lint for all editions
2019-01-17 09:22:52 +00:00
Vadim Petrochenkov
79134c0517
Stabilize uniform_paths
2019-01-12 16:18:55 +03:00
Vadim Petrochenkov
e1d1487fc4
resolve: Prohibit use of uniform paths in macros originating from 2015 edition
...
...while still keeping ambiguity errors future-proofing for uniform paths.
This corner case is not going to be stabilized for 1.32 and needs some more general experiments about retrofitting 2018 import rules to 2015 edition
2019-01-12 16:17:26 +03:00
Esteban Küber
2cd0d14eb1
Address review comments
...
- Suggest raw ident escaping in all editions
- Keep primary label in all cases
2018-12-31 08:24:00 -08:00
Esteban Küber
833f12ebd7
Suggest using raw identifiers in 2018 edition when using keywords
2018-12-31 08:24:00 -08:00
Vadim Petrochenkov
bc16edeb28
Fix rebase and more CI failures
2018-12-27 15:51:37 +03:00
Vadim Petrochenkov
fff01ccfa8
Do not abort compilation if expansion produces errors
...
Fix a number of uncovered deficiencies in diagnostics
2018-12-27 15:51:36 +03:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
bors
10e2c729ea
Auto merge of #55402 - estebank:macro-eof-2, r=nikomatsakis
...
Point at end of macro arm when encountering EOF
Fix #52866 .
2018-11-27 12:31:45 +00:00
Vadim Petrochenkov
6f13708299
resolve: Suggest crate:: for resolving ambiguities when appropriate
...
More precise spans for ambiguities from macros
2018-11-27 00:34:25 +03:00
Vadim Petrochenkov
d1862b4196
resolve: Fallback to extern prelude in 2015 imports used from global 2018 edition
2018-11-27 00:34:24 +03:00
Vadim Petrochenkov
c06e69ee70
resolve: Fallback to uniform paths in 2015 imports used from global 2018 edition
2018-11-27 00:32:34 +03:00
Vadim Petrochenkov
dae4c7b1ff
resolve: Implement edition hygiene for imports and absolute paths
...
Use per-span hygiene in a few other places in resolve
Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-11-27 00:32:30 +03:00
Esteban Küber
d011313d84
Reword EOF in macro arm message
2018-11-23 15:49:31 -08:00
Esteban Küber
c45871ba02
Keep label on moved spans and point at macro invocation on parse error
2018-11-23 15:37:31 -08:00
Esteban Küber
e5cd1edfa1
Reword incorrect macro invocation primary label
2018-11-23 15:37:31 -08:00
Esteban Küber
ea9ccb6046
Point at end of macro arm when encountering EOF
...
Fix #52866
2018-11-23 15:37:31 -08:00
Esteban Küber
8227a938a4
Point at macro definition when no rules expect token
2018-10-23 21:44:46 -07:00
bors
bd8d030d01
Auto merge of #54338 - orium:fix-macro-inc-comp, r=nrc
...
Use full name to identify a macro in a `FileName`.
Before this two macros with same name would be indistinguishable inside a `FileName`. This caused a bug in incremental compilation (see #53097 ) since two different macros would map out to the same `StableFilemapId`.
Fixes #53097 .
r? @nrc
2018-09-28 06:40:32 +00:00
csmoe
6523eabf6e
add test for edition 2018
2018-09-23 22:59:06 +08:00
Diogo Sousa
2d7edf908d
Use full name to identify a macro in a FileName.
...
Before this two macros with same name would be indistinguishable inside a
`FileName`. This caused a bug in incremental compilation (see #53097 ) since
two different macros would map out to the same `StableFilemapId`.
Fixes #53097 .
2018-09-19 01:12:13 +01:00
Alex Crichton
003cab25d7
Generalize async_idents to all new keywords
...
This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.
As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.
Closes #53077
2018-08-29 09:34:53 -07:00
Alexander Regueiro
e221fcce66
Removed raw_identifiers feature gate.
2018-08-20 21:57:56 +01:00
Eduard-Mihai Burtescu
32e17b5921
tests: prefer edition: directives to compile-flags:--edition.
2018-08-16 10:36:11 +03:00
Eduard-Mihai Burtescu
2c4402638e
syntax: also warn about edition "umbrella" features being implied by --edition.
2018-08-16 10:35:45 +03:00